PoolLogic
Logic implementation for pool
Functions:
Events:
Function initialize(address _factory, bool _privatePool, string _fundName, string _fundSymbol)
initialize(address _factory, bool _privatePool, string _fundName, string _fundSymbol)
Initialize the pool
Parameters:
_factory
: address of the factory_privatePool
: true if the pool is private, false otherwise_fundName
: name of the fund_fundSymbol
: symbol of the fund
Function setPoolPrivate(bool _privatePool)
setPoolPrivate(bool _privatePool)
Set the pool privacy
Parameters:
_privatePool
: true if the pool is private, false otherwise
Function deposit(address _asset, uint256 _amount) → uint256 liquidityMinted
deposit(address _asset, uint256 _amount) → uint256 liquidityMinted
Deposit funds into the pool
Parameters:
_asset
: Address of the token_amount
: Amount of tokens to deposit
Return Values:
liquidityMinted Amount of liquidity minted
Function withdraw(uint256 _fundTokenAmount)
withdraw(uint256 _fundTokenAmount)
Withdraw assets based on the fund token amount
Parameters:
_fundTokenAmount
: the fund token amount
Function execTransaction(address to, bytes data) → bool success
execTransaction(address to, bytes data) → bool success
Function to let pool talk to other protocol
Parameters:
to
: The destination address for pool to talk todata
: The data that going to send in the transaction
Return Values:
success A boolean for success or fail transaction
Function getFundSummary() → string, uint256, uint256, address, string, uint256, bool, uint256, uint256
getFundSummary() → string, uint256, uint256, address, string, uint256, bool, uint256, uint256
Get fund summary of the pool
Return Values:
Name of the pool
Total supply of the pool
Total fund value of the pool
Address of the pool manager
Name of the pool manager
Time of the pool creation
True if the pool is private, false otherwise
Numberator of the manager fee
Denominator of the manager fee
Function tokenPrice() → uint256 price
tokenPrice() → uint256 price
Get price of the asset
Parameters:
price
: A price of the asset
Function availableManagerFee() → uint256 fee
availableManagerFee() → uint256 fee
Get available manager fee of the pool
Return Values:
fee available manager fee of the pool
Function mintManagerFee()
mintManagerFee()
Mint the manager fee of the pool
Function getExitCooldown() → uint256 exitCooldown
getExitCooldown() → uint256 exitCooldown
Get exit cooldown of the pool
Return Values:
exitCooldown The exit cooldown of the pool
Function getExitRemainingCooldown(address sender) → uint256 remaining
getExitRemainingCooldown(address sender) → uint256 remaining
Get exit remaining time of the pool
Return Values:
remaining The remaining exit time of the pool
Function setPoolManagerLogic(address _poolManagerLogic) → bool
setPoolManagerLogic(address _poolManagerLogic) → bool
Set address for pool manager logic
Function managerName() → string _managerName
managerName() → string _managerName
Get name of the manager
Return Values:
_managerName The name of the manager
Function isMemberAllowed(address member) → bool
isMemberAllowed(address member) → bool
Return true if member is allowed, false otherwise
Function executeOperation(address[] assets, uint256[] amounts, uint256[] premiums, address originator, bytes params) → bool success
executeOperation(address[] assets, uint256[] amounts, uint256[] premiums, address originator, bytes params) → bool success
execute function of aave flash loan
Parameters:
assets
: the loaned assetsamounts
: the loaned amounts per each assetpremiums
: the additional owed amount per each assetoriginator
: the origin caller address of the flash loanparams
: Variadic packed params to pass to the receiver as extra information
Last updated