What is slippage, and how do you avoid it?
You click buy expecting the price on the screen, and the order fills a little worse. That difference is slippage. On a busy instrument it is a fraction of a cent. On a thin one, or on a decentralized exchange with the wrong setting, it can be the biggest cost of the trade, and part of it can end up in someone else’s pocket. This lesson shows how big it really gets, on exchanges and on DEXs, and how to keep it small.
What you’ll learn
- How slippage grows with your size on an exchange, with real numbers
- How a DEX prices a trade without an order book, and why the pool’s size decides your slippage
- How a sandwich attack works, and why your slippage tolerance is its budget
- A checklist to measure and limit slippage before you trade
On an exchange: slippage grows with your size

On Binance or Bybit your order meets an order book. A market order takes the best price first and, if your size is bigger than what waits there, walks to the next prices (price, then time). So slippage on an exchange has two causes: your size, and how thin the book is.
The chart walks real market buys through two real books at the same minute:
- Tesla: 10,000 USDT fills on average 0.005% above the best ask. Even 100,000 USDT slips only 0.035%.
- Twist Bioscience: the same 10,000 USDT slips 0.39%; 100,000 slips 3.4%.
Same exchange, same minute, a hundred times more slippage. The book decides, and you can read it before you click: add up the asks until you reach your size, and the last price you need is roughly where your order ends.
Slippage can also be in your favour. If the price moves your way while your order is on its way, a market order can fill better than you saw, and a limit order always fills at your price or better.
On a DEX: a pool and a formula

A decentralized exchange (DEX) such as Uniswap has no order book. You trade against a liquidity pool: two tokens locked in a contract, here WETH and LINK. The price is simply the ratio of the two balances. In the simplest pools, the two balances multiplied together must stay the same:
When you buy LINK, you add WETH and take LINK out. LINK gets scarcer in the pool, so each next LINK costs more. Your own trade moves the price against you: that is price impact, and on a DEX it is where slippage comes from.

How much depends on the pool’s size compared with your trade. In the real pools above, a $10,000 swap costs:
- 0.4% in the $20.3 million USDC/WETH pool (most of it the 0.3% pool fee),
- 1.6% in the $1.5 million LINK/WETH pool,
- 15% in the $114 thousand CRV/WETH pool.
Most swap screens show the price impact before you confirm. Read it. If it is several percent, the pool is too small for your size.
Slippage tolerance, and how a sandwich attack works
Because the price can change between clicking and confirming, a DEX asks for a slippage tolerance: how much worse than the quote you accept before the swap cancels.

That setting has a catch. On a public blockchain your swap waits for a few seconds where anyone can see it, including its tolerance. A bot can use that window for a sandwich attack:

- The bot buys first, just ahead of your swap, pushing the price up exactly as far as your tolerance allows.
- Your swap fills at that worse price. Nothing fails, because you said you would accept it.
- The bot sells right after you, at the higher price your own buy created.
On a $10,000 swap into the real LINK pool with a 1% tolerance, you receive 744.7 LINK instead of 752.2: about $100 less. The bot keeps about $78 before gas, and the pool fees take the rest.

The wider the tolerance, the bigger the prize: at 5%, the same swap can lose $500. Your tolerance is the bot’s budget.
How to trade a DEX without feeding the bots
- Keep the tolerance tight. Use the smallest setting your swap fills with; around 0.5% on deep pools. If a swap keeps failing at a tight setting, the pool is moving or too thin, which is a warning in itself.
- Trade deep pools, or smaller sizes. Price impact and sandwich profits both grow with your size relative to the pool. Split a large swap into smaller ones, or pick the deeper pool.
- Read the price impact line before you confirm. Several percent means stop.
- Keep your swap private. Some wallets and DEX aggregators offer private or MEV-protected routes that send your transaction straight to block builders instead of the public waiting area, so bots cannot see it in advance. Check what your wallet supports.
How to limit slippage on an exchange
- Read the book first and compare your size with what waits near the price (bid and ask explained).
- Enter with a limit order at your level instead of chasing with a market order (types of orders).
- Split large orders into smaller ones over time.
- Avoid thin moments: news, the first seconds of a sharp move, nights and weekends.
- Choose the deeper venue when the same instrument trades on more than one exchange.
- For stops, plan for it: allow 5 to 10% of your stop distance for slippage, as in types of orders.
What most traders miss.
Your tolerance is public. On a DEX, the slippage you are willing to accept is visible while your swap waits. Setting it wide is not caution; it is an invitation.
Slippage is mostly self-inflicted. On both kinds of venue, the biggest share comes from your own size against the available liquidity. Halving the size, or picking a deeper book or pool, often does more than any setting.
A limit is a tolerance you choose. On an exchange a limit order caps your price; on a DEX the tolerance does the same job. Either way, decide your worst acceptable price before you click, not after.
Common mistakes
- Sending a market order without looking at the book. Read the depth near the price first.
- Leaving a DEX tolerance on a wide setting. Use the tightest setting that fills, and never more than you are prepared to give away.
- Swapping large amounts into small pools. Check the price impact; split the swap or use a deeper pool.
- Assuming slippage is only bad luck. It is mostly size against liquidity, and you control both.
Key takeaways
- Slippage is the gap between the expected and the actual price; it can occasionally be in your favour.
- On an exchange it grows with your size and the thinness of the book: 0.005% on Tesla against 0.39% on Twist Bioscience for the same 10,000 USDT.
- On a DEX, price impact comes from the pool formula: 0.4% in a $20 million pool against 15% in a $114 thousand one for the same $10,000.
- A sandwich attack takes up to your slippage tolerance; keep it tight, trade deep pools, and keep swaps private when you can.
Lesson test · 9 questions
Check yourself
Can you pass on the first try?
Passing the test completes this lesson. Tests in a module open in order, each after the one before it. A first-try pass scores 100%. Each wrong answer costs 10 points, and every 10 wrong answers lock the test for 30 minutes. Once you pass, your score is final, except that a score of 50 or less can be retaken once.
-
What is slippage?
-
The same 10,000 USDT market buy slips 0.005% on Tesla and 0.39% on Twist Bioscience, at the same minute. What explains the difference?
-
Can slippage ever be in your favour?
-
Why does a swap on a DEX move the price against you, even with no other traders active?
-
A $10,000 swap costs about 0.4% in a $20 million pool. What would you expect in a $114 thousand pool?
-
In a sandwich attack, what does the bot do?
-
You swap $10,000 with a 5% slippage tolerance. What is the most a sandwich attack can take from you?
-
Which is a real defence against sandwich attacks?
-
On an exchange, which habit limits slippage most directly?
Free account
Take the test and keep your score
- Your answers are checked and every lesson you pass is marked complete.
- Your scores build into your course score, on any device.
- You come straight back to this question after signing up.
Next: what liquidity is, and why some markets move smoothly. Or read where the order book is deep enough on ChartThread’s levels page.
Terms in this lesson
Related lessons
Educational content, not financial advice. Trading carries a risk of loss.