What Is Slippage in DeFi? Why Swap Prices Change and How to Set Limits
Learn what slippage means on decentralized exchanges, why high slippage settings expose you to sandwich attacks, and how to choose sensible slippage limits.
When swapping tokens on a decentralized exchange like PancakeSwap or Uniswap, you will see a small gear icon labeled Slippage Tolerance (often set to 0.5% by default). Sometimes a swap goes through smoothly; other times it fails with an error telling you to increase slippage.
Knowing what slippage actually measures—and why blindly raising it to 12% or 20% can cost you money—is essential for navigating DeFi safely.
What Is Slippage?
Slippage is the difference between the quoted price you see when you click “Swap” and the actual execution price settled when your transaction is confirmed in a blockchain block.
Because blockchains process transactions in discrete blocks (every few seconds) while other traders are simultaneously interacting with the same liquidity pool, the pool’s reserve ratio can shift between the moment you submit a trade and the moment it executes.
Slippage vs. Price Impact
People often use these two terms interchangeably, though they describe slightly different effects:
- Price Impact: The predictable price shift caused directly by the size of your own trade relative to the pool’s liquidity depth.
- Slippage Tolerance: Your maximum safety limit for unexpected price movement occurring while your transaction waits to confirm. If the final price moves worse than your tolerance, the smart contract automatically reverts the swap to protect you.
Why Some Tokens Require Higher Slippage
Standard tokens with zero transfer tax (like ETH, BNB, USDC, or major DeFi tokens) usually swap cleanly at 0.1% to 0.5% slippage in deep pools.
However, you may encounter failed swaps at 0.5% for three main reasons:
- Transfer-Tax Tokens: Some BEP-20 or ERC-20 tokens automatically deduct a built-in protocol tax (for instance, a 3% marketing or burn fee) on every buy and sell. Your slippage tolerance must be set slightly above the token’s transfer tax so the router accepts the reduced output amount.
- Extreme Volatility: During sudden news spikes, dozens of swaps hit the same pool within a single block, shifting prices faster than
0.5%. - Thin Liquidity Pools: Small-cap tokens with shallow pools swing sharply on even modest trades.
The Hidden Danger of High Slippage: MEV Sandwich Attacks
Setting slippage casually to 10% or 25% just to “force a swap through” opens the door to automated trading bots known as MEV (Maximal Extractable Value) sandwich bots.
Here is how a sandwich attack works inside a single block:
- A bot spots your pending swap in the public mempool with a wide
10%slippage limit. - Front-run: The bot pays a slightly higher gas fee to buy the token immediately before your transaction, pushing the pool price up to the edge of your
10%limit. - Your Swap Executes: Your trade fills at a price nearly 10% worse than quoted—still within the tolerance you allowed.
- Back-run: Immediately after your transaction, the bot sells its tokens back into the pool, pocketing the price difference straight from your trade.
Sensible Slippage Guidelines
| Pair Type | Typical Reasonable Tolerance | Notes |
|---|---|---|
| Stablecoin to Stablecoin (e.g., USDC/USDT) | 0.05% – 0.1% |
Deep pools move very little |
| Major Pairs (e.g., ETH/USDC, BNB/USDT) | 0.3% – 0.5% |
Keeps MEV sandwich exposure minimal |
| Mid-Cap / Volatile Tokens | 0.5% – 1.5% |
Increase gradually only if needed |
| Taxed Tokens | Tax % + 0.5% – 1% |
Verify exact tax in contract first; beware hidden high taxes |
Warning: If an unfamiliar token refuses to swap even at
5%–10%slippage, stop immediately and inspect the smart contract—it may have an undisclosed high sell tax or be a honeypot token.
Key Takeaway
Think of slippage tolerance as your price-protection guardrail. Keep it as tight as practical for the pool you are using, check price impact warnings before confirming, and never set double-digit slippage blindly.