Swaps and pools
Trading against a pool instead of a person.
Animation is off, so this lesson is a plain page: one still picture and a few sentences for each step. Turn animation on in the menu to watch it play.
Step 1 of 5
A pool of two tokens
On a decentralised exchange, a pool holds two tokens supplied by other people: here, 10 ETH and 20,000 USDC.
Scroll, swipe, use the arrow keys or press the buttons. The scene follows you.
Step 1 of 5
A pool of two tokens
On a decentralised exchange, a pool holds two tokens supplied by other people: here, 10 ETH and 20,000 USDC.
Step 2 of 5
You swap against the pool
To swap, you put one token in and take the other out. Nobody has to be on the other side: a program on the blockchain does the trade.
Step 3 of 5
The pool's rule
The pool keeps its two balances, multiplied together, the same before fees. This constant-product rule is how Uniswap's original (v2) pools set the price.
Step 4 of 5
Bigger swaps, worse prices
Put in 1,000 USDC with a 0.30% fee and you get 0.4748 ETH, not the 0.5 that the starting price suggests. The bigger the swap compared with the pool, the worse the price. Try it below.
Try it
You get 0.4748 ETH. At the starting price it would be 0.5000 ETH, so you lose 5.0% to price impact and the fee.
Step 5 of 5
What can go wrong
Others can see your swap before it is final and trade around it. These sandwich attacks cost traders on Ethereum about $60 million in the year to October 2025. A slippage limit caps how bad a price you accept.
Example numbers with a 0.30% pool fee, not live prices.
Quick check
Did it stick?
2 questions. Get them right to complete the lesson.
Or skip ahead to lesson 8: Staking.
Sources
Checked 4 October 2026- Uniswap v2 Core whitepaperUniswap
- On a decentralised exchange, a pool holds two tokens supplied by other people.
- You swap against the pool, and a program on the blockchain does the trade.
- The pool keeps its two balances, multiplied together, from falling; before fees the product stays the same.
- This constant-product rule is how Uniswap's original (v2) pools set the price.
- Put 1,000 USDC with a 0.30% fee into a pool of 10 ETH and 20,000 USDC and you get 0.4748 ETH, not 0.5 (arithmetic from the whitepaper's rule).
- The bigger the swap compared with the pool, the worse the price.
- Maximal Extractable Value: implications for crypto marketsEuropean Securities and Markets Authority
- Others can see your swap before it is final and trade around it (a sandwich attack).
- Exclusive data from EigenPhi reveals that sandwich attacks on Ethereum have wanedCointelegraph Research
- Sandwich attacks cost traders on Ethereum about $60 million in the year to October 2025.
- Uniswap v2 pricingUniswap documentation
- A slippage limit caps how bad a price you accept.
Corrections to this lesson: none so far. Spotted something wrong? See how we check facts on the sources page.