Is MEV good or bad?
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 not everyone agrees that MEV is bad.
In this article we’ll be exploring the pros and cons of MEV and most importantly, how you can protect your transactions from MEV, if you decide it’s not for you.
Is MEV inevitable?
On Proof-of-Stake blockchains such as Ethereum, validators - contributors who validate transactions to help keep the network secure - are free to select which transactions they process first. This is different from markets you would find in TradFi, where the order of transactions are strictly enforced by regulators.
Because of this unique feature, users can offer incentives to process their transactions faster than they might process others. This incentive typically comes in the form of a payment, or gas fee on Ethereum. This unique feature on Ethereum and other, similar chains allows MEV to take place.
While there are many types of MEV, the most common is frontrunning. Sophisticated traders and bots scan the mem pool, a digital holding area where all transactions wait to be processed. When it identifies a transaction it believes it can make money out of, it places a transaction for the same asset, and pays extra to have it processed before the transaction it wants to front run.
By the time the target transaction has been completed, the frontrunner has made a profit. But not everyone believes this is a bad thing. Let’s explore the pros in the next section.
The good
The presence of MEV can lead to improvements in how markets are run. At a high level, the presence of MEV bots can help them run more smoothly by eliminating efficiencies in how markets are run.
Arbitrage and liquidations are common trades that flow through MEV infrastructure. Arbitrage is a useful activity that keeps prices aligned between, say, a DEX’s AMM price and the price of the broader market.
Improved economic inefficiencies
Liquidations, meanwhile, are important for the smooth operation of over-collateralized lending platforms like Maker DAO, for instance.
MEV activity is necessary to do things like maintain stablecoin pegs and rebalancing liquidity across different pools. MEV bots compete to buy assets at a low price from one source and sell it to another as quickly as possible.
The profit taken from the price difference ensures AMM liquidity pools remain balanced. There are also other less obvious yet potentially beneficial effects of MEV. One of which is the incentive for validators to remain engaged in the maintenance of networks when prices are low.
By having a larger pool of validators, who can remain engaged during market downturns - thanks to the additional incentives earned through MEV - can help keep a network decentralized.
Fast price corrections across decentralized exchanges
MEV can also bring benefit to blockchains because it incentivizes price normalization and ensures events like liquidations are efficiently executed. Because there is inherent value to capture, MEV bots can exchange assets across pools to maintain the ecosystem without liquidity providers’ or lenders’ involvement. This phenomenon also appears in other DeFi mechanisms where some form of asset rebalancing takes place.
The bad
While MEV can have its benefits, it also has a number of drawbacks: namely that it creates unfairness. Sophisticated actors familiar with the mechanics of blockchains like Ethereum have developed numerous ways to exploit users with less knowledge.
MEV makes money for searchers, block builders, and Ethereum validators at the expense of regular users, especially beginners who don’t know how to protect themselves. As of the time of writing, sandwich attacks on AMMs and aggregators alike generate almost $1 million in profit for searchers each week.
Over time, persistent MEV erodes market confidence as traders realize they are at a constant disadvantage to more sophisticated actors. Ultimately, MEV may pose an existential threat to blockchain ecosystems like Ethereum so it’s imperative for solutions to emerge that protect everyday traders from price exploitation.
The compromise
The reality is, there is little appetite to change the design of chains like Ethereum, meaning MEV is here to stay. While it does help prices remain consistent across different liquidity pools, it creates a hierarchy between sophisticated actors looking for arbitrage and regular users unaware that their transactions could be exploited.
But there are ways to guard against MEV. In the below sections we’ll be exploring each one, and also solutions that do the hard work for you.
Methods of defense
There are a wide range of methods you could use to help mitigate against the effect of MEV. The good news is there are many projects - including CoW DAO - that are already aware of this problem, and have built a number of solutions to ensure your trades and transactions are MEV free.
But as you will see, while there are many different ways you can protect yourself, there are few that combine all these defenses into a single solution that’s easy to use. Like CoW Swap, or MEV Blocker.
Off-chain single batch settlement
Off-chain single batch settlement is an idea that’s designed to keep prying eyes from seeing what transactions you are submitting before they are put into a block to be verified.
Off-chain settlements are, like they sound, transactions that take place away from the main blockchain. One such technique for using off-chain settlement is to use a layer 2, a second blockchain built on top of the main blockchain.
By settling off-chain, the order of those transactions, the primary attack vector for MEV bots, is irrelevant. That’s because by the time the transactions are added to the mem-pool, they have already been completed, meaning arbitrage can’t take place because the prices of the transactions have already been fixed.
Fair Sequencing Services (FSS)
Fair Sequencing Services (FSS) is a decentralized framework that helps ensure that transactions are ordered fairly and impartially, and that smart contracts process transactions in a fair manner. FSS is designed to help DeFi developers create more equitable systems for users.
FSS combats MEV by using an oracle network to order transactions sent to a contract. An oracle is a data source used to verify whether data is accurate. In the case of FSS, it ensure transactions are in an order that makes exploitation more difficult.
Explicit specification of maximum slippage
Slippage is the difference between the expected price of a trade and the price at which it is executed. It can occur at any time, but is more likely to happen during periods of high volatility or when orders exceed the available liquidity.
When it comes to transacting on a blockchain, users are able to adjust the level of slippage, which is commonly expressed as a percentage of the total value. For example, if you set slippage at 5%, this creates an acceptable range whereby the price can move before it is finalised.
When trading in DeFi, it’s important to set as low a number as possible to ensure you’re not being exploited by MEV bots. The lower the number, the less price variation. But there are limits. If there’s limited liquidity for the coin you’re trading, the transaction might fail if the slippage range is too small.
Using RPC endpoints for MEV protection
RPC endpoints or Remote Procedure Calls, are an intermediate layer that routes transactions from a user’s wallet to the blockchain itself. Transactions pass through RPC endpoints before getting to the mem pool, so RPCs can provide additional functionality across any blockchain application or protocol. Think of RPCs as a middle-man which can be used to improve security.
CoW DAO uses this unique feature of public blockchains to create a safety layer that helps protect transactions from MEV bots.
MEV Blocker provides access to a permissionless network of searchers while hiding transactions from the public mem pool. 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.
Want to try MEV Blocker for yourself? Start here.
CoW Swap's Uniform Clearing Prices
Another unique feature of CoW Swap is its uniform clearing price.
CoW Protocol collects and aggregates intents off-chain and settles them together in groups, known as batches. These batches are then "auctioned off" through a competition to the solver offering the most surplus for the orders in the batch.
Batch auctions allow for Uniform Clearing Prices (UCPs), where an asset that appears multiple times across orders in the same batch settles for a consistent price. This makes transaction order irrelevant within the block, undermining the ability for MEV bots to extract value.
CoW Swap's Coincidence of Wants
A unique feature of CoW Swap is its use of what’s called a Coincidence of Wants - which also happens to be the meaning of CoW in CoW DAO!.
A coincidence of wants is an economic phenomenon where two parties swap assets with one another peer-to-peer. Typically users would have to use an exchange such as Uniswap to complete this trade, but on CoW Swap, you can do it off chain.
CoW Swap orders start out as signed “intent to trade” messages that get batched together before getting sent to on-chain liquidity sources like Uniswap. As a result, CoW Swap can match orders peer-to-peer when the opportunity arises.
This has two benefits: gas fees are lower, and second, it avoids transactions going through the public mem pool, adding an extra layer of security.
CoW Swap's Delegated Trade Execution
CoW Swap’s unique “solver” feature protects users from MEV by completing transactions on their behalf. Solvers are dedicated third parties whose role it is to search for the best price for trades submitted by users.
A group of solvers compete against each to find the best price for trades. They do this by searching across multiple DEX’s looking for the best prices - hence why CoW Swap is referred to as a meta DEX - because it searches all the other DEXes to find you th ebest price.
The most competitive solver is then awarded the trade, and any savings they generate for the user, they pass on to the user.
The CoW approach to MEV protection
CoW DAO’s MEV Blocker and CoW Swap have safety baked in. They are designed specifically to protect you from MEV attacks.
In the case of MEV Blocker - this is a stand alone product that you can add to your wallet to enjoy the full benefits of MEV protection. This works by using what is called an RPC or a Remote Procedure Call. This 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.
With CoW Swap meanwhile, it provides MEV protection whenever you trade on the DEX. CoW Swap 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. Thanks to a powerful combination of delegated trade execution, batch auctions, and protected transaction flow through MEV Blocker, CoW Swap users benefit from thorough MEV protection on all trades.
Interested to learn more?
If you want to dive deeper into MEV Protection and how CoW DAO does it, head this way.