Mempools, arbitrage, front-running, sandwich attacks, priority fees, and mitigations.
By the end, you should be able to
- Explain how transaction ordering can create extractable value.
- Distinguish arbitrage, front-running, and sandwich patterns.
- Identify execution assumptions and practical mitigations.
Illustrative three-step sandwich
A simplified sequence shows how ordering can affect a user’s execution.
Value created by ordering and inclusion
Maximal extractable value (MEV) is value that can be captured by changing the order, inclusion, or exclusion of transactions within a block. Arbitrage can help align prices across venues, while other strategies can impose costs on users. “Maximal” describes the opportunity set, not a guarantee that any actor captures it.
A visible swap can change the next price
A pending transaction may reveal its intended trade and constraints before inclusion, depending on the network and submission path. A searcher may submit another transaction that changes the pool state first, follows the trade, or arbitrages a resulting price difference. The actual outcome depends on ordering, fees, liquidity, slippage limits, and competing transactions.
Reduce exposure without claiming certainty
- Use an appropriate slippage limit and understand that a limit that is too wide increases execution risk.
- Consider routing and submission methods that reduce public mempool exposure when appropriate.
- Compare quoted and executed results, and treat unexplained ordering as evidence for investigation rather than proof of intent.
What this does not tell you
- MEV terminology and infrastructure differ across chains and protocols.
- A transaction appearing before or after another does not by itself prove malicious intent.
- Private submission, routing, or tighter slippage can reduce some exposure but cannot remove smart-contract, liquidity, or execution risk.
Analyze a hypothetical swap
Trace execution risk without submitting a transaction or connecting a wallet.
- Choose a hypothetical DEX swap and record pool, order size, quoted price, and slippage limit.
- Draw the intended ordering and one alternative ordering.
- Name one observable result that would support each explanation and one limitation of the evidence.
Check your understanding
1. What can MEV involve?
2. What is a sandwich pattern?
3. What does a slippage limit do?