V2 liquidity
Providing liquidity with the wrapper has the benefit that RBTC is automatically wrapped to WRBTC and the pool tokens are automatically deposited at the liquidity mining contract.
Adding liquidity
addLiquiditytoV2 accepts RBTC, wraps RBTC to WRBTC, adds liquidity to the converter contract and transfers the pool tokens to the liquidity mining contract.
Arguments
_liquidityPoolConverterAddress
address
address of LiquidityPoolConverter contract
_reserveAddress
address
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.
Removing liquidity
removeLiquidityFromV2 withdraws the pool tokens from the liquidity mining contract, removes the liquidity from the converter contract , unwraps WRBTC to RBTC and sends those to the user.
Arguments
_liquidityPoolConverterAddress
address
address of the LiquidityPoolConverter contract
_poolToken
address
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.
Last updated