Disclosure: This post contains affiliate links; we may earn a commission at no extra cost to you.
Every DeFi trader eventually gets sandwiched, and most don't realize it happened until they check the transaction on Etherscan and see two strangers' trades wrapped around their own. Slippage and MEV (Maximal Extractable Value) are two different problems that show up as the same symptom: you got a worse price than the screen promised. Here's what's actually happening and what you can do about it.
Slippage: the honest version
Slippage is the gap between the price a decentralized exchange quotes you and the price you actually get filled at. On an automated market maker like Uniswap, prices move along a bonding curve (the classic x*y=k formula), so your own trade pushes the price against you as it executes — the bigger the trade relative to the pool's liquidity, the worse the impact. A $200 swap on a $5M ETH/USDC pool barely moves the needle. A $200 swap on a thinly traded new token's $30,000 pool can move the price 5-10% against you before the transaction even confirms.
Wallets like MetaMask and Phantom let you set a slippage tolerance (often defaulting to 0.5-1%). That tolerance is a safety rail, not a guarantee of a good price — it just caps how much worse than quoted you're willing to accept. Set it too tight on a volatile or illiquid token and your transaction fails outright (wasting gas). Set it too loose — 10%, 15%, which some traders do out of frustration on low-liquidity tokens — and you've just opened the door to the second problem.
MEV: the part slippage tolerance doesn't protect you from
MEV is the profit a block builder or “searcher” bot can extract by reordering, inserting, or censoring transactions within a block. The most common retail-facing version is the sandwich attack. A bot watches the public mempool, sees your pending swap, and if your slippage tolerance leaves room, does this:
- Front-run: the bot buys the same token right before your trade, pushing the price up.
- Your trade executes at the now-worse price, right up near the edge of your slippage tolerance.
- Back-run: the bot immediately sells into the price you just paid up to, pocketing the difference.
You didn't get hacked and nothing was stolen from your wallet — you just paid the bot's spread. Research groups tracking this (EigenPhi and Flashbots' own transparency data) have put cumulative extracted MEV across Ethereum in the billions of dollars since 2020, with sandwich attacks and arbitrage making up the bulk of it. Individual sandwiches are usually small — often in the $5-$50 range on a retail-sized trade — but they're constant, and on a large or illiquid-token swap a single sandwich can run into the hundreds of dollars.
Slippage vs. MEV, side by side
| Factor | Slippage | MEV (sandwich attacks) |
|---|---|---|
| Root cause | Trade size vs. pool liquidity depth | Bots watching the public mempool for your pending trade |
| Who's involved | Just you and the AMM's math | A searcher bot + the block builder that includes its transactions |
| Typical size | 0.1%-10%+ depending on pool depth | Often $5-$50 on retail trades, more on large or illiquid swaps |
| Fixable by tighter slippage tolerance? | Yes — that's the whole control | Only partially — tight tolerance limits the bot's room but doesn't stop the attack |
| Best mitigation | Trade on deep-liquidity pools; split large orders | Private mempool / MEV-protected RPC |
How to actually reduce what you lose
Use an MEV-protected RPC. Flashbots Protect and MEV Blocker route your transaction straight to a private relay instead of the public mempool, so sandwich bots never see it coming. Both are free and you just swap the RPC URL in your wallet's network settings — MetaMask supports this natively for Flashbots Protect.
Route through CoW Swap when you can. CoW Protocol batches orders off-chain and settles them peer-to-peer or through solvers competing for the best price, which structurally removes the front-running window for the batched portion of a trade.
Use an aggregator, not a single DEX. 1inch and similar aggregators split large orders across multiple pools to reduce individual price impact, which shrinks slippage on its own.
Keep slippage tolerance realistic, not generous. 0.5-1% on major pairs is plenty. If a low-liquidity token needs 10%+ to go through, that's a signal to trade a smaller size, not to widen the tolerance and hand a bot more room.
For simple buy-and-hold trades, a centralized exchange sidesteps mempool MEV entirely — there's no public mempool to snipe on a CEX order book. If you're not trying to interact with a specific DeFi protocol, buying on Coinbase and moving to self-custody afterward avoids the sandwich problem altogether.
Our pick: Coinbase
How to check whether you actually got sandwiched
You don't have to take it on faith. Take the transaction hash from your wallet history and paste it into Etherscan. Look at the two or three transactions immediately before and after yours in the same block — if the same wallet address shows up buying the token right before your trade and selling it right after, that's a sandwich, plain and simple. EigenPhi's MEV explorer does this lookup automatically: paste in a transaction hash and it flags whether it was part of a detected sandwich, arbitrage, or liquidation bundle, and estimates what the searcher extracted from that block. It's worth checking after any trade on a volatile or thin-liquidity token, because it tells you whether your slippage tolerance is actually too generous for the pools you're trading on, rather than guessing.
It's also worth understanding which builder included your block. Post-Merge Ethereum runs on proposer-builder separation (PBS) — specialized builders compete to construct the most profitable block and pay validators for the right to propose it, with MEV-Boost as the relay layer connecting them. Some relays apply different inclusion rules than fully permissionless builders, which is part of why routing your transaction through a private RPC changes your odds of being sandwiched in the first place — it never reaches the builders who'd bundle a sandwich around it.
FAQ
Does a hardware wallet protect against MEV or slippage?
No. Both happen at the transaction-ordering and AMM-pricing layer, not the signing layer. A hardware wallet protects your private keys, not your trade execution.
Is MEV illegal?
No — it's a function of how public blockchains order transactions, and searchers/builders are operating within protocol rules. It's an economic cost of transparency, not fraud in the legal sense, though it's widely seen as extractive toward retail traders.
Do all chains have this problem equally?
No. Chains and rollups with different mempool designs (some L2s use sequencers with different ordering rules) have less public-mempool MEV exposure than Ethereum mainnet, though sequencer-level MEV is its own emerging concern.
Will a 0% slippage setting stop sandwich attacks?
It stops most of them by making the trade revert if the price moves at all, but on a volatile token that also means your legitimate trade fails constantly. It's a blunt tool, not a real fix — an MEV-protected RPC is the actual fix.
