Glossary · A
AMM (Automated Market Maker)
A type of decentralised exchange protocol that uses a mathematical formula — typically x × y = k — to price tokens in a liquidity pool, rather than an order book of buyers and sellers. Users trade directly against the pool. Uniswap, Curve, and Balancer are AMMs.
Last updated
How AMM works in practice
An AMM replaces the order book with a formula. Rather than matching a buyer to a seller, it holds reserves of two assets and quotes a price derived from their ratio, so a trade is always available at some price — the question is how good that price is. The constant-product design (x·y=k) is the most common: it can quote any size, but the price it quotes degrades as the trade grows relative to the pool.
Worked example
A pool holds 100 ETH and 300,000 USDC, so k = 30,000,000 and the marginal price is 3,000 USDC per ETH. Buying 10 ETH leaves 90 ETH in the pool, so USDC reserves must rise to 30,000,000 ÷ 90 = 333,333 — you pay 33,333 USDC, an average of 3,333 per ETH. That 11% above the quoted price is price impact, and it is a function of your size against the pool's depth, not a fee.
Figures are illustrative and chosen to be checkable, not live market data.
The mistake that costs people money
Treating the displayed price as the price you will get. The quoted rate is the marginal price for an infinitesimal trade; your fill is the average along the curve. On a thin pool, a large order can move the price against you far more than the trading fee ever costs.
Learn more
AMM: common questions
- What is AMM?
- A type of decentralised exchange protocol that uses a mathematical formula — typically x × y = k — to price tokens in a liquidity pool, rather than an order book of buyers and sellers. Users trade directly against the pool. Uniswap, Curve, and Balancer are AMMs.
- How does AMM work in practice?
- An AMM replaces the order book with a formula. Rather than matching a buyer to a seller, it holds reserves of two assets and quotes a price derived from their ratio, so a trade is always available at some price — the question is how good that price is. The constant-product design (x·y=k) is the most common: it can quote any size, but the price it quotes degrades as the trade grows relative to the pool.
- Can you give an example of AMM?
- A pool holds 100 ETH and 300,000 USDC, so k = 30,000,000 and the marginal price is 3,000 USDC per ETH. Buying 10 ETH leaves 90 ETH in the pool, so USDC reserves must rise to 30,000,000 ÷ 90 = 333,333 — you pay 33,333 USDC, an average of 3,333 per ETH. That 11% above the quoted price is price impact, and it is a function of your size against the pool's depth, not a fee.
- What do people get wrong about AMM?
- Treating the displayed price as the price you will get. The quoted rate is the marginal price for an infinitesimal trade; your fill is the average along the curve. On a thin pool, a large order can move the price against you far more than the trading fee ever costs.