Ecosystem
Slippage, price impact and MEV: what happens between clicking “Swap” and getting your tokens
· 4 min read

You find a token on a decentralized exchange, type in an amount and see a quote. You click Swap, confirm in your wallet, and a few seconds later the tokens arrive. Sometimes you get slightly less than the quote. Occasionally the transaction fails outright.
Neither is a bug. Both come from how public blockchains process transactions. Once you understand three ideas, price impact, slippage and MEV, you can set up every swap so you keep more of what you trade.
1. Price impact: your own trade moves the price
Most DEXs price tokens with a liquidity pool: two tokens held in a smart contract, priced by the ratio between them. When you buy one token from the pool, you add the other. That shifts the ratio, so each extra unit you buy costs a little more than the last.
That shift is price impact. It depends on two things:
- Your trade size. A bigger trade moves the ratio more.
- The pool's depth. The same trade barely moves a deep pool but can swing a shallow one sharply.
Price impact is known before you sign. Most DEX interfaces show it next to the quote. If it reads several percent, your order is large relative to available liquidity. You can split the trade into smaller pieces, or use a DEX aggregator that routes it across several pools.
2. Slippage: the price changes while you wait
Your quote is a snapshot of the pool at the moment you clicked. Your transaction then waits to be included in a block. That can take seconds, or longer when the network is busy. Meanwhile, other traders swap in the same pool and the price moves.
Slippage is the gap between the price you were quoted and the price you actually got. To cap it, every swap carries a slippage tolerance: the worst price you will accept, written into the transaction itself.
| Tolerance | What happens | Best for |
|---|---|---|
| Low (about 0.1–0.5%) | Better protection; more failed swaps if the price moves | Stablecoin pairs and deep, liquid pools |
| Medium (about 0.5–1%) | A balance of protection and success rate | Most major token pairs |
| High (3% and up) | The swap rarely fails, but you may get a much worse price | Very volatile or thin markets, used with care |
If the price moves beyond your tolerance, the smart contract reverts the swap. You keep your tokens, but you may still pay the network fee for the failed attempt.
3. MEV: when someone else profits from your swap
On many blockchains, pending transactions sit in a public waiting area called the mempool. Anyone can watch it. Block producers, and the bots that work with them, can also choose the order of transactions in a block. The profit they make from that ordering is called maximal extractable value (MEV).
Some MEV is harmless. Arbitrage bots, for example, keep prices aligned across exchanges. The kind that hurts traders is the sandwich attack:
- A bot spots your pending swap and the slippage tolerance you set.
- It places a buy just before yours, pushing the price up.
- Your swap executes at the worse price, still inside your tolerance.
- The bot sells right after you and pockets the difference.
The transaction succeeds, so nothing looks wrong. You simply received fewer tokens than you should have. This is why a high slippage tolerance is risky: it tells bots exactly how much room they have to work with.
How to protect your swaps
- Keep tolerance as tight as the market allows. Start low and raise it only if a swap fails.
- Check price impact before you sign. Treat anything above 1–2% on a major pair as a warning sign.
- Use an aggregator. Splitting a route across pools lowers price impact and often improves the final price.
- Use MEV protection. Some wallets and DEXs send transactions through private channels instead of the public mempool, so bots can't see them in advance.
- Trade on Layer 2s where it fits. Lower fees make failed transactions cheaper. MEV exposure still varies by network. More in Layer 2s explained.
- Avoid thin pools for large orders. Split big trades into smaller ones over time.
- Watch the minimum received. Most interfaces show the least you will get after slippage. That number, not the headline quote, is your real worst case.
The takeaway
Price impact is the cost of the liquidity you take. Slippage is the cost of time. MEV is the cost of being visible. You can't remove all three, but a tight tolerance, a good route and a protected transaction will keep each one small.
Disclaimer: These materials are for general information purposes only and do not constitute financial, investment, tax, or legal advice, nor a recommendation or solicitation to buy, sell, stake, or hold any crypto-asset. LCX Liberty Labs will not undertake efforts to increase the value of any crypto-asset that you buy. Crypto-assets are highly volatile and you may lose your entire investment. Past performance is not indicative of future results. Some crypto products and markets are unregulated, and you may not be protected by government compensation or regulatory protection schemes.