description |
---|
V2 Converters allow for one-sided liquidity provision and removal. There is one LP token per reserve asset. |
addLiquidity increases the pool's liquidity and mints new shares in the pool to the caller.
function addLiquidity(IERC20Token _reserveToken, uint256 _amount, uint256 _minReturn) public payable protected active validReserve greaterThanZero greaterThanZero
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
_reserveToken | IERC20Token | address of the reserve token to add liquidity to |
_amount | uint256 | amount of liquidity to add |
_minReturn | uint256 | minimum return-amount of pool tokens |
Returns
The amount of pool tokens minted.
removeLiquidity decreases the pool's liquidity and burns the caller's shares in the pool.
function removeLiquidity(ISmartToken _poolToken, uint256 _amount, uint256 _minReturn) public nonpayable protected active validPoolToken greaterThanZero greaterThanZero
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
_poolToken | ISmartToken | address of the pool token |
_amount | uint256 | amount of pool tokens to burn |
_minReturn | uint256 | minimum return-amount of reserve tokens * |
Returns
The amount of liquidity removed.