addLiquidity

This method provides two-sided liquidity to the primary pool.

Function

function addLiquidity(
    address _to,
    address _token,
    uint _amountTokenDesired,
    uint _amountTokenMin,
    uint _amountETHMin,
    uint _deadline
  ) external payable returns (uint liquidity);

Parameters

ParameterDescription

_to

The address of the recipient.

_token

An ERC20 token address.

_amountTokenDesired

The input amount of _token0 to be provided.

_amountTokenMin

The minimal amount that the user will accept for _amountTokenDesired

_amountETHMin

The minimal amount that the user will accept for the provided ether.

_deadline

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

Return values

ValueDescription

liquidity

The amount of minted ERC20 tokens (LP tokens) for the provided liquidity.

Last updated