What Is AMM in Crypto?

An automated market maker (AMM) is a DEX that prices trades against a pool of assets using a deterministic formula, rather than matching buyers and sellers via an order book. Uniswap, Curve, Balancer, and PancakeSwap are the dominant examples. AMMs made on-chain trading practical — they let anyone be a market maker just by depositing into the pool.

Also known as: automated market maker, constant-product market maker

Ask Stingray anything about AMM

How AMMs price trades

The breakthrough formula is Uniswap V2’s constant product: x × y = k. The pool holds x of token A and y of token B. Any swap must preserve k (minus the fee). So if you buy 1 A, the pool gives you less of B than a linear-proportion swap would suggest — the curve compresses as you trade larger sizes against a fixed pool.

Example: pool has 100 ETH and 300,000 USDC. k = 30,000,000. You buy 10 ETH:

  • New pool: 90 ETH and 333,333 USDC (so that k is preserved).
  • You paid 33,333 USDC for 10 ETH — an effective price of $3,333 per ETH, vs the $3,000 spot at the start.
  • The “price impact” of 11% is what your trade cost above mid-price.

Different AMM families use different curves:

  • Curve (StableSwap) — a nearly-flat curve between $1 stables, so slippage is tiny for in-range trades.
  • Uniswap V3 — LPs provide liquidity within a chosen price range (concentrated liquidity). Capital-efficient; more active management needed.
  • Balancer — weighted pools with more than 2 tokens.

Why AMMs matter

AMMs solved the bootstrapping problem of on-chain DEXs: you don’t need market makers, you just need someone to seed a pool. This enabled the long tail of token markets — a project can launch with a Uniswap pool and instant liquidity, rather than begging an exchange for a listing. It’s also the primary yield source for DeFi LPs and the venue that drives most on-chain DEX volume.

Risks and considerations

  • Impermanent loss — the structural cost of LP’ing against a volatile pair.
  • Sandwich MEV — swappers are front-run and back-run; tight slippage tolerance is the main defense.
  • Low-liquidity manipulation — an AMM pool with $100k TVL can be fully drained by a $500k trade, and the price impact allows governance-token-based attacks (borrow collateral against inflated token price, for example).
  • Smart-contract risk — AMM contracts have been exploited through re-entrancy, integer overflow, and flawed fee-math. Established pools (Uniswap V2/V3, Curve mainnet) have battle-tested codebases; new forks on emerging chains often have not.

Understanding AMM mechanics is a prerequisite for both trading on DEXs (where slippage comes from) and for providing liquidity (where IL comes from). Treat pool depth, fee tier, and volatility regime as inputs before deciding either side.

Related terms