The fast-paced, high-stakes world of MEV has been compared to:
a âDark Forestâ in which predatory alien civilizations eviscerate each other
cryptoâs version of high-frequency trading (HFT)Â
the mafia underworld
the symbiotic relationship between cleaner fish and sharks
MEV is like a soap opera, if the characters were all trading bots and crypto geeks. There are stories of bot-vs-bot battles, complex heists, and millions of dollars made and lost in seconds. If that doesnât make you curious to learn more, idk what will. Letâs dive in.
Level 1: Normie
MEV is the potential profit thatâs available to whoever builds the blocks in a blockchain. âBuilding a blockâ means looking at all the transactions users have submitted and deciding which ones should be added to the next block, and in what order.
MEV originally stood for âminer extractable valueâ since itâs miners who race to create blocks in proof-of-work (PoW) blockchains like Bitcoin and Ethereum. But as Ethereum transitions to proof-of-stake (PoS) and other PoS chains gain market share, the term had to be updated since PoS chains replace miners with validators. Itâs now been renamed to âmaximal extractable valueâ to encompass all the various parties that create blocks.
How does MEV work?
MEV is all about exploiting the privilege of being able to include, exclude, re-order, or insert transactions into the next block.
Block builders make this decision by looking at the transactions in the mempool â an off-chain collection of pending transactions hoping to be included in the next few blocks, sort of like a virtual waiting area â and determining how they can strategically arrange the transactions to earn the greatest profit. Profit-maximizing strategies can be benign (e.g. builders prioritizing transactions that offer fees for being included) or more problematic (e.g. if the builder observes a profitable trade, they can front-run it by including their own copy of the transaction first).Â
MEV trades are typically made by bots called searchers that scour the mempool for transactions they can leverage to make a quick buck. By observing these transactions before theyâre finalized â that is, before theyâve made it from the mempool into a block â the bots get a glimpse into the blockchainâs future. This early knowledge can be extremely valuable.
An example: Imagine you own Token A on Ethereum. Youâre watching the mempool and you notice that a whale just submitted a transaction selling a massive chunk of Token A. This sell-off is biiiiiig â big enough to tank the tokenâs price. The instant the whaleâs order gets added to a block, the value of your Token A holdings will plummet.
In this situation, youâd rush to submit a transaction selling all of your tokens, hoping you can get your order into a block before the whaleâs. The miner building the next block could therefore profit from their powerful position by charging you the right to have your transaction occur first. This profit is one form of MEV.
A more complex (but more realistic) case of MEV in this situation could come from an arbitrage bot with no prior position in Token A. The bot knows the large sell-off will tank the price of Token A on whichever exchange the whale is using, but it wonât immediately impact the price on other exchanges. After the trade occurs (but within the same block of transactions), the bot could race to buy Token A on the whaleâs exchange at a discount, then sell it on other exchanges for a quick and easy profit.
MEV Winners
MEV benefits both searchers and whoever builds blocks (miners, validators). Searchers make money on each trade, but they usually have to pay high fees to incentivize block builders to put their transactions in the right place â for example, immediately after a large token swap. Several bots will often compete to make the same trade, outbidding each other with higher and higher fees in a process known as a priority gas auction.Â
Miners and validators can benefit from MEV by passively collecting these fees from searchers or by running their own trading strategies and directly adding their transactions to the blocks they produce. The profits at stake here are massive â over $664M in successful MEV capture on Ethereum since January 2020.Â

