Skip to content

UniswapV3 — Concentrated Liquidity, Ticks, and Why It's Genius

Posted on:June 17, 2024 at 10:00 AM

Interactive companion: UniswapV3 Interactive Explorer — configure your liquidity range and see capital efficiency, tick numbers, and IL exposure live in your browser.

In my previous post on UniswapV2, we derived the constant product formula x·y=k and showed its elegance. UniswapV3 (launched May 2021) took that formula and asked: what if liquidity providers didn’t have to provide liquidity for all prices from zero to infinity?

The answer: they don’t have to. And the result is up to 4000x more capital efficiency, the most important DeFi innovation since the original AMM.

Table of contents

Open Table of contents

The Problem with V2 Liquidity

In UniswapV2, when you deposit $10,000 into an ETH/USDC pool, your liquidity is spread across the entire price curve — from $0 to $∞ for ETH. But in practice, ETH almost never trades at $1 or $1,000,000. Your capital is “wasted” providing liquidity at prices that will never be traded.

Consider an ETH/USDC pool when ETH is at $2,000:

UniswapV3 solves this by letting you concentrate your liquidity in a specific price range.

Concentrated Liquidity: The Core Idea

Instead of providing liquidity across [0, ∞), you choose a range [P_lower, P_upper]. Your $10,000 now provides the same depth as $200,000 would in V2 (if your range covers the current price).

As long as the price stays within your range, you earn fees proportional to your share of liquidity in that range. If the price moves outside your range, your position becomes 100% one token and earns no fees until price returns.

This creates a fundamentally different LP experience:

The Math: Virtual Reserves

V3 achieves this by transforming the constant product formula. For a position with range [P_a, P_b] and liquidity L:

virtual_x = L / √P
virtual_y = L × √P

Where P is the current price (y/x ratio). The “virtual” reserves are what the position would have if it extended to the full [0, ∞) range — but only the portion within [P_a, P_b] is real.

The amount of real tokens in a position:

real_x = L × (1/√P_current - 1/√P_upper)
real_y = L × (√P_current - √P_lower)

When price equals P_lower: the position is 100% token X (all token Y has been sold as price fell — real_y formula yields zero) When price equals P_upper: the position is 100% token Y (all token X has been sold as price rose — real_x formula yields zero)

This is why out-of-range positions are single-token — they’ve been converted during price movement.

Capital Efficiency Formula

For a V3 position in range [P_a, P_b] vs a V2 position covering [0, ∞), the capital efficiency ratio is:

Efficiency = 1 / (1 - √(P_a/P_b))

For a ±10% range around current price (P_a = 0.9P, P_b = 1.1P):

Efficiency = 1 / (1 - √(0.9/1.1))
= 1 / (1 - √0.818)
= 1 / (1 - 0.905)
= 1 / 0.095
≈ 10.5x

For a ±1% range:

Efficiency = 1 / (1 - √(0.99/1.01)) ≈ 100x

For a ±0.1% range (like stablecoin pools):

Efficiency ≈ 1000-4000x depending on exact parameters

This is why Curve’s stableswap pools (which concentrates near peg by default) can offer such tight spreads — and why V3 stablecoin pools have nearly displaced Curve in some pairs.

Ticks: Discretizing the Price Space

You can’t specify an arbitrary [P_a, P_b] range — that would require infinite precision. UniswapV3 discretizes the price space into ticks.

A tick i corresponds to price:

P(i) = 1.0001^i

The base 1.0001 means each tick is a 0.01% (1 basis point) price step. For ETH at $2,000:

When you create a position in the range $1,800–$2,200, V3 finds the nearest ticks and snaps to them.

Tick Spacing and Fee Tiers

UniswapV3 pools come in four fee tiers (the 0.01% tier was added via governance post-launch), each with a corresponding minimum tick spacing:

Fee tierTick spacingUse case
0.01%1 tick (0.01% steps)Stablecoins (USDC/USDT)
0.05%10 ticks (0.1% steps)Correlated pairs (ETH/stETH)
0.30%60 ticks (0.6% steps)Standard pairs (ETH/USDC)
1.00%200 ticks (2% steps)Exotic/volatile pairs

You can’t provide liquidity at arbitrary prices — only at multiples of the tick spacing for your fee tier. This is a deliberate engineering tradeoff: finer granularity costs more gas (more ticks to cross per swap).

The Tick Bitmap and Crossing

The pool maintains a tick bitmap — a compact representation of which ticks have active liquidity. When a swap moves the price, it needs to find the next initialized tick to know where to stop (where liquidity changes).

The bitmap stores 256 ticks per word (uint256). Finding the next active tick is a bitwise operation:

// Simplified: find next initialized tick
function nextInitializedTick(int24 tick, bool lte) internal view returns (int24) {
(int16 wordPos, uint8 bitPos) = position(tick);
// Use bit manipulation to find next set bit in the bitmap
// ...
}

“Crossing a tick” means:

  1. The swap price has passed through an initialized tick
  2. The liquidity delta at that tick is applied (positions enter or exit the range)
  3. Gas cost: ~10,000-15,000 gas per tick crossed

This is why complex V3 swaps (crossing many liquidity positions) cost more gas than simple V2 swaps.

Liquidity as an NFT

In V2, all LP positions are fungible — everyone’s share is represented by the same LP token. In V3, every position is unique (different range, amount, timing) so positions are represented as NFTs (ERC-721 tokens via the NonfungiblePositionManager contract).

This has major implications:

Range Orders: The Accidental Limit Order

A particularly clever V3 use case: placing a position entirely above or below current price creates a range order.

Example: ETH at $2,000, you create a position in the range $2,200–$2,400 with 10 ETH:

You’ve effectively placed a sell order for ETH at $2,200–$2,400 while earning swap fees during the crossing. This is more capital-efficient than a regular limit order (which earns nothing while waiting).

Impermanent Loss in V3 vs V2

Concentrated liquidity amplifies both gains (fees) and losses (IL). For a position in range [P_a, P_b], IL is:

IL_v3 = IL_v2 × amplification_factor

Where the amplification factor equals the capital efficiency gain. If you’re 10x more capital efficient, your IL exposure (relative to deposited capital) is also up to 10x higher.

ScenarioV2 ILV3 IL (±10% range)
Price moves 5% (stays in range)0.06%0.6%
Price moves 10% (hits boundary)0.25%Full conversion + stops earning
Price moves 20%0.95%N/A (out of range from 10%)

The key insight: in V3, the worst case is your position going out of range and becoming 100% the depreciating token. If ETH drops 15% and your range was ±10%, you’re now 100% ETH with no fees. A V2 LP would still be partially in USDC at that point.

What V3 Did to the DeFi Landscape

UniswapV3 fundamentally changed who provides liquidity:

JIT (Just-In-Time) liquidity is perhaps the most unintended consequence: bots effectively “steal” fees from passive LPs by concentrating massively around pending swaps. It’s legal, profitable, and controversial.

V4: Hooks Are Next

Announced in 2023, UniswapV4 adds a hooks system — arbitrary code executed before/after swaps, LP actions, and pool creation. This enables:

UniswapV3’s concentrated liquidity was the innovation of 2021. V4 hooks will be the innovation of 2025-2026. The AMM design space is far from exhausted.