V3 and V2 Pools
V3 pools complement the existing V2 constant product and bonding curve pools. Both pool types coexist:- V2 Constant Product: Liquidity spread across all prices, fungible LP tokens, simpler management
- V2 Bonding Curve: Single-sided pools that bond to constant product
- V3 Concentrated: Custom price ranges, non-fungible positions, higher capital efficiency
listPools(). V3 pools have curveType: "V3_CONCENTRATED" and include additional fields like currentTick, tickSpacing, and totalLiquidity.
getPoolLiquidity() for depth chart visualization and getPoolTicks() for swap simulation.
How V3 Works
In V2 constant product pools, liquidity spreads from zero to infinity. Most of it sits idle outside the trading range. V3 pools let you choose where your capital works. The math uses ticks to represent prices. Each tick is a 0.01% price change from the previous tick:Quick Comparison
| Aspect | V2 Pools | V3 Pools |
|---|---|---|
| Liquidity Range | 0 to infinity | Custom price range |
| Capital Efficiency | ~50% active | Up to 4000x better |
| Position Type | Fungible LP tokens | Non-fungible positions |
| Fee Tracking | Global per pool | Per-position |
Getting Started
Create a Position
Convert Prices to Ticks
The SDK provides utilities to convert between human-readable prices and ticks:Core Operations
Add Liquidity
Creates a new position or adds to an existing one at the same tick range:Remove Liquidity
Withdraws liquidity and collects accumulated fees:Collect Fees
Claim earned fees without removing liquidity:Rebalance Position
Move your liquidity to a new price range in a single atomic operation:Pool Data
Get Liquidity Distribution
For building depth charts and visualizations:Get Pool Ticks
For swap simulation and slippage calculation:Tick Spacing
Pools have a tick spacing that determines valid tick boundaries. Common values:| Tick Spacing | Price Step | Use Case |
|---|---|---|
| 10 | 0.1% | Stable pairs, tight ranges |
| 60 | 0.6% | Most trading pairs |
| 200 | 2% | Volatile pairs |
Position States
Your position’s behavior depends on where the current price sits relative to your range:| Price Location | Asset A | Asset B | Earning Fees |
|---|---|---|---|
| Below your range | 100% | 0% | No |
| Within your range | Mixed | Mixed | Yes |
| Above your range | 0% | 100% | No |
Error Handling
Next Steps
- Managing Positions - List, monitor, and optimize your positions
- Free Balances - Reduce transaction overhead for frequent operations
- Create Pools - Launch new V3 pools