MEV Blockers Explained
MEV or “maximal extractable value” is a hidden tax on all types of Ethereum transactions. Any time you make a DeFi trade, buy or sell an NFT, or lend tokens to a liquidity pool, opportunistic users known as “searchers” may manipulate your trades, resulting in unfavorable prices, failed transactions, and missed opportunities. Enter the MEV Blocker.
MEV Blockers are a relatively new piece of blockchain infrastructure. Their role is simple: protect orders from price exploitation resulting from MEV. But how do they work?
In this article, we’ll be exploring how MEV Blockers work, the technology behind them, and how you can use them in your own trades.
Hint: use MEV Blocker.
What is MEV?
First, it’s important to understand what we mean when we say MEV, as there are a number of different facets to it.
Blockchain technology is great at ensuring the validity of all transactions and creating new blocks with no downtime, however, not all transactions are ordered in the same manner that they are submitted.
While block producers have full autonomy over selecting which transactions to include in each block, they usually opt to maximize profits by ordering transactions based on who pays the highest gas price. This means that validators may re-order transactions before creating the block. Re-ordering transactions with a profit motive are known as “maximal extractable value” (MEV).
In other words, MEV is the profit extracted by miners or other actors in the blockchain network who insert, remove, and re-order transactions.
According to Flashbots, a research and development organization focusing on MEV, well over $1 billion in MEV has been extracted just since The Merge. This value is only the recorded amount paid out to Ethereum validators; the attackers themselves have earned much more.
MEV creates a set of skewed incentives. On certain days, Ethereum validators earn more ETH from extracting MEV than from network fees themselves.
Some MEV activities are indeed legitimate, as the practice makes sure that transactions are ordered in an optimal way. Overall, however, the practice creates unfair advantages for a small minority.
The different types of MEV attacks
Digging into MEV more specifically, what’s important to know is that there are several different types of MEV that attack different
Frontrunning attacks
Frontrunning is when a bot sees a profitable transaction in a public mempool, duplicates it, and places their own order in front of the victim transaction, extracting its value for themselves.
Backrunning attacks
These attacks are similar to frontrunning but in reverse. In backrunning, the attacker places a transaction after the victim transaction to capitalize on any arbitrage left by the victim’s order. Frontrunning and backrunning transactions are not very common by themselves, but a combination of the two, known as a “sandwich attack,” accounts for most MEV.
Sandwich attacks
Sandwich attacks combine frontrunning and backrunning, placing a buy order before the victim transaction and a sell order directly after. This creates a “sandwich” of the victim transaction.
How is MEV even possible?
MEV is possible because validators are free to order blockchain transactions as they see fit in order to maximize their profits. Proof-of-stake (PoS) blockchains such as Ethereum use parties known as “validators” in order to ensure that the consensus rules of the blockchain are followed by all participants.
Validators get randomly selected to add the next block to the blockchain. In this process, they determine what transactions are included in the block, and in what order.
When you submit a transaction on Ethereum, it does not immediately get added to the next block. Instead,
it first goes into the “mempool” which is the collection of all pending transactions. Validators then pull transactions from the mempool and add them to the next block when it’s time for it to be built.
Here is where the opportunity to extract value through MEV comes in.
Validators are not required to add transactions to the block in the same order that they were submitted by users, so searchers can pay validators a fee to order transactions in a specific way. For example, they can pay to have their transactions come first if they want to frontrun someone else, or they can pay to have their transactions come right after a specific transaction if they want to perform a backrun — both are types of MEV.
So now that we understand how MEV works, how does an MEV Blocker stop all of this?
What does an MEV Blocker do?
An MEV blocker is a piece of blockchain infrastructure that protects orders from price exploitation resulting from MEV (Maximal extractable value).
Under the hood, it’s RPC endpoints that function as MEV Blockers by routing transactions through specialized mempools which protect them from MEV and even send rebates back to traders when their trades leave money on the table.
There’s a lot of moving parts when it comes to MEV blockers, so let’s break the topic down one step at a time.
How do MEV Blockers Work?
Since MEV relies on reordering transactions from the order in which they were submitted to a new, more profitable order, it’s possible to cut the process short by sending transactions to a specialized network of searchers bound by unique rules that ensure favorable execution for users.
These searchers cannot frontrun or sandwich transactions. Rather, they capture value by backrunning large orders and sending a large portion of the backrunning profits back to the users as a rebate. So, as a user, you’re not only protecting yourself from harmful price exploitation in the form of frontrunning and sandwich attacks, but you also have someone looking out for you any time you leave money on the table.
What is an RPC endpoint?
We mentioned earlier that under the hood, MEV blockers run through RPC endpoints. An RPC endpoint is a communication layer between the blockchain and a user’s wallet. RPC endpoints relay messages from the wallet that RPC nodes use to add orders to the blockchain.
RPC endpoints are the perfect place for MEV protection because they are an intermediary layer between the wallet and the blockchain, safely re-routing transactions towards the specialized network of searchers we mentioned earlier, rather than letting them end up in the public mempool where malicious searchers lie in wait.
What are Order Flow Auctions and how do they help MEV Blockers do their job?
MEV Blocker RPCs rely on a blockchain mechanism known as order flow auctions. Order flow auctions are bidding mechanisms used at various levels of the Ethereum stack which pit multiple execution parties against each other to find the one that can provide users with the best value for their transaction.
Currently, block building incentivizes MEV extraction by awarding the privileges of creating the next block to the builder who can extract the most value from the trades. Order flow auctions invert this dynamic — incentivizing auction participants (in the case of MEV blockers, this is the specialized network of searchers) to instead find as large of a rebate as possible for the user submitting the transaction.
The searcher who bids the most to backrun a trade wins the auction, capturing some small value of the proceeds for themselves and sending the rest back to the user as a rebate.
So, should you use an MEV Blocker?
While many people have yet to learn about MEV blockers, they’re quickly being adopted by some of the most savvy traders to protect their trades, NFT swaps, LP positions, and more. MEV is an increasingly significant problem for traders of all sizes and MEV blockers are designed to outsmart the searchers with the latest innovations in market mechanics.
You may have heard that MEV is only a problem for large trades, but as searchers get more and more sophisticated, this is becoming less true. Searchers can also extract value from small trades, especially in volatile markets, and beginner traders are especially susceptible to price exploitation as they may not yet know how to protect themselves.
MEV blockers provide robust protection. As a user, you install the MEV blocker through your wallet and forget about it, meanwhile it’s quietly protecting you from price exploitation and even forwarding rebates from any money your trades leave on the table.
CoW DAO became a first mover in the MEV blocker space when it introduced MEV Blocker (yes, we coined the term) in April of 2023.
MEV Blocker (capital “B”) is an RPC endpoint developed by CoW DAO in collaboration with Beaver Build and Agnostic Relay that’s built to protect Ethereum transactions from frontrunning and sandwich attacks.
MEV Blocker sends transactions to a mempool of searchers who bid for the opportunity to backrun the trades, sharing any profits 90/10 with users (90% to users, 10% to searchers.)
To join over 2 million Ethereum users receiving nearly 4,000 ETH in rebates, add MEV Blocker to your wallet by following the instructions here.