Sitemap
Julia Ofoegbu

Julia Ofoegbu

Researcher & Writer

Maximal Extractable Value (MEV): A Tale As Old As Time

25 min readDec 4, 2024

--

Press enter or click to view image in full size

From December 2019 to September 2022, a cumulative total of $675M (~ 400,000 ETH or thereabout) was realized from MEV activities on Ethereum, as revealed on the Flashbots MEV data dashboard.

Press enter or click to view image in full size
Pre-merge MEV data: Flashbots

This dashboard shows the MEV revenue captured pre-merge (when Ethereum still utilized the proof-of-work mechanism for consensus). According to Flahsbots’ REV transparency dashboard, post-merge (mid-September 2022 — June 9th, 2024), 526,207 ETH was the total revenue extracted by validators on Ethereum.

To process this, your first stage of thought is most likely…“Damn. That’s a lot of money!!!” You’re correct.

If you’re a newbie, I happen to know what you’re about to ask. “What is this MEV?” I got you.

If you’re an intermediate, there’s a probability your next question will be “Why is MEV revenue higher post-merge?” Grab your popcorn.

If you’re a more advanced reader, you’re probably thinking “What solutions are being worked on?” You’re in the right place, ser!

In this article, we’ll dive deep into MEV, brief history, how MEV works, types of MEV, impacts, and proposed strategies to mitigate it. Time to explore.

The Current DeFi Landscape

The DeFi ecosystem is the leading blockchain category and has grown exponentially over the years with a TVL of $88.6bn (at the time of writing) in hundreds of assets across various chains, based on DefiLlama feed.

Press enter or click to view image in full size
Image source: DefiLlama

The value of assets on the Ethereum blockchain alone constitutes more than half of the total TVL — over $49bn (55%). DeFi protocols see the highest number of users and activities, so, with time, it became much easier for the “backend guys” to exploit users. We’ll learn more about these backend guys soon enough, however, we must give an overview of how transactions are typically processed on Ethereum.

How Transactions are Processed: Flow of Transactions

This is a typical pipeline of how transactions are processed on Ethereum.

  • Transaction Creation: Alice wants to send 3 ETH to Julia in payment for services provided. She signs in to her Metamask wallet. She inputs Julia’s Ethereum wallet address and amount (3 ETH). She confirms before hitting send, automatically signing to prove ownership of her address.
  • Transaction Broadcast: An RPC node (integrated with the wallet or protocol) broadcasts the signed transaction to the entire network.
  • Mempool: Mempool stands for memory pool. It is a pool (queue) where pending and unconfirmed transactions are stored, waiting to be selected and processed.
  • Selection From Mempool: The transaction is selected from the mempool by a network participant — block builder.
  • Block Creation: The transaction (along with other transactions) is added to a new block, thereby a new block is created.
  • Block Propagation: The newly created block is then broadcast across the other nodes in the network.
  • Block Confirmation: The other nodes confirm the validity of the block (and the transactions in it).
  • Consensus: Once the majority of the network’s validators approve of the block, it is added to the blockchain.
  • Finality: Once added to the blockchain, the block is said to have achieved finality. Meaning, that the transaction can be permanently recorded and cannot be reversed.
  • State Update: Once recorded, the state of the network is updated to reflect the changes. Alice’s account balance will be reduced by 3 ETH (along with the gas fee deducted). Julia’s account balance will read an addition of 3 ETH. Alice, Julia, and the other senders/receivers will be able to see the changes reflected in their wallet’s interface.

What is MEV?

MEV stands for Maximal Extractable Value. It is the monetary value that validators (previously, miners) get from either reordering, inserting, or censoring transactions in a way that will generate profits for them. The “M” stood for Miners before Ethereum moved from PoW to PoS.

