GenericPool
Last updated
Abstract contract containing common logic for all pools Each pool manages can hold a specific pool asset, which is an ERC20 token At the same time the pool is itself an ERC20 contract representing an LP token ("pool shares"). This contract takes care of - depositing pool tokens and at the same time minting LP tokens - withdrawing pool tokens and at the same time burning LP tokens It is abstract and does not take any assumptions about how the amount of pool tokens and LP tokens are related
contract IERC20 poolAssetAsset held by the pool
uint8 poolAssetDecimalsThe decimals of the pool asset
uint256 poolCapMaximum amount of poolAsset that can be deposited into this pool
function asset() public view returns (address _token)Returns the pooled token's address
_token
address
Address of the pooled asset
Returns the decimals of the pool asset
_decimals
uint8
The number of decimals
Last updated
function assetDecimals() public view returns (uint8 _decimals)