MEV and sandwich attacks: why your swap got a worse price136 replies · 5,600 views
Thread ToolsShow Printable Version · Subscribe to this Thread · Search Thread
Started · Last reply 05 Dec 2026 · 332 words in first post
Where to open an account: Open a Trustee account.
MEV and sandwich attacks
Sometimes your swap gets filled at a worse price than the pool's curve should allow, and nothing about the trade looks wrong. That gap is often MEV: searchers saw your transaction pending, and they acted on it. The sandwich is the classic form.
What searchers do
- Pending transactions on public mempools are visible data: large swaps, known pairs, predictable sizes
- A searcher buys ahead of your trade, pushing the price up, lets your trade execute at the worse price, then sells what it bought
- You pay the spread between the two steps; the searcher captures it; the pool never sees any of it
Why some slippage settings invite it
- A wide slippage tolerance is an open invitation: the searcher knows your trade will execute no matter how much worse the price gets
- Tight tolerance caps the damage but reverts more trades, especially in volatile pairs
- The setting is a negotiation: tolerance is how much worse-than-curve you accept before canceling
The private RPC option
- Private RPC endpoints submit transactions without publishing them to the public mempool first
- No public visibility means no sandwich in front of your trade; the tradeoff is a different trust model and sometimes slower inclusion
- Some venues and wallets bundle this by default; others leave it to you
Reducing the damage
- Use tight slippage on volatile pairs and accept the reverts
- Route through venues with internal MEV protection where available
- Split very large trades so no single transaction is an obvious target
- Check the fill after the fact: if the price is consistently worse than the curve, the route or the submission is leaking
The takeaway
Sandwich attacks are not bad luck; they are pricing under uncertainty, and your settings decide how much of it you accept. Tight slippage, private submission and careful routing cut the leakage. The worse price you sometimes got was not the market's; it was the gap between what you allowed and what a searcher was willing to pay for it.
Thread Statistics136 replies · 5,600 views