HomeKnowledge BaseUnderstanding MEV Protection

Understanding MEV Protection

6 min read

MEV, or maximal extractable value, is a form of price exploitation that acts as a “hidden tax” on Ethereum transactions.

To date, MEV has caused over a billion dollars in losses for everyday traders, especially beginners who often don’t know how to protect themselves.

1-understanding-mev-protection.webp

In this article we’ll take a look at what MEV is and explore some of the popular protection solutions.

What is MEV protection?

MEV protection refers to a broad set of strategies that keep users safe from price manipulation when trading, providing liquidity, minting NFTs, and more.

What exactly are you protecting against?

To understand MEV, we must first understand how Ethereum transactions are processed.

2-understanding-mev-protection.webp

When a user places an order, it initially 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. MEV relies on reordering transactions from the order in which they were submitted to a new, more profitable order.

To better understand this process, let’s trace the flow of a sandwich attack — the worst type of MEV.

3-understanding-mev-protection.webp

Essentially, traders place orders on AMMs by designating a slippage tolerance. Searchers can exploit these orders by placing similar trades before and after the user trade, manipulating the price of the assets on the AMM and forcing the victim trade to execute at a higher price.

Searchers pocket this difference in price for themselves. Their only cost is the amount of money they spend bribing the Ethereum block builders to order the transactions in a specific way.

To learn more about the different types of MEV, check out our articles on sandwich attacks, frontrunning, and backrunning.

Now let’s take a look at how you can protect yourself from MEV.

Slippage tolerance and MEV protection

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.

RPC endpoint tools for MEV protection

A better protection method 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. Recently, however, specialized RPCs have begun incorporating extra security guarantees for transactions before they reach the blockchain.

MEV Blocker

One of the most popular specialized RPC endpoints 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 send 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.

Decentralized applications and MEV protection

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.

Native MEV protection on CoW Protocol

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.

4-understanding-mev-protection.webp

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 offchain 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.

CoW DAO protects you from MEV

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.

DeFi traders can rely on CoW Swap as the most trusted decentralized exchange when it comes to MEV protection. For all other use-cases, including liquidity providing, NFT trading, and more, MEV Blocker provides extensive MEV protection anywhere on Ethereum.

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.”

Safe trading!