A sandwich attack is a type of front-running exploit where an attacker places two transactions around a victim's pending trade. The attacker first buys the asset (pushing the price up), then the victim's trade executes at the inflated price, and finally the attacker sells at the higher price for a profit. This is a common form of Maximal Extractable Value (MEV) on decentralized exchanges and exploits the transparent nature of the mempool. Tools like Flashbots aim to mitigate sandwich attacks.
Sandwich Attack
Sandwich Attack Explainer Video
What is a Sandwich Attack? | Crypto Terms Explained