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 Spacing
Not every tick is usable — positions must align to tick spacing boundaries determined by the pool’s fee tier:
When creating a position,
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