Liquidity pools & AMMs
Trading without an order book.
An automated market maker (AMM) replaces the order book with a ‘pool’ of two assets. A formula (often x·y=k) sets the price from the balances. Liquidity providers deposit both assets and earn a share of fees.
This powers decentralised exchanges (Uniswap, Curve). In exchange for fees, providers are exposed to ‘impermanent loss’.
- Asset pool vs order book
- Price set by formula (x·y=k)
- Fees vs impermanent loss
Selling 10 ETH into a 100 ETH pool
A pool holds 100 ETH and 200,000 USDC (quoted price $2,000). You sell 10 ETH at once.
- 01Constant k100 × 200 00020,000,000
- 02USDC received (no fee)200 000 − k / (100 + 10)18,182
- 03Average price obtained$1,818.18
- 04Price impact1 − prix moyen / 2 0009.09 %
- 05USDC received with the 0.30% fee18,132
An order worth 10% of the pool costs about 9.1 % in impact. A pro splits the order, routes through an aggregator or sets a tight slippage tolerance.
Questions and answers
What is a liquidity pool?
A contract that holds two tokens and lets you swap one for the other at a price set by their ratio.
Why does a large order cost more?
It shifts the token ratio in the pool a lot, and so the price: that is price impact.
Test your understanding with a quick interactive quiz.