removeLiquidity

This method removes liquidity from the primary pool.

Function

function removeLiquidity(
    address _to,
    address _token0,
    address _token1,
    uint _liquidity,
    uint _amount0Min,
    uint _amount1Min,
    uint _deadline
) external returns (uint amountA, uint amountB);

Parameters

ParameterDescription

_to

The address of the recipient.

_token0

An ERC20 token address.

_token1

An ERC20 token address.

_liquidity

The amount of LP tokens to be burned.

_amount0Min

The minimal amount of _token0 that the user will accept for a given amount of _liquidity. Cannot be the WETH address.

_amount1Min

The minimal amount of _token1 that the user will accept for a given amount of _liquidity. Can be the WETH address.

_deadline

The UTC timestamp that if reached, causes the swap transaction to fail automatically

Return values

ValueDescription

amountA

The amount of _token0 that are returned to the recipient.

amountB

The amount of _token1 that are returned to the recipient.

Last updated