When selecting transactions from the mempool, validators (block producers) select those with higher gas prices, limits, and priority fees first, all of which they stand to profit from when they execute the transactions and create new blocks for them. Profit from MEV is minus the block rewards they receive and the transaction (gas) fees paid to them. So when multiple transactions are in the mempool, these validators select those those profitable transactions and put them in the next block to be processed faster even if there are other transactions (with lesser profits for them) that came before theirs. Now you know why your Ethereum transactions take so long to process sometimes. The image below obtained from an article by Milk Road shows that on some days, validators earn more from MEV than they do on gas fees.

Press enter or click to view image in full size
Credit: MilkRoad

There are multiple ways MEV occurs and the next section of this article will explore them. Most MEV attacks take place on DEXs where transactions are first stored in a public mempool before they go into blocks.

Actors Involved in MEV

There are actors responsible for ensuring users’ transactions are processed and added to the blockchain. This (de)centralization allows them to manipulate transactions for gain easily — MEV. Typically, when transactions are picked from the mempool by a block builder, he creates a new block and orders the transactions in the block before sending it over to the block proposer (via a relayer) who validates the transactions in it and broadcasts it to the network for it to be added to the blockchain.

Aside from the block builder and proposer, some other actors participate in MEV. Let’s take a look at all of these actors and their roles.

Searchers:

These are third-party participants (could be bots, devs, or highly skilled traders) who actively monitor on-chain trading, search for profitable opportunities, and exploit them to capture MEV for financial gain. They target transactions that they can benefit from and create their own transaction bundles that are aimed at extracting value from the target transaction. The searchers can use platforms like Flashbots to choose block builders to send these bundles to. Even without these platforms, searchers with higher gas fees have higher chances of having their transactions selected from the mempool by the block builders. They bribe the block builders to include their bundles in a block (re-ordering the transactions in that block) by paying higher gas for block space. Searchers do this to gain from the opportunities that arise in between transaction orders.

*Bundles are sets of transactions created to capture MEV opportunities.

Press enter or click to view image in full size
Source: Frontrunners and MEV Explained: How to Beat the Bots by CoinMarketCap

Role of a searcher: Monitor the mempool ➡️ Target a transaction that can be exploited to maximize gain ➡️ Create a transaction bundle ➡️ Increase the gas fee for the bundle to have it picked first (price-gas auction) ➡️ Submit the bundle to a block builder to have it fixed into the order of transactions in the next block and hope to the gods the builder isn’t malicious and won’t exploit him too. If all goes well and the transactions are executed, he captures profit.

For searchers, they must choose good builders to submit their bundles. The essence of choosing a block builder that can be trusted is that dishonest block builders can decide to front-run or sandwich the transaction bundles of the searchers for which they were bribed.

Block Builders:

The Merge which happened in 2022 led to the separation of the role validators. Block building became a separate role from block proposing. Block builders are participants responsible for selecting transactions from the mempool and ordering them into blocks. Block builders search the mempool for transactions, create blocks, and include the transactions in blocks first. They go for transactions with higher gas fees (more incentives) first. They also receive bundles from searchers (remember: higher gas fees), simulate the blockspace to fill it with other profitable transactions, and reorder transactions while creating the blocks. They check all the transactions for things like sufficient balance in the sender’s account, enough gas fees, etc before including the transactions in blocks.

Press enter or click to view image in full size
Source: Centralization of block builder by vita

Role of a block builder: Select transactions from mempool (preference given to those with higher gas fees attached) ➡️ Receive transaction bundles from searchers directly through specialized platforms like Flashbots ➡️ Create new blocks and order the transactions in them ➡️ Submit to the relays.

Relays:

Relays act as the connection between block builders and proposers. They are entities that receive blocks from block builders and send them to the block proposers. Relays are also able to see the bundles sent from the searcher to the block builder and can decide to front-run the transaction to make a profit. That’s why emphasis is laid on choosing trusted relayers (as well as block builders).

