Ticks and Ranges
V3 uses a tick system to discretize the continuous price space. Each tick represents a specific price point, and liquidity positions are defined by a range of ticks.Ticks
A ticki maps to a price via:
Each tick represents a 0.01% (1 basis point) price change from the adjacent tick. Ticks are integers ranging from -887272 to 887272.
| Tick | Price |
|---|---|
| 0 | 1.0 |
| 1 | 1.0001 |
| 100 | 1.01005 |
| 10000 | 2.71828 |
| -10000 | 0.36788 |
Tick Spacing
Not every tick is usable — positions must align to tick spacing boundaries determined by the pool’s fee tier:| Fee Tier | Tick Spacing | Price Granularity |
|---|---|---|
| 0.01% | 1 | Every 0.01% |
| 0.05% | 10 | Every 0.10% |
| 0.3% | 60 | Every 0.60% |
| 1% | 200 | Every 2.02% |
tickLower and tickUpper must be multiples of the pool’s tick spacing.
sqrtPriceX96
On-chain, prices are stored as sqrtPriceX96 — the square root of the price multiplied by 2^96: This encoding enables efficient fixed-point arithmetic without floating-point operations. To convert back to a human-readable price:Price Ranges
A liquidity position is defined by[tickLower, tickUpper]:
Converting Between Prices and Ticks
Price to tick: Then round to the nearest usable tick (multiple of tick spacing). Tick to price:Token0 and Token1
V3 defines prices as token1 per token0 (price = token1/token0). The token with the lower address is always token0.
For a KAS/USDC pool where KAS is token0:
price = 0.05means 1 KAS = 0.05 USDCtick ≈ -29959