Uniswap v4 Ticks & Why Do They Matter?

If you've ever used Uniswap, you probably know it lets you swap one crypto token for another. But have you ever wondered how it determines the right price for a V4?
Under the hood, Uniswap V4 uses ticks to control price changes. This may sound technical, but don’t worry—this guide breaks it down in the simplest way possible.
✅ What’s a Tick?
Think of a tick like a step on a staircase. Prices don’t slide up and down smoothly. Instead, they move one step at a time—tick by tick.
So: 1 tick = 1 small change in price
🔢 How Small Is That Step?
Each tick changes the price by just 0.01%.
That means:
If the price increases by one tick → it increases by 0.01%.
If it drops by one tick → it decreases by 0.01%.
It’s a very tiny step, but that’s the point—it helps control price movement precisely.
📏 What’s Tick Spacing?
Tick spacing is just the gap between these steps.
Imagine climbing a ladder:
If the steps are close together, you move in small, controlled steps.
If the steps are far apart, you move up or down faster.
Uniswap V4 controls this spacing to adjust how smoothly prices can shift.
🛑 Are There Limits?
Yes, ticks can only go so far. They range from -887,272 to +887,272.
That’s the full range of prices Uniswap V4 supports.
Anything outside this range is not allowed.
🤯 Why Store the Square Root of the Price?
Here’s where things get interesting.
Blockchain systems (like Ethereum) aren’t great at handling decimal numbers (like 1.000234). So instead of working directly with prices, Uniswap stores the square root of the price.
Why?
Because it makes math easier and faster inside smart contracts.
🔍 The Trick: Use Big Numbers Instead of Decimals
Still, there’s a problem: square roots often result in decimal numbers, and Solidity (the language used for Ethereum smart contracts) can’t store them accurately.
So, Uniswap uses a neat trick:
It multiplies the square root of the price by 2^96 (that’s 2 raised to the power of 96).
This turns it into a whole number, which Solidity can store safely.
For example:
Instead of storing 1.000234
, it might store 792314440428276618009
.
This technique is called Q64.96 notation.
You don’t need to remember the name—know it helps store precise numbers on the blockchain.
⚠️ What’s a sqrtPriceLimit?
Sometimes, Uniswap V4 must ensure prices don’t swing too far during a trade.
To do this, it uses a price limit based on the square root of the price. If something unusual happens, the trade won’t go through unless the price stays within a safe range.
It’s just another way to keep things stable and fair.
📚 Summary: The Super Easy Version
Here’s the quick takeaway:
Ticks are tiny price steps.
Each tick = 0.01% price change.
Tick spacing decides how small or big each price step can be.
Ticks only go between -887,272 and +887,272.
Decimal numbers are tricky, so Uniswap:
Stores the square roots of prices
Converts them into big whole numbers using Q64.96 format
This makes trading smoother, faster, and more accurate.
Subscribe to my newsletter
Read articles from dc directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

dc
dc
Software Engineer passionate about #Solidity, #Cadence, #ReactJS.