Relays also connect searchers to builders. Relays help keep the content of the block private (to prevent front-running by the validators) until it is received by the validator for inclusion in the network. Examples of relays are Flashbots MEV-Relay, Blocknative, BloXroute, Agnostic, Relayooor, Ultrasound, etc. Unlike block builders and proposers, there is very little or no revenue for relays. Last year, Blocknative suspended its relay services due to a lack of economic incentives.

Role of a relay: Receives bundles from block builders ➡️ Hide the content of the block to prevent others from exploiting the transactions in it ➡️ Submit block to the block proposer.

Block Proposers (Validators):

These are key actors in blockchain networks and the MEV ecosystem. They are responsible for proposing which blocks are added to the blockchain. Block proposers typically choose the blocks with the most profit to be included in the blockchain because they also stand to gain from it.

Role of block proposer: Receive blocks from builders (and MEV-targeted bundles from relays) ➡️ Analyze the bundles for MEV opportunities ➡️ Ensure the transactions don’t have dependencies that will cause them to fail and adhere to the network rules ➡️ Decide which transactions are included in the block and re-order them to maximize profit ➡️ Submit the block to the network ➡️ Wait for block to be confirmed ➡️ Collect reward, including MEV profits

In a block builder marketplace like Flashbots, some considerations searchers look out for are: (a). If the builder is fair and honest (b). If the builder connects to a trusted relay ©. If the relay connects to many validators it means more chances for the block to be included.

Press enter or click to view image in full size
Source: What is Maximal Extractable Value (MEV)? By Chainlink

Even as decentralized systems, blockchains still rely on these actors (builders and proposers) to manage the entire process of transaction execution and this gives them an advantage to manipulate the order of transactions to maximize profits.

Types of MEV Attacks

1.Frontrunning: This is a process whereby transactions are targeted for the sole purpose including a transaction before it. A searcher (or a frontrunning bot) observes transactions going into the mempool and targets a particularly large (profitable) trade. He places a similar transaction — a buy order and pays a much higher gas fee to get his transaction selected from the mempool & processed first. He buys that asset at a lower price because the next trade coming in (the large trade) will increase the value of that asset. This is how a bonding curve works; the more the demand for a token, the price of the token gradually increases — the searcher profits from this by backrunning that trade.

Press enter or click to view image in full size
Credit: Calibrant

2. Backrunning: In this case, a sell-order transaction is placed after the targeted profitable trade and because the price of the asset is now higher, the searcher sells his token and takes profit from the trade.

3. Sandwich Attack: Sandwich is an MEV attack that involves both frontrunning and backrunning. It is called a “sandwich” because the targeted profitable transaction is sandwiched between the searcher’s two trades.

Press enter or click to view image in full size

4. Arbitrage: This is an MEV attack strategy that exploits the tiny price differences between the prices of tokens on different exchanges. Token X can be valued at $0.045 on one exchange and $0.037 on another exchange. Arbitrageurs can buy Token X from exchange B which has a lower price and sell it on exchange A where it is selling for a slightly higher price, thereby making a profit. Arbitrage is normal in the crypto space, even regular crypto traders engage in it. It is regarded as an MEV strategy when arbitrage bots are employed to monitor the mempool to see pending transactions of the same tokens with price discrepancies. They create transactions with higher gas fees to buy assets before or after the target transactions in a way that will profit them.

5. Liquidation: Liquidation is what happens when users’ collateral falls below a certain threshold needed to cover their loan and protect the DeFi protocol from debt. A user borrows a token (say, USDC) from a DeFi protocol and uses another volatile token like ETH as collateral. The value of the collateral, ETH is higher than the value of the loan collected to cover costs in case of losses. If the price of ETH drops, the user’s collateral value drops below a certain threshold and the ETH will be sold (at a discounted price) so that the DeFi protocol will not incur debt. An MEV bot monitors the DeFi protocol to catch opportunities where the position is about to be liquidated as it gets closer to the threshold and then strikes. It places a trade before the target transaction to buy the (lending) position to obtain the collateral (which is now of lower value), then sells at a higher price.

