AddLiquidity

Curve Action Plugin - AddLiquidity

Description

Deposit coins into the pool.

Method

add_liquidity(address[], min_mint_amount)

Input Parameters

NameTypeDescription

to

FctAddress

Address of Curve pool

Method Parameters

NameTypeDescription

amounts

FctAddress[]

List of amounts of coins to deposit

minMintAmount

FctValue

Optional address to transfer the received tokens to. If not specified, defaults to the caller.

Returned Values

NamePlugin TypeDescription

lpTokensReceived

FctValue

Amount of LP tokens that will be minted in the deposit.

Example

Example with initParams

const addLiquidity = new Curve.actions.AddLiquidity({
   chainId: 1,
   initParams: {
     to: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", // DAI/USDC/USDT Pool
     methodParams: {
       amounts: ["0", "274410610000", "0"],
       minMintAmount: "268198723565641041209289"
     }
   }
})

Example without initParams

const addLiquidity = new Curve.actions.AddLiquidity({ chainId: 1 })

addLiquidity.input.set({
    to: "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", // DAI/USDC/USDT Pool
    methodParams: {
       amounts: ["0", "274410610000", "0"],
       minMintAmount: "268198723565641041209289"
    }
})

Learn more

Learn more about Curve add liquidity here

Last updated