Skip to Content
Stacks PoolsConcentrated Liquidity PoolsHow Concentrated Liquidity Works
Stacks Pools

How Concentrated Liquidity Works

Learn how Zest Protocol concentrated liquidity pools divide the price axis into bins, how a bin prices trades, and why concentrated liquidity gives deeper markets.

Zest Protocol’s concentrated liquidity market maker (Zest Protocol CLMM) splits each pool’s price axis into discrete bins. Liquidity providers choose which bins to fill, so their capital supports trading only at the prices they select. Near the current price, the same capital causes far less price impact than in a classic pool that spreads it across every price.

In Plain Terms

A classic pool spreads every deposit across all prices, from zero to infinity, so most of it waits at prices nobody trades at. Zest Protocol CLMM lets a provider put capital only where trading happens:

  • Pick a price range. You choose the bins your liquidity sits in.
  • Your capital works harder inside that range. In one bin, the same capital trades as deeply as a classic pool tens or hundreds of times its size.
  • Every trade in your range pays you. A share of each swap’s fee is added to the bins it trades through.

The trade-off: when the price leaves your range, your position holds one token only and stops earning until the price comes back or you move the range.

Concentrated liquidity: the same capital in a few bins near the price instead of across every price. Every trade in your range pays the LP fee into your bins; when the price leaves, your bins hold one token and stop earning until you move the range.

Key terms

TermMeaning
BinOne price step of a pool: a small self-contained pool with its own reserves, price and shares
Bin stepHow wide each bin is: 1%, 5%, 10% or 20%, fixed per pool
RangeThe bins a provider has filled
ShareA receipt for part of one bin’s reserves; a position across several bins is a stack of them

Key Features

Discrete price bins

Each pool has a fixed bin step of 1%, 5%, 10% or 20%. Every bin covers one step of price, and a provider can deposit into any bin or set of bins.

Concentrated within each bin

Inside a bin, the pool trades on a constant-product curve bounded by the bin’s two edges. The price moves smoothly within a bin and passes to the next bin only when one side of the current bin is used up.

Any ratio, any bin

A deposit can hold the two tokens in any ratio. The part that does not match the bin’s ratio is treated as a swap and pays the swap fee, so depositing and withdrawing is designed never to be a cheaper way to trade.

Fees for liquidity providers

Every swap pays a fee set per pool and per token. A set share of each fee is added to the bin it was paid in, raising the value of that bin’s shares.

Exits always open

Pausing or retiring a pool stops swaps and new deposits. Withdrawals keep working in every state.

Bins and Prices

Prices in Zest Protocol CLMM are quoted as token X per token Y, in raw base units. The app shows a pair as the value of one token in the other, such as 1 STX = 0.6 USDCx, with the stablecoin as the quote token. When a pool’s token Y is the stablecoin, the app therefore shows the inverse of the contract’s price. In a pool with bin step β, the bin at tick t covers the prices

[(1 + β)^t, (1 + β)^(t + 1)]

Tick 0 starts at price 1; positive ticks are higher prices and negative ticks lower ones. The range of usable ticks depends on the bin step, and covers prices from 2⁻⁶⁴ to 2⁶⁴:

Bin stepBin widthUsable ticksSuits
u1001%±4,458Correlated or stable pairs
u5005%±909Established pairs with moderate volatility
u100010%±465Volatile pairs
u200020%±243Very volatile or newly launched tokens
Each bin is its own small pool. Grey is token X and orange is token Y: bins below the price hold X, bins above it hold Y, and the bin at the price holds both.

A pool has no single current price: every bin keeps its own, set by its own reserves. Trading keeps them in line with the market. Arbitrage leaves bins below the market price holding only token X, bins above it holding only token Y, and the bin at the market price holding both:

  • Selling X for Y adds X to a bin and takes Y out of it, moving that bin’s price up. When the bin runs out of Y, the trade continues in the next bin up.
  • Selling Y for X does the opposite, moving prices down through lower bins.

