The Order
Special thanks to everyone who provided resources, advice, or helped edit this. This article would not be possible without you
The Hidden Threat
In the early days of computerized finance, sophisticated traders ruled the markets by using information and speed to manipulate the order of incoming trades to profit off average investors. A sophisticated trader sees an average investor's order and quickly buys the stock first. When the investor buys it, the price goes up, and the trader sells the stock at the higher price, making a profit. While the market dynamics that allowed this to happen were ultimately regulated away or outcompeted with new types of exchanges, today, standard users on Ethereum face a similar hidden threat. It's crucial to understand how this threat has changed over time because it actively extracts hundreds of thousands of dollars daily directly from users of the protocol.
Maximal extractable value (MEV) is the maximum value that can be earned by including, reordering, or excluding transactions when producing a blockchain block. MEV as a whole can have both positive and negative effects on a blockchain, but for the scope of this we will only focus on the negative effects in the Ethereum ecosystem. The simplest form of negative MEV consists of sophisticated bots who reorder transactions to profit off users, conducting strategies such as:
Front running: When a bot sees your order to buy a token and quickly buys it first, so they can sell it at a higher price after your purchase pushes the price up
Backrunning: When a bot buys a token right after your purchase, hoping the price will continue to rise so they can profit later
Sandwich Attack: When a bot buys a token before your order (front running) and sells it immediately after your order goes through (backrunning), profiting from the price change caused by your transaction.
The way this reordering happens can be best understood through walking through the typical transaction process(See image above):
A user pays a fee to submit a transaction and it goes into a public list of transactions called the mempool
A network of searchers(“the bots”) filters through the public list and looks for opportunities to add in their own transactions to make a profit off users, then submits it to the validators
Validators then receive the block of transactions and propose them to be included on the blockchain to earn a fee depending on the user fees included in the block
In this process, searchers have the direct ability to manipulate the order of transactions to directly profit at the expense of users. This creates a negative experience for users which could cause them to flee to other chains, destroying the vast network value that Ethereum has developed over time.
A New Hope
While this manipulation occurred for years, eventually new solutions were created to counter it.
Altruistic Searchers
For example, while originally a searcher was incentivized to profit off users, a decentralized exchange aggregator called CoW Swap created a new type of specialized searcher that changed the incentive structure.
In CoW Swap, the process is slightly different:
Users send intents to transact at a quoted price to an off-chain pool of intents
Specialized searchers called Solvers bid to execute the intent on behalf of users
If a user accepts a bid, the solver becomes responsible for executing the transaction behind the intent. The solver then optimizes the transaction by looking for other off chain intents or utilizing other MEV strategies
Then the solver goes through the system to settle it on-chain, collecting any extra value savings that they create on the quoted price
By placing bids to complete transactions for users, solvers aim to get the lowest prices for users and protect them from MEV risks. This was significant because it provided a more positive alternative for malicious searchers to make money.
Block Marketplaces
Validators used to take transactions to build their own blocks, but as the complexity of MEV grew, it became harder for the average validator to create optimal blocks to earn enticing rewards. To change this, Flashbots created MEV-Boost, a marketplace where validators can openly sell block space, allowing them to get the highest rewards with the least amount of effort.
With MEV-Boost, validators are able to maximize the fees they earn by selling their blockspace through off-chain markets called Relays. In these marketplaces, new entities called Builders buy blockspace and create blocks by combining transaction bundles from searchers, public mempool transactions, and private orders. Builders use searching strategies to find profitable transactions, making them similar to searchers but with a broader focus on efficiently filling blocks.
MEV-Boost is crucial because it allows validators to reduce their focus on specialized skills for block building and instead outsource it to maximize their rewards. This significantly lowers the barrier to earn money as a validator, enhancing the security and decentralization of the Ethereum network.
Private Mempools
While solvers on CoW Swap offer an alternative to malicious traders, it doesn't affect the ability for searchers to profit off information in the public mempool. To solve this, the community created a new private mempool to protect users' information and even let them earn money from it.
One example of this new information market structure is called MEV-Protection/share by Flashbots, which works as follows:
A user sends a transaction to a private mempool
A trusted matchmaker coordinates with searchers to share private information about the transaction
In exchange for providing their information, users receive a portion of the MEV that is created from their transaction
Paying users a share of the MEV they create and charging searchers for reliable information encourages both groups to use it. This was important because it reduced the total public information in the mempool, lowering the potential opportunities for searchers to profit off users.
The Protocol Shift
While all of these innovations have worked to make Ethereum safer for its users, in March 2023, a big change called EIP 4337 or Account Abstraction (AA) was introduced. Its intention has been to create a better developer and user experience while interacting on the protocol through introducing smart account wallets that have more programmable rules and features. While this might improve the experience in many ways, it also introduces new complexities for actors trying to extract MEV.
The upgrade introduced new smart account wallets, bringing a new type of transaction process:
To start a user creates a UserOperation, which is a signed intent to perform a transaction
(Optionally) A new entity called a paymaster is able to pay for a user’s UserOperation fee
After submission and the fee payment, the UserOperation goes into the EIP-4337 specific mempool with other UserOperations called the alt mempool (note that while there is one main alt mempool, now it is possible to create more)
Then a new entity called Bundlers take the UserOperations from the mempool, orders them, bundles them together, then directly submits them to a builder
Although it may not seem very different from the current process, this upgrade has significant implications for MEV on Ethereum. It introduces Bundlers who use the skills of both a searcher and bundler, it creates new information dynamics with multiple mempools, and it gives paymasters a unique advantage by granting them the ability to gain early access to valuable information.
Despite the upgrade going live over a year ago, the actual usage of these new functions has been limited, making it hard to understand what the true implications might be.
(Bundle Bear and Dune respectively)
For example, while there are approximately 14 million weekly active regular accounts on Ethereum, there are only a few hundred thousand weekly active Smart Accounts.
(Bundle Bear and Dune respectively)
Additionally, the new accounts experience only around 1 million UserOperations weekly, compared to the broader Ethereum ecosystem's 50 million transactions.
(Bundles are assumed to have failed because of frontrunning if they have the "AA25 nonce" error or "AA10 sender already constructed" error.)
Despite the significant adoption of the new wallet system, bundlers have still shown some interest in extracting MEV from the new system. For example, in recent months, the percentage of bundles being front run spiked to 25% at one point. Although this percentage has since declined, it indicates ongoing interest in the bundler MEV market despite larger ecosystem adoption of the upgrade. It is still too early to predict if users will bring more MEV opportunities, but until then, we can only speculate about the upgrade's implications on the market.
A Changing Order
Although still in its early stages, the added mechanisms for account abstraction are set to create a new paradigm for capturing MEV.
Private Mempools
EIP-4337 allows for the creation and participation in multiple UserOperation mempools, potentially leading to significant innovation in their rules and dynamics. The general adoption of alternative mempools will lead to the further fragmentation of user information which should reduce overall public MEV efficiency. In addition, it has the potential to create a new market for private UserOperations mempools where bundlers with access can sell the valuable information to searchers. As the amount of private mempools grows, it will be important to track if and how they become monetized.
Bundlers Marketplaces
There is a lot of overlap between bundlers, searchers, and builders because they all keep active mempools to find MEV opportunities and order transactions. This means to start, searchers and builders will both likely run bundlers to better extract MEV and create more competitive blocks respectively. But just as the market developed solvers as more formal market player searchers and builders for validators, bundlers will likely follow a similar path. Bundlers, maintaining their own private mempools, could end up bidding to execute UserOperations, selling information to searchers, and/or buying the right to include their bundles to builders.
Information Seeking Paymasters
Paymasters have the ability to pay for users' UserOperation fee to gain early access to the information which can influence the market in several ways. They could pay for users' gas and use the private information to profit off the user automatically or sell it to the highest bidder. Alternatively, they could operate like MEV-protect where they build a mini marketplace to exchange the information for a share of the MEV profits it creates. These potential choices are important to understand to ensure that the ecosystem picks paymasters that have their best interest in mind.
Intent-based Solvers
Another innovation that could arise from broadcasting users' UserOperations across the network of mempools and bundlers is around off-chain settlement. Similar to how CoW Swap solvers were able to bid on user transactions at a quoted price then optimize them off-chain before settling them on-chain, it is likely that a market for this will arise as well. Called intent-based solvers, they will likely bid to execute transactions then search around UserOperations mempools in order to fulfill them at lower prices with off-chain information and keep the savings.
The final takeaway, while this market is still extremely underdeveloped, we can anticipate the potential markets these upgrades might create based on the historical innovations. Private mempools, bundler marketplaces, information-seeking paymasters, and intent-based solvers are set to transform the MEV landscape, creating new opportunities and challenges for the Ethereum ecosystem.
Key Takeaways:
MEV on Ethereum poses a significant risk to users, as sophisticated bots manipulate transaction orders to profit at the expense of average users through strategies like front running, backrunning, and sandwich attacks
Innovations such as CoW Swap's altruistic searchers and MEV-Boost marketplaces have been developed to counteract malicious MEV activities. These solutions aim to protect users and optimize the blockchain ecosystem by altering the incentives and mechanisms for transaction ordering and block creation
The introduction of EIP-4337 or Account Abstraction (AA) has brought new complexities and opportunities for MEV extraction. The upgrade introduces smart account wallets, multiple mempools, and entities like Bundlers and Paymasters, creating a new dynamic in transaction processing and information access.
The evolving landscape of MEV on Ethereum is set to see further innovations with the potential for private mempools, bundler marketplaces, information-seeking paymasters, and intent-based solvers. These developments could significantly transform how MEV is extracted and managed, leading to new opportunities and challenges for the Ethereum ecosystem.
Other Sources:
https://eips.ethereum.org/EIPS/eip-4337#definitions
https://eips.ethereum.org/EIPS/eip-7562#alt-mempools-rules
https://fastlane.ghost.io/on-4337-intents-and-mev/
https://www.blocknative.com/blog/understanding-4337-mev-supply-chain
https://hackmd.io/@dmarz/4337-mev-supply-chain
https://blog.cow.fi/mev-bots-switch-from-searcher-to-solver-79277302bad3
https://www.bundlebear.com/overview/all/week
https://blog.cow.fi/mev-bots-switch-from-searcher-to-solver-79277302bad3
https://www.galaxy.com/insights/research/mev-the-rise-of-the-builders/
https://vitalik.eth.limo/general/2024/05/17/decentralization.html
https://www.erc4337.io/docs/understanding-ERC-4337/user-operation#useroperation-mempool
https://notes.ethereum.org/@yoav/unified-erc-4337-mempool#What-does-ERC-4337-aim-to-solve
https://dune.com/steakhouse/ethereum-ecosystem
https://www.galaxy.com/insights/research/the-road-to-account-abstraction-on-ethereum/
🔥🔥🔥🔥🔥🔥🔥