Concentrated Pool
Steps to Integration
import { v3AddLiquidity, v3PositionManagerTokenApproval, v3CreatePool } from '@piperx/sdk/src/core'
import { WIP_ADDRESS } from '@piperx/sdk/src/constant'Prepare Input
token1_address: address, // if it is $IP native token, use WIP_ADDRESS
token2_address: address, // if it is $IP native token, use WIP_ADDRESS
amount1: bigint, // amount of token 1 you want to deposit to the pool
amount2: bigint, // amount of token 2 you want to deposit to the pool
amount1Min: bigint, // minimal amount of token 1 you want to deposit to the pool
amount2Min: bigint, // minmial amount of token 2 you want to deposit to the pool
initital_price: bigint,
// initial price for token2 / token1,
// note that, this is purely token2 amount / token1 amount, so you have to
// convert the decimal beforehand.
tickLower: number, // define the lower range of your liquidity provision priceLower = 1.0001^tickLower
tickUpper: number, // define the upper range of your liquidity provision priceUpper = 1.0001^tickUpper
expire_time: bigint// expiration timestamp for creating the pool
signer: ethers.SignerApprove tokens
Creating the pool
Last updated