Tick Math (Concentrated Liquidity Ticks)
Tick math defines the discrete price points at which liquidity positions are placed in concentrated liquidity AMMs.
Key Takeaways
- Ticks are discrete price points used by concentrated liquidity AMMs: each tick represents a 0.01% (one basis point) price change, following the formula p(i) = 1.0001^i where i is an integer index.
- Liquidity providers set upper and lower tick bounds for their positions, and the pool tracks active liquidity by adding or subtracting a signed net value each time the price crosses an initialized tick.
- Tick spacing limits which ticks can be used as position boundaries: tighter spacing allows more precise ranges but costs more gas when the price crosses ticks during swaps.
What Is Tick Math?
Tick math is the system of discrete price indexing used by concentrated liquidity decentralized exchanges such as Uniswap v3, Uniswap v4, and Raydium CLMM. Instead of treating price as a continuous variable, these protocols divide the entire price range into discrete points called ticks. Each tick corresponds to a specific price defined by the formula p(i) = 1.0001^i, where i is a signed integer called the tick index. This means every adjacent pair of ticks is separated by exactly one basis point (0.01%) in price.
The tick system exists because concentrated liquidity requires the protocol to know exactly where liquidity changes. In a traditional constant product liquidity pool, all liquidity is spread uniformly across the full price range. In a concentrated liquidity pool, each LP chooses a specific range. Ticks are the boundaries of those ranges, and the protocol only needs to update its liquidity accounting when the price crosses a tick boundary during a swap.
How It Works
The core of tick math is the exponential relationship between tick indexes and prices. Because 1.0001 is the base, negative tick indexes produce prices below 1 and positive indexes produce prices above 1. Tick index 0 always corresponds to a price of exactly 1.
The Price Formula
The relationship between a tick index i and its corresponding price p is:
p(i) = 1.0001^i
// Examples:
// Tick 0 → price = 1.0001^0 = 1.0
// Tick 1 → price = 1.0001^1 = 1.0001
// Tick -1 → price = 1.0001^(-1) ≈ 0.99990001
// Tick 100 → price = 1.0001^100 ≈ 1.01005
// Tick -100 → price = 1.0001^(-100) ≈ 0.99005In practice, Uniswap's smart contracts do not store the price directly. They store the square root of the price as a Q64.96 fixed-point number (a uint160), following the encoding sqrtPriceX96 = sqrt(price) * 2^96. This avoids expensive division operations during swap calculations and keeps all arithmetic in integer math.
Tick Index Range
Tick indexes are bounded. In Uniswap v3 and v4, the minimum tick is -887,272 and the maximum is 887,272. These bounds come from the base-1.0001 logarithm of the representable price range (2^-128 to 2^128). The TickMath library enforces these limits:
// Uniswap v3/v4 TickMath constants
int24 internal constant MIN_TICK = -887272;
int24 internal constant MAX_TICK = 887272;
// Corresponding sqrt price bounds (Q64.96)
uint160 internal constant MIN_SQRT_PRICE = 4295128739;
uint160 internal constant MAX_SQRT_PRICE =
1461446703485210103287273052203988822378723970342;Other protocols use different ranges. Raydium's CLMM uses Q64.64 fixed-point encoding with a tick range of [-443,636, 443,636], covering a similar price span with different precision tradeoffs.
Tick Spacing
Not every tick can serve as a position boundary. Each pool has a tick spacing parameter that determines which ticks are "initializable." Only ticks whose index is evenly divisible by the tick spacing can be used as the lower or upper bound of a liquidity position. In Uniswap v3, tick spacing is determined by the pool's fee tier:
| Fee Tier | Tick Spacing | Price Step per Usable Tick |
|---|---|---|
| 0.01% | 1 | ~0.01% (1 bps) |
| 0.05% | 10 | ~0.10% (10 bps) |
| 0.30% | 60 | ~0.60% (60 bps) |
| 1.00% | 200 | ~2.00% (200 bps) |
Wider tick spacing suits volatile pairs because every tick crossing during a swap costs gas. Fewer crossable ticks means lower gas costs per swap, at the expense of less granular position boundaries. In Uniswap v4, tick spacing can be set independently of the fee tier, and hooks can implement dynamic fees that adjust per swap.
Active Liquidity and Tick Crossing
The pool maintains a single running total of active liquidity: the sum of all positions whose range covers the current price. Rather than recalculating this from scratch on every swap, the protocol stores a signed value called liquidityNet at each initialized tick.
When an LP mints a position between tick A (lower) and tick B (upper):
- Tick A's liquidityNet increases by the position's liquidity amount
- Tick B's liquidityNet decreases by the same amount
During a swap, when the price moves upward through an initialized tick, the pool adds that tick's liquidityNet to the active liquidity total. When the price moves downward through a tick, the pool subtracts it. This means:
// Price moving up through tick i:
activeLiquidity += tick[i].liquidityNet
// Price moving down through tick i:
activeLiquidity -= tick[i].liquidityNetThis design is what makes concentrated liquidity gas-efficient. The pool only does work at tick boundaries, not at every infinitesimal price change. Between ticks, swaps follow the standard constant product formula with the current active liquidity.
Use Cases
Capital-Efficient Liquidity Provision
Tick math enables LPs to concentrate their capital within a narrow price range instead of spreading it across the full spectrum. An LP who provides liquidity between ticks corresponding to $1,990 and $2,010 for an ETH/USDC pool achieves far higher capital efficiency than one using a full-range position. The tradeoff: narrower ranges earn more fees per dollar deployed when the price stays within range, but earn nothing when the price moves outside the bounds.
Range Orders
LPs can use single-tick positions (where the lower and upper ticks are separated by one tick spacing) to create range orders: positions that act like limit orders. When the price crosses through the range, the position converts entirely from one token to the other, effectively executing a swap at the target price while earning fees in the process.
Protocol-Level Price Oracles
Tick indexes serve as compact, gas-efficient price representations. Uniswap v3 stores cumulative tick values over time, enabling time-weighted average price (TWAP) oracles that other protocols can query on-chain. Because tick indexes are integers, accumulating them is cheaper than storing full-precision prices.
Automated Liquidity Management
Tick math provides the foundation for automated vault strategies that rebalance LP positions as the price moves. These vaults monitor the current tick, detect when the price approaches a position's boundary, and redeploy liquidity around the new price. Understanding tick boundaries and spacing is essential for building these strategies.
Risks and Considerations
Impermanent Loss Amplification
Narrower tick ranges amplify impermanent loss. When the price moves outside a concentrated position's bounds, the LP holds 100% of the less valuable token and earns zero fees. This is the fundamental tradeoff of concentrated liquidity: higher capital efficiency within range comes with sharper losses when the price exits the range.
Gas Costs at Tick Crossings
Every initialized tick that the price crosses during a swap triggers a storage read and liquidity update, which costs gas. Pools with many initialized ticks close together (tight spacing, many overlapping positions) can make large swaps expensive. This is why tick spacing exists: it limits the density of initializable ticks to keep gas costs manageable.
Precision and Rounding
The fixed-point arithmetic used in tick math introduces rounding at the edges. Converting between tick indexes and sqrt prices involves approximation, and the Q64.96 encoding has finite precision. For most practical purposes this is negligible, but applications that perform many sequential conversions should be aware of cumulative rounding drift.
Cross-Protocol Differences
Not all concentrated liquidity protocols use the same tick parameters. Uniswap uses ±887,272 with Q64.96 encoding, while Raydium uses ±443,636 with Q64.64. Developers building cross-protocol tools or DEX aggregators must account for these differences when computing prices and position boundaries across venues.
This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.