AMM Design

Automated Market Maker (AMM) design is the set of mathematical rules governing how a decentralized liquidity pool operates — determining prices, slippage, LP returns, and capital efficiency. Unlike order book exchanges (Binance, Coinbase) where buyers and sellers are matched, AMMs use algorithms to price trades based on the ratio of tokens in a pool. The AMM design space has evolved rapidly since Uniswap’s 2018 launch: constant product AMMs (x·y=k), while elegant, waste most LP capital on prices far from the current market. Curve’s stableswap allows near-zero slippage for pegged assets. Uniswap v3 concentrated liquidity improves capital efficiency by 4,000x for narrow ranges. Balancer’s weighted pools support non-50/50 ratios. Each design optimizes different trade-offs: capital efficiency, gas efficiency, LP IL exposure, and slippage for different asset types.


Major AMM Designs Compared

Design Formula Best For Capital Efficiency IL Risk
Constant product (v2) x·y = k General pairs Low Moderate
Concentrated liquidity (v3) x·y = L² within range Active LP pairs Very high High (out-of-range)
StableSwap (Curve) x + y = k + amplified term Pegged assets High within peg Near-zero (within peg)
Weighted pools (Balancer) x^wx · y^wy = k Custom exposure ratios Moderate Varies with weights
CPMM (Balancer Gyroscope) Dynamic weights Resilient liquidity High Lower than v2

Constant Product AMM (Uniswap v2)

The simplest and most important formula: x · y = k

  • x = token A quantity, y = token B quantity, k = constant
  • Price = y/x at any point
  • Buying token A: remove Δx → y must increase → price rises (slippage)
  • Liquidity perfectly uniform from 0 to ∞ → capital very inefficient
  • LP earns fees proportional to pool share, regardless of price movement

StableSwap (Curve)

Curve uses a hybrid formula that behaves like constant-sum (zero slippage, ideal) near the peg and constant-product (stable, prevents pool drain) far from it:

$$A cdot n^n sum x_i + D = A cdot D cdot n^n + frac{D^{n+1}}{n^n prod x_i}$$

Where A is the amplification factor (higher A = more stable near peg, more IL far from peg) and D is virtual total liquidity. This enables stablecoin swaps with 0.01-0.04% slippage on large trades — impossible with constant-product.


AMM Design Considerations

Consideration Trade-off
Capital efficiency Higher efficiency → narrower sweet spot
Gas cost Complex formulas → more gas per trade
LP management Efficient AMMs require more active management
Oracle manipulation Thin pools vs. narrow ranges → more oracle risk
Composability AMM pools often used as on-chain price oracles

Emerging Designs

  • Gyroscope: Dynamic stability mechanism combining StableSwap with circuit breakers
  • SFPM (Panoptic): Options-style LP positions as synthetic derivatives
  • vAMM (Perpetual Protocol): Virtual AMM for perpetuals without real LP capital
  • CLAMM: Concentrated Liquidity AMM variants on various L1s

Common Misconceptions

  • “Concentrated liquidity (Uniswap V3) is always better for LPs.” — High concentration dramatically increases fee yield within range, but massively amplifies impermanent loss when prices move out of range. Passive retail LPs frequently perform worse in V3 than they would in V2 without active range management.
  • “All AMMs work the same way.” — Constant product, StableSwap, concentrated liquidity, and weighted pool designs have fundamentally different capital efficiency, IL exposure, and optimal use cases. Using the wrong AMM type for an asset pair leads to poor LP returns and high slippage.

Social Media Sentiment

  • r/DeFi: AMM design debates are common — concentrated liquidity vs. passive LP performance is a recurring topic, as are new AMM innovations from Curve V2, Balancer, and Ambient.
  • X/Twitter: DeFi researchers and protocol devs frequently publish threads comparing AMM curve designs. Uniswap V3 is considered the technical standard; V4 hooks are generating ongoing developer excitement.
  • Discord (protocol communities): Detailed technical comparisons of LP strategies across different AMM types; highly quantitative discussions.

Last updated: 2026-04


Related Terms

See Also

  • AMM — overview of automated market makers as a category
  • Curve Finance — protocol that pioneered the StableSwap AMM design
  • Uniswap V3 — protocol that introduced concentrated liquidity AMM design
  • DEX — decentralized exchanges that implement AMM designs

Sources