What is MEV Resistance?
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.
But that doesn’t mean you just have to sit there and watch as people make off with your hard earned money.
MEV resistance is a response to this threat. There are many techniques and pieces of technology that can help you resist MEV attacks on your trade. In this article, we’ll take you through what they are, and the products CoW DAO has built to make resisting MEV simple.
What is MEV?
Before we work out how to resist MEV, we need to understand what it is and the attack vectors - the places where your trades are vulnerable - people use to extract value.
MEV, or maximal extractable value, is a form of price exploitation that acts as a “hidden tax” on Ethereum transactions. MEV is responsible for billions of dollars in losses for everyday traders, especially beginners who often don’t know how to protect themselves.
To understand how it happens, we must first understand how Ethereum transactions are processed.
When a user places an order, it gets submitted to a holding area for pending Ethereum transactions known as the “mempool.” Transactions in the mempool are public, meaning that MEV bots (known as “searchers”) can monitor them for exploitation opportunities.
An MEV attack uses a feature of how Ethereum transactions are processed: validators can reorder transactions based on how much someone is willing to pay to prioritise their transaction over someone else’s. Let’s look at an example of a type of MEV called ‘sandwich’ attack.
-
A user places a transaction, and it’s added to the public mempool.
-
Bots called ‘searchers’ monitor transactions looking for trades that they could potentially exploit.
-
Once a profitable trade is identified, the searcher places a trade before and after your trade. The first trade pushes up the price, forcing the user to pay a higher price for their transaction. A subsequent trade after the users takes advantage of the higher price and sells. The result is a series of trades that leaves the original user out of pocket.
But sandwich attacks are just one type of MEV attack. There are frontrunning attacks and backrunning attacks.
To learn more about the different types of MEV, check out our articles on sandwich attacks, frontrunning, and backrunning.
The above example helps provide context for why MEV resistance is important: it helps protect your trades from prying eyes. In the next section we’ll explore ways of building in MEV resistance into your trades.
How to create your own MEV resistance
The most basic defense against MEV is setting a low slippage tolerance.
Since MEV relies on slippage for price manipulation, transactions with a lower slippage tolerance give searchers less room to exploit trades.
For users who aren’t utilizing any other MEV protection tools, setting a lower slippage tolerance can be a good first line of defense, however it’s by no means a complete solution.
Setting the slippage tolerance too low often results in failed transactions. Even with optimal slippage, MEV bots may still be able to extract value from your trades. Let’s take a look at a more robust technique.
Using an RPC endpoint to help protect against MEV
A better way to resist MEV is to install an MEV protection RPC endpoint.
A Remote Procedure Call (RPC) endpoint is an intermediate layer that routes transactions from a user’s wallet to the blockchain itself.
Transactions pass through RPC endpoints before getting to the mempool, so RPCs can provide additional functionality across any blockchain application or protocol.
Normally, RPCs are a boring piece of blockchain infrastructure. But more recently, specialized RPCs have begun incorporating extra security guarantees for transactions before they reach the blockchain. One of those is MEV Blocker.
As the name suggests, MEV Blocker provides protection against MEV across all of Ethereum. The RPC works by managing a permissionless network of searchers and hiding transactions from the public mempool. These searchers cannot frontrun or sandwich user transactions. Instead, they capture value through backrunning.
Anytime a searcher backruns a user’s transaction, the searcher keeps up to 10% of the value and sends the other 90% back to the user as a rebate. So even when a transaction leaves money on the table, MEV Blocker puts it back into the pockets of users.
MEV Blocker provides protection for any type of Ethereum transaction (not just swaps), and it works with all Ethereum wallets. Install the MEV Blocker RPC endpoint by following the instructions here.
But if the thought of installing and MEV Blocker manually feels like too much hard work, there is another option.
Baked in MEV Resistance
While RPC endpoints provide significant MEV protection, the most complete protection comes at the application layer.
As MEV has become more prevalent, decentralized applications (especially decentralized exchanges — DEX’s) have begun offering creative protection solutions to users. For example, many DEXs offer an “auto-slippage” feature which determines the optimal slippage for user trades, reducing the chances of price exploitation. But some go further than that.
CoW Protocol is a meta DEX aggregator that finds the best prices for trades and provides comprehensive MEV protection. The protocol uses a unique trading mechanism that relies on batch auctions and intents to achieve the best outcomes for users.
Starting at the application level, CoW Protocol provides end-to-end MEV protection through its unique protocol design:
-
Delegated Trade Execution: On CoW Protocol, bonded third parties known as “solvers” execute transactions on behalf of users. Solvers source liquidity across multiple DEX’s and even off chain liquidity sources to find the best prices for any given trade. Solvers also execute transactions on behalf of users, meaning they are never exposed to the blockchain directly.
-
Coincidences of Wants (CoWs): Thanks to CoW Protocol’s batching mechanism, trades may be matched using peer-to-peer liquidity in a Coincidence of Wants (CoW). This method of trading bypasses AMMs, reducing fees and preventing MEV.
-
Uniform Clearing Prices: Another benefit of batching is that duplicate trade pairs within a given batch clear for the same price. For example, if multiple users are trading ETH and USDC in the same batch, the assets will execute for the same price across the various trades. This makes transaction reordering useless, removing the opportunity for price exploitation.
Thanks to a powerful combination of delegated trade execution, batch auctions, and protected transaction flow through MEV Blocker, CoW Protocol users benefit from thorough MEV protection on all trades.
Want MEV protection on all your trades? Use CoW Swap
MEV is a billion dollar problem for the Ethereum ecosystem. CoW DAO builds products to protect users from negative outcomes for transactions of all types and sizes. Another one of those is CoW Swap.
CoW Swap takes the world of DEX aggregators and takes it to the next level. CoW Swap is not only the largest intent-based aggregator, it’s also one of the largest DEX aggregators. In November 2024, it handled $6.2 billion in trading volume, and is trusted by thousands of traders.
Whales and DAOs (as well as retail users) rely on CoW Swap as their aggregator of choice too because CoW Swap does more than just aggregate liquidity. It also provides comprehensive MEV protection and enables price optimizations — such as CoWs — that traditional aggregators can’t. Thanks to its intent-based architecture, CoW Swap supports 22 solvers that compete with each other to find the best prices for each user trade, and even provide a price surplus on top.
While other aggregators claim to provide the best prices, CoW Swap’s architecture is built from the ground up to incentivize the best prices and the most surplus for trades, all in an easy-to-use, worry-free interface.
Give CoW Swap a try for yourself at swap.cow.fi.
If you want to learn more about MEV, check out “MEV Transparency: Ensuring Fairness In DeFi Markets” and “How CoW Swap solves the MEV problem.”