Automated Market Makers (AMMs)
Understand AMMs, constant-product curves, concentrated liquidity, arbitrage, fees, price impact and DEX execution risk.
Reading progress — saved on this device
An AMM prices swaps against assets held in smart-contract liquidity pools. Instead of waiting for a buyer and seller to submit matching orders, the pool's mathematical rules and current inventory create a continuously available quote.
Core concept
A trader swaps directly against pool inventory. In a classic two-asset constant-product AMM, reserves are linked by a relationship such as:
When a trader adds one asset and removes the other, the reserve ratio changes. That creates a new marginal price. Larger trades move farther along the curve and therefore cause greater price impact.
Other AMMs use stableswap curves, weighted pools or concentrated-liquidity ranges, but the central idea remains: execution is a function of the pool's available inventory and rules.
Pricing, fees and arbitrage
- Pool prices can diverge from broader markets because trades change reserve ratios.
- Arbitrageurs trade against the discrepancy and tend to bring the pool back toward external prices.
- Swap fees are paid according to protocol rules and may accrue to LPs, the protocol or both.
- Price impact is endogenous to the trade size relative to active liquidity.
- Slippage tolerance is a transaction protection setting; it does not eliminate expected curve impact.
Classic versus concentrated liquidity
| Feature | Classic full-range pool | Concentrated liquidity |
|---|---|---|
| LP range | Capital supports all possible prices | LP selects price interval(s) |
| Capital efficiency | Lower near current price | Potentially much higher |
| Position management | Simpler | Can go out of range |
| Headline TVL | Broadly distributed | Active depth depends on range placement |
How much active liquidity exists around the current price for my trade size?
Are fees sufficient to compensate for inventory changes, range management and token/contract risk?
Worked example
A simplified pool begins with 100 ETH and £200,000 stablecoin, so the reserve ratio implies about £2,000 per ETH before fees. The constant product is 20,000,000.
If a trader buys ETH from the pool, stablecoin enters and ETH leaves. The next unit of ETH becomes more expensive because the ratio has moved. A £1,000 trade causes modest movement; a £50,000 trade consumes a much larger share of the pool and has much larger price impact.
After the pool price moves above other venues, arbitrageurs may sell ETH into the pool and buy it elsewhere, moving the AMM back toward the external market.
Common mistakes and misunderstandings
- Treating the displayed spot price as the price for the entire trade.
- Assuming TVL is evenly useful at every price.
- Ignoring fake or malicious token/pool contracts.
- Calling LP fee yield risk-free income.
- Confusing slippage tolerance with expected price impact.
Knowledge checkpoint
- Why does price impact grow as trade size becomes large relative to active liquidity?
- What role does arbitrage play after a pool price diverges from external venues?
- Why can concentrated liquidity make headline TVL a weak proxy for current-price depth?
- Why does raising slippage tolerance not create more liquidity?
FAQ
❓ Does an AMM need an order book?
No. The pool state and formula can quote trades directly.
❓ What is impermanent loss?
It is LP under/over-performance relative to simply holding, driven by pool rebalancing and prices.
❓ Is an AMM price an oracle?
Not automatically. Spot pools can be manipulated or temporarily distorted.
❓ Can swaps fail?
Yes. Slippage bounds, gas and state changes can cause failure.
Summary
- AMMs quote swaps from pool inventory and deterministic rules.
- Trade size relative to active liquidity drives price impact.
- Arbitrage links AMM prices to external markets.
- Execution quality includes contract, gas and MEV risk as well as quoted price.
This building block is educational and not a trade recommendation.
Want this in a personalised order?
Take the crypto assessment and get a custom path of 10 modules matched to what you already know. Free, no card required.
Build my path →