Skip to main content

What Is a ‘Sandwich Attack’ and How Does It Utilize the Mempool?

A sandwich attack is a specific type of MEV where an attacker wraps a victim's pending transaction with two of their own. The attacker sees a large buy order in the Mempool.

They execute a small buy order just before the victim's (front-run) and a sell order immediately after (back-run). The front-run buy pushes the price up, causing the victim to execute at a worse price.

The back-run sell then profits from the victim's price impact.

How Do Automated Market Makers (AMMs) Utilize Smart Contracts?
What Is a “Sandwich Attack” and How Does It Relate to MEV?
How Does a Proof-of-Stake (PoS) System Utilize the Native Cryptocurrency for Security?
How Does a Hierarchical Deterministic (HD) Wallet Utilize the Seed Phrase?