Inside a Bin

Within a bin the pool trades on a bounded constant-product curve, the same curve used by Uniswap v3 positions. Let a and b be the square roots of the bin’s start and end prices:

(x + L·a) · (y + L/b) = L²

x and y are the bin’s reserves and L is its liquidity. A bin stores only its reserves: its liquidity and price are derived from them, so every possible pair of reserves is a valid state and its price always lies inside the bin.

When a bin holds only X its price sits at the bin’s top edge; when it holds only Y, at its bottom edge. A trade inside the bin moves the price between the two.

Every bin is a curve: inside a bin the price moves along a constant-product curve, a slice of the much bigger pool the bin trades like.
Every bin is a curve: inside a bin the price moves along a constant-product curve, a slice of the much bigger pool the bin trades like.

Why Concentrate

A classic pool spreads its liquidity over every price, so only a sliver of it sits near the price where trades happen, and a trade of a given size moves the price a lot. A bin puts all of a deposit inside one price step. Near the middle of that bin, the same capital gives the depth of a much larger classic pool:

Bin stepDepth of one bin, against the same capital spread over every price
1%about 400×
5%about 82×
10%about 42×
20%about 22×

The comparison is at the bin’s geometric midpoint, from section 3.3 of the Zest Protocol CLMM whitepaper: the factor is 1 / (1 − (1 + β)^(−1/4)), close to 4 / β for small steps. Towards a bin’s edges, its liquidity becomes one-sided.

The same capital, about 22 times the depth in one 20% bin, at the bin's midpoint price.
The same capital, about 22 times the depth in one 20% bin, at the bin's midpoint price.

Deeper markets mean less price impact for traders and more fees per unit of capital for providers, as long as the price stays in range. The cost is that a concentrated position converts entirely into one token sooner when the price moves. See What LPs Earn and Risk for the trade-off.

Precision and Rounding

The pool computes every bin price from exact precomputed tables, to a relative error below 10⁻¹⁷ in the 1% table, and multiplies large numbers with exact 256-bit arithmetic. Even pools far deeper than any real market cannot overflow.

All rounding favors the pool. Each swap’s output is rounded down and reduced by a further 2⁻⁴⁰ of itself plus at most one base unit; every amount owed to the pool rounds up. As a result, every trade strictly increases its bin’s liquidity, never crosses the trader’s price limit, and costs at most the exact curve price plus that margin. These properties are proved in the Zest Protocol CLMM whitepaper and checked by fuzzing against an exact model.

Every trade increases its bin's liquidity, so trading cannot drain a pool at a loss.
A trade receives at most the exact curve amount: all rounding favors the pool.

Pool States

Governance sets each pool’s state:

StateSwapsDepositsWithdrawals
ActiveYesYesYes
SunsetYesNoYes
PausedNoNoYes

A sunset pool winds down: traders can still use its liquidity, but nobody can add more.

Pausing a pool stops trading. Liquidity providers can still withdraw.

Public and Private Pools

A public pool is open to every liquidity provider. Each token pair has one public pool per bin step, whichever token is listed first.

A public pool takes liquidity from anyone. A private pool takes it from one named depositor, and anyone can trade against either.

A private pool names one depositor, the only address that can add liquidity. Anyone can trade against it, and anyone who holds its shares can withdraw them. Private pools sit beside the public pool of the same pair and bin step. Pair lookups return only the public pool.

A Liquidity Vault, in which a market maker manages one provider’s liquidity across bins, can use either kind of pool.

Supported Tokens

Pools pair two standard SIP-010 tokens in their native units. Tokens whose transfer moves native STX are registered before listing, so the pool moves them with an STX allowance. Fee-on-transfer and rebasing tokens are not supported: a transfer that moves a different amount from the one requested reverts.

Providing Liquidity

Last updated on