It is worth mentioning that MEV doesn’t only occur on Ethereum. Solana blockchain is also subject to MEV exploitation.

Impacts of MEV on Ethereum

MEV attacks have significant impacts on both users and the blockchain network. We’ll be highlighting a few of these below.

1.Increased gas costs: When MEV bots detect an opportunity, they compete to get their transactions in the next block to make a profit. They compete by continually increasing their gas prices to outcompete one another. This is similar to an auction (referred to, in this case, as priority gas auction — PGA) because block producers will eventually go for the transaction with the highest gas price to include next in the block. These actions can cause a spike in the price of gas fees on the entire network as users who want their transactions processed faster will pay higher gas fees.

How Ethereum’s fee market mechanism contributes to increased gas fees:

First: What is blockspace? Blockspace is the available space in a block to process & store transactions. Solana naturally has more blockspace than Ethereum because blocks are produced every 400 ms, unlike Ethereum where blocks are produced approximately every 12 seconds.

Second: What is fee market? Fee market is a mechanism that block producers use to price blockspace. In other words, it is the fee paid to access the state of a blockchain because once transactions are initiated, the state of the network will be modified, and accessing it means modifying the state of the current data. Data being modified means changes triggered by users’ transactions are being processed. It is on the blockspace that these changes happen. When users initiate transactions, they’re typically required to accompany them with extra costs (gas fees). The gas fee is used to compensate block producers for including their transactions in the blocks, i.e., users pay for blockspace. Fee market is important for several reasons, out of which security and validators’ incentivization are the most crucial. Without the fee market, bad actors will make it their mission to actively spam the network which leads to DoS attacks (a situation whereby spam transactions consume the network’s resources, causing congestion and denying legitimate transactions the resources urgently needed for them to be processed as a result of outage or the network becoming slow). Also, the fees that users pay to have their transactions processed serve as rewards for validators and incentivize other validators to become network participants.

Get Julia Ofoegbu’s stories in your inbox

Join Medium for free to get updates from this writer.

Third: What is global fee market? Global fee market is a mechanism where the fee required to access the state is the same across the network. What this means is that even users looking to perform simple transactions are expected to pay the same gas fee as users performing complex transactions or a user performing random transactions are charged gas fees the same as users who are performing transactions for a specific cause at a limited time. For instance, in a case where there’s a limited NFT mint happening and where many users are competing to ensure they mint the NFT, this could cause a gas fee spike to match demand. Now, a random user who’s not interested in the mint and just wants to send some tokens to his pal at the time the mint is happening will be affected because the gas fee that’ll be required of him will be as high (same) as those competing to mint. This is the fee market mechanism that Ethereum (along with some other chains) uses. That explains the reason why gas fees are unreasonably high on Ethereum on specific days/times. The year 2021 recorded the most days where gas fees on Ethereum were significantly high due to the NFT craze. For low-cost or high-performing blockchains that utilize global fee markets, the consequences won’t be that bad for obvious reasons.

Press enter or click to view image in full size
Screenshots of users pointing out Ethereum’s high gas fee in 2021

Ethereum’s Gas Fee

Press enter or click to view image in full size

Study the image above. A user paid 288 ETH ($700K at the time) as gas fee to make a transaction. What if I tell you that this happened two months ago — in October, not even during the NFT craze? You’d probably say I’m bluffing, so here’s your proof. Not to villainize Ethereum, there are days when gas fees are significantly lower on the network. An alternative fee market mechanism is the local fee market which blockchains like Solana and Sui use. Local fee market is designed such that transactions pay for only the state they access; blockspace is priced differently for users based on how simple/complex transactions are or how much is involved in the actual transaction or if the transaction is involved in the hot activity happening on the chain at a point (i.e., low gas fees for users, and even lower gas fees for users sending only a small amount or not participating in the major activity of the chain at that period).

