Обратно към базата знания
DeFiПоследна актуализация:

Automated Market Makers (AMMs)

A type of decentralised exchange that uses mathematical formulas and liquidity pools instead of traditional order books to enable permissionless token trading on-chain.

AMMUniswapliquidity poolsDEXconstant product

Automated Market Makers (AMMs)

An AMM is a smart contract that holds reserves of two or more tokens in a liquidity pool and uses a mathematical formula to determine exchange rates. Instead of matching buyers and sellers through an order book, anyone can trade against the pool at any time — and anyone can provide liquidity by depositing tokens.

How They Work

The most common AMM model is the constant product formula (x × y = k), pioneered by Uniswap:

  1. A liquidity pool holds reserves of two tokens (e.g. ETH and USDC)
  2. The product of the reserves must remain constant after each trade
  3. Larger trades move the price more (slippage), creating a natural price curve
  4. Liquidity providers (LPs) deposit equal value of both tokens and earn trading fees
  5. Prices adjust automatically based on supply and demand

Key AMM Designs

  • Uniswap v2/v3 — constant product with concentrated liquidity (v3)
  • Curve — optimised for stablecoin-to-stablecoin swaps with minimal slippage
  • Balancer — weighted pools supporting multiple tokens with custom ratios
  • GMX — oracle-based pricing for perpetual futures trading

Why They Matter

AMMs solved the liquidity bootstrapping problem for decentralised exchanges. Before AMMs, on-chain order books were too slow and expensive. AMMs enable:

  • Permissionless trading — any token can be listed by creating a pool
  • Passive income — LPs earn fees proportional to their share of the pool
  • Composability — other protocols can build on top of AMM liquidity
  • Price discovery — on-chain prices that other protocols can reference

Risks

  • Impermanent loss — LPs can lose value relative to simply holding tokens when prices diverge
  • Smart contract risk — vulnerabilities in pool contracts can lead to fund loss
  • MEV — miners/validators can extract value by reordering transactions (sandwich attacks)
  • Low liquidity — small pools have high slippage, making large trades expensive

The Evolution

AMMs have evolved from simple constant-product pools to sophisticated financial primitives. Concentrated liquidity (Uniswap v3), dynamic fees, and oracle-integrated designs represent the maturation of on-chain market making — increasingly competitive with centralised exchange liquidity.