Sandwich Attack
A form of MEV exploitation where an attacker places two transactions around a victim's pending swap on a DEX — buying the token just before the victim's trade (front-run) to push the price up, then selling immediately after (back-run) once the victim's large order has further increased the price. The victim receives fewer tokens due to the artificially inflated price, and the attacker profits from the price difference.
“A bot detects a pending $100,000 USDC-to-ETH swap in the mempool. It buys ETH first (raising the price), lets the victim's swap execute at the inflated price, then sells the ETH back for a profit, costing the victim hundreds in worse execution.”
MEV (Maximal Extractable Value)
The maximum value that can be extracted from block production beyond standard block rewards and gas fees by including, excluding, or reordering transactions within a block. MEV is extracted by validators and specialized 'searchers' who identify profitable opportunities like arbitrage, liquidations, and sandwich attacks. The MEV ecosystem has evolved to include builder-searcher separation (MEV-Boost) to reduce negative externalities.
Front-Running
The practice of placing a transaction ahead of a known pending transaction to profit from the anticipated price impact. In crypto, front-runners monitor the mempool for large pending trades, then submit their own transaction with a higher gas fee to be included first. This is a primary form of MEV extraction and is often considered predatory, as it extracts value from regular users by worsening their execution prices.
Mempool
The 'memory pool' — a holding area where unconfirmed transactions wait before being included in a block by miners or validators. Each node maintains its own version of the mempool. Transactions with higher fees are typically prioritized, which is how MEV searchers and front-runners identify profitable opportunities.
Slippage
The difference between the expected price of a trade and the actual executed price. Slippage occurs due to low liquidity, large trade sizes relative to pool depth, or market movement during the time between submitting and executing a transaction. In DEXs, users can set slippage tolerance — the maximum acceptable price deviation — to protect against excessive slippage, though setting it too tight can cause transactions to fail.