MEV trades also benefit the blockchain ecosystem at large by making markets more efficient. For example, arbitrage bots ensure prices are stable across exchanges, and liquidation bots allow collateralized lending applications to function properly.Â
MEV Losers
Buuuuut of course shady trading bots also come with their downsides. Various MEV strategies can result in greater slippage (worse prices) on token swaps, failed transactions because trades were front-run, and have historically contributed to higher gas prices for all users as bots spammed the network with transactions.Â
Normie Additional Resources:
Level 2: Degen
There are several flavors of MEV strategies. They can be categorized by where the value-extracting transaction is inserted:
Frontrunning: inserting a transaction just before some target transaction
Ex: racing to be the first to liquidate a user whose collateral has dropped below the minimum collateralization ratio. (More on liquidations and the reward mechanisms used by different lending protocols here.)
Top liquidation MEV transaction: $3,264,587.08 in gross profit
Backrunning: inserting a transaction just after some target transaction
Ex: arbitrage across DEXs following a large transaction
Top arbitrage MEV transaction: $2,848,770.92 in gross profit, made just a few weeks ago
Ex: buying up large quantities of a token as soon as itâs launched
Sandwich Attack: a one-two-punch combo of frontrunning and backrunning. Involves placing one transaction just before a target transaction, and another just after the targetÂ
Ex: forcing a user to incur slippage on large trades made using AMMs
MEV strategies can also be characterized by how specialized they are. Some bots focus on very particular trades, while others rely on extremely generalized programs that analyze all sorts of transactions to see if they would be lucrative to mimic. These generalized frontrunning bots pose a particular challenge when white-hat or black-hat hackers try to withdraw funds from vulnerable smart contracts (the iconic Ethereum is a Dark Forest post describes one such story). In the worst case, attempts to save usersâ funds can inadvertently end up delivering them straight to MEV bots â not exactly an ideal outcome for a rescue operation.Â
The MEV Arms Race
For a while, the relationship between bots and the users/applications they exploited became a game of cat-and-mouse. Users worried about getting frontrun could attempt evasive behaviors, like leveraging proxy contracts or splitting transactions across multiple blocks. Large trades could be divided into smaller transactions, each of which was less likely to get sandwiched. And users could try to submit transactions to private mempools whose contents miners promised to conceal from bots.Â
Even bots themselves have learned to be wary of other bots. Besides competing in gas fee bidding wars, searchers have actively sabotaged one another, finding weaknesses in each otherâs strategies and swindling less sophisticated bots for a profit. The (in)famous Salmonella strategy involved a âhoneypotâ smart contract that baited a sandwich bot into sending Eth to a malicious token contract. Clever tactics like this have earned traders hundreds of Eth in a single night.Â
Flashbots
Crypto early adopters tend to be fairly tolerant of terrible UX, but itâs tough to not get fed up with MEV. And it certainly doesnât help the ecosystemâs reputation for being a scam-filled Wild West where only the paranoid survive. Thankfully, thereâs a company working to solve this problem on Ethereum â in the most counterintuitive way possible.
Flashbots is âa research and development organization working to mitigate the negative externalities of MEV and to avoid the existential risks MEV could cause to state-rich blockchains like Ethereum.â
Their take is basically: if we canât prevent MEV, we should at least do everything we can to make it more fair, transparent, and permissionless so that it doesnât undermine blockchainâs core values. The two main ways theyâre addressing MEV are Flashbots Auction and Flashbots Data.
Flashbots Auction lets anyone â including searcher bots â bypass the public mempool and instead submit bundles of ordered transactions directly to miners. A bundle can include transactions from any account, not just the one submitting the bundle â for example, a sandwich attack bundle could include 3 transactions: the searcherâs frontrun âĄď¸ the victimâs trade âĄď¸ the searcherâs backrun.
When a user submits a bundle, they include a bid indicating how much theyâre willing to pay to have their preferred transactions included at the top of the next block. Miners can accept the bundle(s) with the highest bids and discard the rest â a much more efficient process than the status quo, where bots spam them with transactions that could end up failing/reverting, or could be included in an undesired order.Â
Around 90% of Ethereum miners have adopted Flashbots. The companyâs core software (mev-geth and mev-relay), along with its open-source guides for helping people become searchers, has helped democratize MEV by lowering the barriers to entry. The combination of a private transaction pool and an auction mechanism has had a dramatic impact on how MEV works in practice:
As a result of Flashbotsâ efforts, and a general increase in public awareness of MEV, profits for simple trading strategies like arbitrage and liquidations have been largely competed away. Most of the value ends up as fees paid to miners unless a searcher has identified an exotic MEV trade thatâs unlikely to face competing bids.
Flashbots Data is the second weapon in the companyâs arsenal. An assortment of APIs, libraries, and dashboards helps shine a light on the historically opaque MEV underworld. By open sourcing data points such as total cumulative extracted MEV, Flashbots transactions included in each block, total miner profit, and largest individual MEV transactions, this suite of tools backs up Flashbotsâ commitment to transparency.
Degen Additional Resources:
Level 3: Gigabrain
MEV sucks for the average user, but could it be more serious than an annoying tax on trades? Might it even be an existential risk for smart contract blockchains? Thatâs what some people have argued.
Risk #1: Centralization
In a world where MEV can only be captured by advanced searchers or highly connected miners with lots of resources, economic pressure will push blockchains towards centralization. While âeconomies of scaleâ is typically a positive term in the off-chain world, itâs something to be avoided in crypto. Decentralization relies upon a (roughly) linear relationship between a miner/validatorâs resources and their earnings so that smaller network participants are not significantly disadvantaged. Fortunately, tools like Flashbots have largely mitigated this risk.

Risk #2: Block Re-orgs and Time-Bandit Attacks
Blockchains rely on miners behaving as rational economic agents, and network protocols are carefully structured so that each minerâs profit-maximizing strategy is to obey certain rules that help secure the entire network. âTime-Bandit Attacksâ can occur when MEV rewards break this assumption.
In certain situations, it can be more lucrative for miners to act against the best interest of the network by attempting to overwrite existing blocks instead of following the socially optimal strategy of mining on the longest chain. For example, a powerful miner might notice a large MEV opportunity that some lucky searcher snatched a couple of blocks back. Rather than mining on the newest block, which could only offer meager block rewards, the miner could choose to re-mine the older block, claim the MEV profit, and hope that their fork of the chain eventually overtakes the original chain. Doing so might have a positive EV for the miner, but frequent re-orgs of this type would cause chaos for the blockchain itself by disrupting finality and security.
âDeviant mining strategiesâ of this kind could even pose a threat to Bitcoin â a blockchain not typically associated with MEV â once the network stops issuing new coins as block rewards. This well-known paper covers the game-theoretical mechanics of how such a strategy could evolve under a transaction fee regime, undermining Bitcoinâs security if additional measures arenât taken.

