Pool
Functions#
getReserves#
Get the pool's balance of token
initialize#
liquidityToBurn#
calculates the amount of liquidity tokens needed to be burnt given an amount of the underlying token
Parameters:#
| Name | Type | Description |
|---|---|---|
amount | uint256 | the amount of ERC-20 tokens that is needed |
mint#
mints liquidity tokens pro rata based on the amount of the underlying ERC-20 token that was transferred to the pool
Parameters:#
| Name | Type | Description |
|---|---|---|
to | address | the address to mint the liquidity tokens to |
burn#
converts pool liquidity tokens into underlying ERC-20 tokens and sends them to the address specified
Parameters:#
| Name | Type | Description |
|---|---|---|
to | address | the address to send the underlying tokens to |
borrow#
Borrows funds from the pool
Parameters:#
| Name | Type | Description |
|---|---|---|
amountOut | uint256 | the amount requested |
to | address | the address to send the funds to |
data | bytes | any data that might be needed during call execution |
factory#
returns the address of the factory
token#
returns the underlying ERC-20 token of this pool