2. Network congestion: Frontrunning and backrunning transactions can lead to network congestion because more transactions are being added to the mempool (and eventually, the block), and Ethereum, being single-threaded, can only handle a small number per second.

3. Market manipulation: These MEV attacks can lead to market manipulation as transaction prices and orders are closely monitored and exploited.

4. Wasted Blockspace: Searchers and block producers, using various MEV strategies, compete to include profitable transactions in the block, and in some cases, some of the transactions fail but still occupy blockspace and users still pay for the gas fee needed to compute. There is no threshold to the number of transactions that can be included in a block, so block producers can include as many or as few transactions in a block. These block producers can choose to only include a few profitable transactions in a block (even if there are more pending transactions in the mempool) and submit it in a bid to maximize their gains.

Impacts of MEV on Solana

  1. Network spamming: Solana blockchain doesn’t have a public mempool and unlike Ethereum where the block producers have to compete to create blocks (include transactions in the blocks), hence no one can tell who the next block producer will be; on Solana, the block producers are known before-hand. Nodes send the transactions to the validator-leaders who then propose the blocks. Due to the absence of a “waiting room” on the Solana blockchain, transactions are executed as they come in (FCFS basis). Meaning, that the first searcher who spots an MEV opportunity and submits a transaction to take advantage of it first gets to profit from it. So, MEV opportunists are not competing by increasing their gas fees, they have to find a way to be the first one. This results in network spamming. What these searchers do is that they send multiple versions of the same transaction (duplicate transactions) that they wish to submit to take advantage of the MEV opportunity. Imagine one searcher sending 10 duplicate transactions at a go. Now, imagine 5 searchers all vying for the same opportunity, each sending the same number of transactions for the same purpose. Those are 50 spammy transactions on the network. Each one of them does this hoping one of their spam transactions gets executed first. Of course, these transactions are escorted with gas fees but because gas fees on Solana are cheap, searchers don’t mind spamming. Spamming causes network congestion and low performance.
  2. Waste of resources (compute units & network bandwidth): Keep in mind that most of the spam transactions described in number 5 end up as failed transactions as only one will likely be successful. The computational resources used to process Solana transactions are measured in compute units. Even failed transactions use up compute units because they are initially processed before being indicated as “failed.”

Strategies to Mitigate MEV

Blind Ordering

This strategy involves keeping transaction data hidden until the ordering is determined and finalized by the validators. This makes it difficult for MEV actors to manipulate the transactions’ order to extract MEV. One technique that can be used is commitment schemes like commit-reveal schemes.

Commit phase — Users submit the commitments (transaction hashes) of their transactions rather than the full details of the transactions. These commitments don’t reveal the important data of the transaction, they are cryptographically hidden.

Ordering phase — Validators determine the order of the transactions based on the timestamp of the commitments, randomly using a verifiable random function or via auctions/bids.

Reveal phase — Once the order has been determined, the users reveal the transactions’ data by submitting the transactions together with cryptographic proofs showing that the previous commitments match the revealed transactions’ data. This makes it difficult for MEV actors to reorder transactions for profit because they don’t know the content of the transactions before ordering.

An implication of this is increased latency due to the commit-reveal steps and users have to submit transactions twice; the first time being the commitments and the second time being the full details. Flashbots implements blind ordering to some extent.

The sealed bid auction mechanism that Flashbots facilitate is a technique whereby users submit bundles of transactions along with their bid which expresses their willingness to pay for inclusion in blocks. Note that the bundles and the bids are sealed from the validators. Flashbots Protect is a way that prevents searchers from front-running users’ transactions. It shields users’ transactions from MEV attacks by routing them through a private mempool instead of a public one. Users have to add the Flashbots Protect RPC to their wallet first to use this.

Fair Sequencing Service (FSS)

Press enter or click to view image in full size
Source: Fair Sequencing Services by Chainlink

