What is Sandwich Attack?
A sandwich attack is an MEV strategy where an attacker places transactions before and after a victim's swap — front-running to raise the price, then back-running to sell at the inflated price.
WHY IT MATTERS
Sandwich attacks are the most visible form of MEV extraction. The attacker 'sandwiches' your swap: buys the same token before you (raising the price), lets your trade execute at the worse price, then sells after (capturing the difference).
The attacker profits from the price impact of your trade. Larger trades with higher slippage tolerance are more profitable targets. The attack is atomic — if any step fails, the entire bundle reverts.
Protection strategies: minimize slippage tolerance, use private mempools (Flashbots Protect), use MEV-protected DEXs (CoW Protocol), or submit transactions through MEV-Share for partial rebates.