MEV is an emergent phenomenon in the market for block space. Block producers are privileged actors in Ethereum and many other blockchain protocols. Whether they are miners, validators, or sequencers, they can include, exclude, and order transactions within the blocks that they produce. MEV is a measure of the “maximum extractable value” possible by exploiting this ability.
Searchers (bot operators who find and exploit MEV opportunities) and miners have together extracted at least $600 million in MEV on Ethereum since 2020.
MEV has concerning implications for the security of Ethereum as a whole. If it becomes lucrative enough for miners to reorder transactions, it may violate some of the cryptoeconomic assumptions we make about actors in the network, encourage collusion, and destabilize consensus.
Flashbots is an attempt to mitigate the worst negative effects of MEV, democratize access to MEV extraction, and make MEV activity more transparent. (Their tools do not eliminate MEV!)
Miners run a special fork of the go-ethereum client called mev-geth, which essentially includes a private mempool. Searchers can submit bundles of transactions privately and pay miners directly. It’s effectively a sealed bid auction for transaction inclusion and ordering. About 90% of Ethereum hashpower runs mev-geth.
This all seemed kind of crazy to me at first: why would you want to make MEV easier rather than harder? But it’s a very clever kludge:
Cross-exchange
Example: Observe a large sell transaction on Uniswap. Buy on Uniswap, sell on Sushiswap.
Note: here’s the whole story behind this huge arb!
Sandwiching
Example: Observe a large buy transaction on Uniswap. Insert a buy transaction before and a sell transaction after.
JIT liquidity
Example: Observe a trade on Uniswap V3. Inject concentrated liquidity before the trade to capture the LP fees.