Esoteric
MEV — Maximal Extractable Value
Value extracted via transaction ordering — sandwiches, salmonella traps, builder auctions.
TradFi →Front-running + payment for order flow
Prerequisites
01 · Concept — what problem does it solve?
Whoever orders transactions in a block can profit from that ordering. Pending transactions sit in a public , fully readable; an swap's price impact is deterministic. So a can compute, to the wei, the profit from inserting their own transactions around yours. is the institutionalization of this: an industrial supply chain extracting value from transaction ordering rights.
02 · Sandwich attack anatomy
// three transactions, one block, exact order
1. ATTACKER BUY push price up to victim's limit
2. VICTIM SWAP fills at the worst tolerated price
3. ATTACKER SELL unwind into post-victim price
profit ≈ victim_slippage_tolerance
− 2·gas − pool_fees − builder_tip
- Enabler: the victim's tolerance setting — the attacker consumes exactly that budget.
03 · Salmonella — poisoning the bots
A honeypot whose transfer() silently delivers ~10% of the stated amount to any address not on the deployer's whitelist. Sandwich bots simulate the front-run, see a profitable fill, execute — and receive poisoned inventory they can't sell back. The predator's own automation becomes the attack surface. Lesson: simulation results on adversarial contracts are not promises.
04 · Flashbots & the MEV supply chain
- : bundles go straight to block builders via
eth_sendBundle— never touching the public mempool, so they can't be front-run; failed bundles pay nothing. - Supply chain:
searchers(find opportunities, sign bundles) →builders(assemble optimal blocks) →validators(sell their ordering rights via MEV-Boost to the highest-bidding ). - Consequence: ordering rights are now a transparent auction market — MEV got formalized, not eliminated. Private order flow and PFOF dynamics are re-emerging on-chain.
- Encrypted mempools shift it, don't end it: hiding transactions from searchers (threshold encryption like Shutter, or MEV-Commit) stops naive front-running — but whoever decrypts or builds the block inherits the look-ahead. Like private relays before them, they reprice ordering rights rather than abolish them.
Connected concepts