Chainlink introduced the Fair Sequencing Service in 2021 when they published the whitepaper titled “Chainlink 2.0: Next Steps in the Evolution of Decentralized Oracle Networks.” The idea was to provide a fair and unbiased way of ordering transactions to reduce MEV attacks and censorship of transaction orders. FSS utilizes a decentralized oracle network (DON) which is an off-chain service that provides a verifiable, fair order of transactions. How does it work?

When a user submits a transaction, the transaction is committed, i.e., the transaction hash is cryptographically generated to hide the details from the block builders and proposers. The transaction commitment along with those of others is then sent to Chainlink’s off-chain decentralized oracle network which consists of multiple independent nodes. These nodes work together to decide a fair ordering for the transactions by using a verifiable random function (VRF) to agree on a sequence for ordering the transactions. The VRF ensures randomness to prevent a predictable sequence. Once the sequence (order) is determined by the nodes, the details of the transactions that were hidden when they were committed will be revealed. The transaction order is finalized and sent to the blockchain.

Time-Lock Puzzle

This method aims to delay and prevent MEV attacks. It requires concealing transaction data via encryption until a pre-specified time is reached. This time is set to a point where it should be safe for the transaction to be successfully included in the blockchain without the risk of being reordered. Simply put, the transaction is time-locked to prevent a potential MEV attack. How does it work?

A user submits an encrypted version of their transaction with a time lock to prevent MEV actors from reading the content. The time lock is set to a specific block height (a future block) or time. The transaction can only be decrypted and the data revealed once that block height or time is reached or passed respectively- after which the order will then be determined. The idea is that after a certain time has passed, it becomes difficult to reorder the transactions because the validators had no prior knowledge about the contents of the transactions.

Cryptographical Privacy-Enhancing Solutions: ZKPs, MPC & FHE

Press enter or click to view image in full size
Source: What are Privacy-Enhancing Technologies? By Decentriq

Zero-knowledge technology is a cryptographic technique that allows parties to verify the authenticity of a claim (transaction) without revealing the details. It’s a mechanism for proving the validity of transactions between two parties where one party (the prover) proves the authenticity of the hidden data while the other party (the verifier) verifies the data. Zero-knowledge proofs are cryptographic proofs that the prover sends to the verifier to prove that his claim (transaction) is authentic. The verifier challenges the prover to confirm the validity of the information in the proof. This article helps you understand ZKPs.

Multi-party computation (MPC) is also a cryptographic technique that allows multiple parties to collaborate on an encrypted computational task using their private information but without revealing the details of the information (called secrets). Each participant’s data is private to them but they all have to work collectively to provide a valid output for the computational task. MPC is also referred to as secure multi-party computation (sMPC).

As MEV mitigation strategies, ZKPs and MPC can be used to hide important transaction details to prevent validators from extracting MEV. Relays can use ZKPs to encrypt bundles and blocks while sending proofs to validators to prevent them from viewing the details of the transactions. Regarding MPC, transactions are encrypted using threshold encryption which is used to create an encrypted mempool. Here’s a general overview of how threshold encryption works:

  • Each network participant generates a share of the decryption key to ensure no single participant can decrypt without the others.
  • The sender of the transaction generates a key (referred to as a symmetric key) which is encrypted and used to encrypt his transaction. Both the key and the encrypted transaction are sent to the mempool, This, along with the other encrypted transactions in the mempool is why it is known as encrypted mempool. Transactions in this mempool cannot be manipulated by validators because the contents are hidden.
  • The transactions are selected from the mempool and submitted to the blockchain as commitments but are not executed yet.
  • Once transactions are in, the key holders (the network participants) begin the decryption process. Each key holder decrypts the encrypted transactions to reveal the details. Full decryption/revealing only takes place if a minimum — threshold — number of participants decrypt using their key. This ensures that even if there are a few dishonest nodes in the network, there are still fewer chances of transactions being manipulated because there are more honest nodes.

