Add Liquidity With Fixed Coin
Once you have set a suitable tick range, you can proceed to add liquidity to this position. The quantity composition of tokens you need to add is affected by the current price of the pool and the tick interval you have chosen.
Function input params
pid: The object id about which pool you want to operation.
fix_amount_a: true means fixed coinA amount, false means fixed coinB amount
offer_amount_a:If fixed amount A, you must set amountA, amountB will be auto calculated by ClmmPoolUtil.estLiquidityAndcoinAmountFromOneAmounts().
offer_amount_b: f fixed amount B, you must set amountB, amountA will be auto calculated by ClmmPoolUtil.estLiquidityAndcoinAmountFromOneAmounts().
Example
Last updated