While these risks are serious, the notion that MEV poses an existential threat to Ethereum is likely overblown. Itâs true that opportunities for MEV will only increase as blockchain applications grow in complexity, and that even more advanced MEV strategies such as DEX/CEX arbitrage and cross-chain MEV pose new challenges. But there are plenty of teams working on solving â or at least mitigating â the worst effects of MEV at the application level and even the protocol level.
Thatâs not to say, though, that we shouldnât ignore the many flaws with the current state of MEV and the solutions that exist to date.
Flashbots Criticism
Although Flashbotsâ systems â sometimes called âFront-running as a Serviceâ (FaaS) or âMEV Auctionsâ (MEVA) â have helped lower gas fees and democratize access to MEV, not everyone is a fan. Many argue that resources would be better spent trying to prevent MEV rather than accepting it as inevitable. Some even go so far as to say MEV is theft and MEVA, therefore, is akin to âauction[ing] off the right to mug people and burglarize homes.â
The cofounders of Flashbots give a pretty good rebuttal to these critiques here. The (paraphrased) tl:dr is:
We donât use force, we publish code. If by writing 100 lines of pretty obvious code and releasing it as mev-geth weâve enabled widespread theft, then this whole experiment with smart contract blockchains has failed because the system should be able to handle such a weak âattack.â
In any case, generalized frontrunners present some tricky ethical questions. Right up there with philosophical debates around the Trolley Problem and âshould you steal bread to save your starving familyâ is a new dilemma: whoâs responsible when a bot accidentally frontruns a hack?

And besides these ethical arguments, there are concerns about the Flashbotsâ actual implementation â specifically, the fact that itâs a centralized application whose usage requires certain trust assumptions. The company acknowledges that, as of Flashbots version 0.4, itâs yet to meet a few goals on its roadmap including:

The (Bright?) Future of MEV
As Ethereum transitions to proof of stake and other PoS chains develop more robust MEV infrastructure, the flow of MEV profits could change dramatically. Consider two of the major factors that distinguish MEV on PoS chains compared to PoW:
Searchers know in advance which validators are scheduled to produce future blocks within a given epoch, so itâs no longer necessary to broadcast transactions to all miners.
Users looking to stake their assets can choose which validator(s) to stake with, and this decision impacts the odds of validators being chosen as block proposers.
This second point creates a game-theoretical situation in which validators are pushed towards sharing MEV profits with stakers. A flywheel effect will reward MEV Profit Sharing Validators (MPSVs) while driving out validators who refuse to kickback MEV profits to stakers (more info here):

Putting together all the ideas weâve covered so far, itâs not unreasonable to view MEV as an evolving market that first favored searchers, has shifted to more strongly favor miners, and will eventually start to favor users as a result of competitive forces.
We might even see a world in which wallets and other applications actually pay users using MEV fees, much like credit cardsâ cashback programs.
Flashbots (and other similar tools) âĄď¸
Lower barriers to entry for becoming a searcher âĄď¸
Searcher MEV profits competed away âĄď¸
Value accrues to miners/validators as fees âĄď¸
PoS systems reward validators that share profits with stakers âĄď¸
Users/stakers receive MEV profits as incentives to favor certain apps/validators
Still, the future of MEV is complicated and uncertain. New infrastructure will need to be built for Ethereum 2.0, including Flashbotsâ post-merge software called mev-boost which will enable proposer-builder separation (PBS) on the post-merge chain. There is even talk of integrating Flashbots into the core Ethereum protocol itself.
Meanwhile, MEV on Solana could be impacted by the chainâs new fee mechanism â and by efforts from Jito Labs, who are building a Flashbots-like system. Marlin is handling MEV tools on Polygon, while Nethermind launched an MEV plugin for xDai.
In other words, itâs an exciting time to be in the world of MEV.
MEV Minimization
Finally, itâs worth mentioning some of the projects and tools out there that are stubbornly fighting the good fight against MEV instead of acquiescing to it. These include:
Strings together transactions in a FIFO order to produce an output that block producers canât modify with deletions/insertions.
Encrypts pending transactions while theyâre in the mempool.
Chainlink's Fair Sequencing Service (FSS)
Uses a network of oracles to order transactions instead of giving that power to a single miner or validator.
Uses a STARK-based verifiable delay function (VDF) to obscure transaction details for a predetermined amount of time (as theyâre being ordered), and then makes them public after sequencing is complete.