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.