Fully Homomorphic Encryption (FHE) is also an MEV mitigation strategy that falls under cryptographical privacy-preserving solutions. It is a cryptographic method of computing data where the data is encrypted but computations can be carried out on it without decrypting first. Users submit their transactions and it is encrypted using FHE; searchers scan the mempool for MEV opportunities and they can see those encrypted transactions but can’t see the important data they’d need to frontrun, backrun, or sandwich them; validators can still validate the encrypted transactions. This process ensures that transactions’ details remain invisible to searchers, limiting their ability to reorder.

Frequent Batch Auctions

Frequent batch auction is a transaction processing method where multiple transactions are aggregated into periodic batches and executed at the same time. Transactions in batches have a single, uniform transaction price, called clearing price. This clearing price is the same for transactions within a batch but it does not mean gas fees (meaning, users with smaller trade volumes don’t have to pay the same gas fee as those transacting higher volume. Each transaction still has its gas fee). Clearing price is not a fee to be paid per se, it’s merely a way to determine a fair market price for trading the cryptocurrencies included in each batch.

Press enter or click to view image in full size
Source: Understanding Batch Auctions by CoW DAO

Transactions can be collected into batches based on time intervals (transactions that come in within a fixed period) to prevent reordering or volume threshold (when a specified volume of transactions is reached). By processing transactions in time batches, there are fewer chances for searchers to frontrun target transactions to extract profit. It also prevents sandwich attacks.

CoW Protocol utilizes batch auctions by aggregating users’ intents (messages stating the asset they want to trade and amount) in batches, these batches are then auctioned off to solvers who compete, within a set period, to find the highest surplus (the price difference between the price CoW Protocol quotes the trading of an asset at and the price the trade is executed at). The solver who submits the highest surplus wins and gets to batch to the network on behalf of the users. CoW stands for Coincidence of Wants because it matches two intents between two users with opposite buy and sell intents of a token pair, say ETH/USDC — user A wants to sell ETH for USDC while user B wants to sell USDC for ETH.

Private Order Flow (POF)

Private order flow is a strategy that was developed to reduce the negative impacts of MEV by routing transactions through specialized private infrastructures — similar to dark pools — to prevent MEV exploitation of users’ transactions. This allows users to directly send their transactions to the network participants (relayers or block builders), bypassing the public mempool. These participants send the transactions (details of which are not available to the public) to validators who execute the transaction and receive the associated incentives.

POF is a commonly used tactic, especially for more complex and gas-consuming transactions. According to a BlockNative article, private orders constitute only about 30% of transactions on Ethereum, they still make up for 50% of gas used on Ethereum. This creates more room for centralization as network participants with more private orders submitted to them have more control over the flow of transactions in the network. Flashbots, Beaver Build, Titan, and Rysnc dominate the private order flow business, based on the data provided by the article.

MEV Blocker

MEV Blocker was developed by CoW DAO, Gnosis DAO (Agnostic Relay), and Beaver Build. It is an MEV protection solution that prevents frontrunning and sandwich attacks on users’ transactions while giving rebates on profit extracted from users via backrunning schemes. MEV Blocker is an RPC endpoint that protects users’ trades from being reordered for frontrunning and sandwich attacks but sends the transaction to searchers to search for backrunning opportunities — which the users, affected by this, will benefit from.

In other words, with MEV Blocker, searchers won’t be allowed to frontrun or sandwich your transactions but will be allowed to backrun it (if there’s an opportunity for it) for which you’ll be compensated. According to the website’s FAQ, users of MEV Blocker “receive 90% of the profit their backrunning opportunity creates.” Profit is automatically sent to users’ wallets, no need to claim. To use MEV Blocker, users need to add the MEV Blocker RPC endpoints to their wallets. Most wallets allow for the manual addition of custom RPC endpoints.

Press enter or click to view image in full size
How to add MEV Blocker RPC endpoints to your Ethereum wallet

