Constant Product Market Maker (CPMM)
A Constant Product Market Maker (CPMM) is the simplest and most widely used AMM formula, defined by the invariant x * y = k, where x and y are the reserves of two tokens and k remains constant through a trade (ignoring fees). This formula creates a hyperbolic price curve: as more of token X is bought from the pool, its reserve decreases, its price increases, and slippage grows. CPMM pools are always liquid — there is always a price at which a trade can execute, unlike an order book where a gap in resting orders can make execution impossible. The tradeoff is that liquidity is spread across the entire price curve, meaning most capital sits at prices far from the current market rate. Uniswap V1 and V2 used CPMMs exclusively; V3 and later AMMs use concentrated liquidity to improve capital efficiency while retaining the CPMM formula within each tick interval.