Providing liquidity
Positions are standard Uniswap v3 concentrated-liquidity NFTs managed through the NonfungiblePositionManager. On the Splitshot AMM the position NFTs are Splitshot-branded (SPLIT-V3-POS); mechanics are identical to canonical v3. The Splitshot app's Pool section does all of this in the UI; the flow below is for programmatic LPs.
Mint a position
typescript
// Provide liquidity via the NonfungiblePositionManager (NFPM)
// 1. approve NFPM for both tokens
// 2. mint a position across your chosen tick range
const { request } = await publicClient.simulateContract({
address: NFPM,
abi: nfpmAbi,
functionName: 'mint',
args: [{
token0, token1, fee, // pool key (token0 < token1)
tickLower, tickUpper, // range (multiples of the fee tier's tick spacing)
amount0Desired, amount1Desired,
amount0Min, amount1Min, // slippage floors
recipient, deadline,
}],
account,
})
await wallet.writeContract(request) // position arrives as an NFTFee tiers
Four tiers are enabled: 0.01% (spacing 1), 0.05% (spacing 10), 0.3% (spacing 60) and 1% (spacing 200). Fees accrue in-range and are collected through NFPM collect.