Additionally, some DEXs offer MEV protection for trades. Here’s a guide to how transactions flow in MEV Blocker.

MEV-Share

MEV-Share is an open-source protocol designed by Flashbots organization. This protocol allows users to gain from the value extracted by their transactions.

How it works: Users submit their transactions to an entity known as MEV-Share Node (formerly called MEV-Share Matchmaker) which selects the details of users’ transactions to share with searchers. (Note: users can specify privacy preferences for their transactions). Searchers who are looking to extract MEV receive this partial information and submit partial bundles without seeing the full data of the users’ transactions. The MEV-Share Node simulates the partial bundles submitted by searchers and sends the successful ones to the block builders specifying a condition that the users must be compensated with 90% of the MEV captured from their transactions. To use MEV-Share, users can submit their transactions to Flashbots Protect which utilizes the Flashbots MEV-Share Node.

Flashbots’ MEV-Boost: Manage Rather Than Eliminate

Most of these strategies — some of which have not been tested in full scale — do not exactly eliminate MEV. Many attempts to eliminate MEV have failed, so instead of trying to kill MEV, these ideations are implemented to mitigate/democratize it because, in truth, validators see MEV as a far better incentive than just the gas fee collected for transactions and no one’s going to take away their “lunch money.” Flashbots’ MEV-Boost is a perfect example.

Before the Merge, miners (termed validators post-merge) had the responsibility of selecting transactions from the mempool, creating a block, ordering the transactions in the block, validating the block, and broadcasting it to the network to be added to the blockchain. With the Merge came the introduction of proposer-builder separation (PBS) which separates the role of validators into two: block building & block proposing. Block builders handle the first part (selecting transactions from the mempool, creating blocks, ordering transactions in the blocks, and sending them to the block proposer). Block proposers receive the blocks from the block builders, verify the transactions in them, and broadcast them to the network.

Ethereum researchers introduced the idea of PBS while Flashbots built MEV-Boost as an implementation of PBS. MEV-Boost is a block-building marketplace where searchers can connect and submit bundles directly to block builders. Validators also access block builders and relays via this marketplace. MEV-Boost gave an idea of how PBS would work.

Press enter or click to view image in full size
Source: Introduction to Block Proposal and MEV-Boost Processing by BlockBeats

The main idea behind PBS was to remove the censorship validators had in the entire process, from selecting transactions to submitting blocks to the network. Searchers bribe the block builders (by bidding) to have their bundles included at the top of the order. Block builders select profitable transactions and bundles first, create blocks, and add them to the blocks before sending them to the relays. Relays connect the builders’ blocks to the validators while concealing the content to prevent validators from trying to copy the transactions. Validators (block proposers) pick the most profitable blocks, execute the transactions, and then submit them to the network.

This approach doesn’t exactly mitigate MEV, rather it decentralizes MEV extraction by creating a more transparent block-building marketplace.

Final Words

Maximal Extractable Value exposes the underlying profit-seeking world happening within blockchain networks. Most mitigation strategies described above aim to reduce the impact of MEV. Those strategies (e.g. privacy solutions) that seem like good approaches to prevent MEV are not being widely adopted for obvious reasons. This begs the question: will MEV ever be eliminated? That is left to be seen. As of now, people have settled on strategies that mitigate MEV or distribute profit among every participant including users. In truth, most users don’t know/don’t care that profit is being extracted from their transactions, as long as their transactions get executed and confirmed.

References

https://docs.flashbots.net/

https://ethereum.org/en/roadmap/pbs/

https://www.alchemy.com/overviews/proposer-builder-separation

https://www.alchemy.com/overviews/mev-boost

https://blog.chain.link/chainlink-fair-sequencing-services-enabling-a-provably-fair-defi-ecosystem/

https://arxiv.org/html/2407.19572v1#S4

https://prof-project.github.io/

--

--