Skip to Content
Stacks Pools

Whitepaper

The Zest Protocol CLMM whitepaper: the bin model, the deposit fee and the integer implementation on Stacks, with proofs.

Abstract

Concentrated liquidity lets a provider commit capital to a bounded price range. Zest CLMM, an automated market maker for Stacks, partitions liquidity into a fixed geometric grid of bins, each with its own bounded constant-product curve and fungible shares. Liquidity and price are derived from a bin’s reserves, retained fees compound into those reserves, and a deposit that changes a bin’s composition is charged the swap fee on the exchange implied by adding and immediately redeeming liquidity. The paper presents the model, proves its liquidity and valuation properties, and describes a Clarity implementation on 128-bit integers whose liquidity estimates err only downward, by at most 2⁻⁵⁶ of the exact value plus one frame-liquidity unit.

What the Paper Covers

SectionContents
IntroductionThe three contributions: reserve-derived bins, the deposit fee and conservative integer execution
Related WorkUniswap v3, Liquidity Book and DLMM, Maverick v2, Bitflow HODLMM, and loss-versus-rebalancing
Discrete LiquidityPrice intervals on a geometric grid, liquidity derived from reserves, and how much capital it concentrates
SwapsExecution within a bin, fees and the liquidity provider share, and routing across bins
Liquidity AccountingShares, the exchange implicit in a deposit, deposit fees and share issuance, and private pools
Implementation on StacksNormalized price coordinates, conservative liquidity evaluation, exact multiword arithmetic and routes
Risks and LimitationsRisks for liquidity providers, traders and tokens, numerical limits, governance and review status
Appendices A to DProofs of the liquidity properties and integer bounds, the finite-word error bound, and route benchmarks

Scope

The paper describes the Zest Protocol CLMM contracts at commit 258021b, which includes the fixes from the Clarity Alliance audit . The paper does not cover Liquidity Vaults, cross-chain bridging or off-chain route selection.

For how pools behave in practice, start with How Concentrated Liquidity Works. The contract functions are listed under Contracts.

Last updated on