Quote add liquidity

Quote add liquidity on Aerodrome

Base
Base

Reads onchain state

Reads what adding liquidity to an Aerodrome stable or volatile pool would settle at right now. The pool's stable flag is read and the router's quoteAddLiquidity returns the amount of each token the add would take at the pool's reserve ratio and the LP it would mint. Reach for it to size an add before it runs, to set its floors from the live ratio, or to gate an entry on the LP it would receive.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

WETH USDC Volatile LP on Vfat

aerodrome
math
vfat
4actions
  1. 1·Quote add liquidity

    Quoting first, this reads what depositing 0.01 WETH and 40 USDC into the Aerodrome WETH/USDC volatile pool would settle at right now, returning the expected WETH and USDC amounts.

  2. 2·Multiply then divide

    Taking the quoted WETH amount, this multiplies it by 995 and divides by 1000 rounding down, trimming it to 99.5 percent as a minimum floor.

  3. 3·Multiply then divide

    Similarly, the quoted USDC amount is multiplied by 995 and divided by 1000 rounding down to set its 99.5 percent floor.

  4. 4·Deposit

    Depositing finally adds the quoted WETH and USDC into the same Aerodrome volatile pool through vfat and stakes the LP, requiring at least the two 99.5 percent floors to settle.

Quote adding and to
Calculate times divided by rounded
Calculate times divided by rounded
Deposit and into on vfat for at least and
  • WETH USDC Volatile LP on Vfat

    aerodrome
    math
    vfat

More on Aerodrome · 37

On other protocols · 1