Bitcoin
$42,667.50-6.54%
Ethereum
$3,009.85-5.68%
XRP
$0.935644-5.30%
Cardano
$2.09-3.62%
Polkadot
$28.98-8.31%
Stellar
$0.279936-5.51%
Dogecoin
$0.207681-6.95%
Chainlink
$23.21-10.61%
Uniswap
$20.94-8.15%
Polygon
$1.14-8.46%
Litecoin
$158.44-5.16%
Bitcoin Cash
$535.29-7.95%
Cosmos
$35.08-15.84%
Wrapped Bitcoin
$42,692.83-6.51%
Algorand
$1.67-8.72%
Filecoin
$73.79-8.02%
The Graph
$0.697330-10.05%
Tron
$0.091824-4.98%
Ethereum Classic
$48.95-7.40%
Aave
$293.86-9.21%
Tezos
$5.11-12.51%
Monero
$229.50-8.74%
NEO
$40.54-10.46%
EOS
$4.16-10.27%
IOTA
$1.29-10.85%
BitTorrent
$0.003324-8.64%
Bitcoin SV
$136.17-9.92%
Maker
$2,473.29-5.91%
Waves
$23.57-6.47%
Dash
$170.20-6.13%
Decred
$117.09-12.18%
OmiseGO
$10.62+20.46%
ICON
$1.62-2.86%
Decentraland
$0.666637-11.49%
NEM
$0.152970-9.47%
Zcash
$117.19-7.32%
NuCypher
$0.279968-8.85%
Paxos Standard
$1.01+0.76%
Yearn Finance
$29,277.01-7.39%
Qtum
$10.25-10.03%
Bitcoin Gold
$54.58-9.73%
Basic Attention Token
$0.651905-5.92%
0x
$0.906235-8.49%
Bancor
$3.51-7.41%
Ren
$0.780388-5.69%
Fetch.ai
$0.660158-6.23%
Band Protocol
$7.54-9.98%
Siacoin
$0.015260-9.60%
Kava.io
$5.06-8.26%
Nano
$4.78-6.18%
Loopring
$0.403237-5.93%
Storj
$1.13-8.65%
Numeraire
$40.12-8.69%
Lisk
$3.03-10.70%
Civic
$0.412231-10.43%
Orchid
$0.327630-7.15%
PAX Gold
$1,769.55+0.55%
Augur
$21.64-8.82%
Aragon
$4.93-12.88%
Enzyme
$103.33-7.03%
district0x
$0.149382-8.39%
Kyber Network
$1.48-8.63%
SingularDTV
$0.001390-0.36%
Tether
$0.999911-0.04%
USD Coin
$1.00+0.01%
Dai
$1.00-0.02%

How to Fix Ethereum’s MEV Problem and Give Traders the Best Price

MEV is a growing problem for Ethereum, but it can be mitigated through careful protocol design and economic theory.

CoinDesk Insights
Jul 27, 2021 at 3:29 p.m. UTC
Updated Sep 14, 2021 at 1:31 p.m. UTC

As mainstream adoption gathers steam and the number of decentralized finance (DeFi) transactions explode, the Ethereum community is debating a growing controversy: the best way to tackle the Miner Extractable Value (MEV) problem. 

Disputes come as no surprise given that in the past three years, the total value locked (TVL) in DeFi applications has gone from zip to $54 billion today. In 2021 alone, DeFi on Ethereum has enjoyed a colossal rise in value, increasing 246% already by July.

Dr. Friederike Ernst is chief operating officer at Gnosis.

But with rising value comes increased attempts at exploitation, as we’ve seen with the co-occurring rise of MEV.

Defined in a 2019 Flash Boys 2.0 paper by a group of researchers at Cornell University, MEV is “the measure of the profit a miner can make through their ability to arbitrarily include, exclude or re-order transactions within the blocks they produce.” Miners can exploit and profit from front-running, back-running and sandwiching transactions in any block they mine. These types of activities are not well received by DeFi users as they translate to higher costs for executing transactions, and have a higher chance of paying for a failed transaction.

As DeFi scales and pulls in wider adoption, such behaviors affect more users and transactions than ever and are unlikely to be solved by Ethereum’s transition from proof-of-work (PoW) to proof-of-stake (PoS), according to a report from research group Flashbots. 

Why MEV is an issue

Is MEV really that bad for Ethereum? Well, it depends on which side of the fence you’re on. Since January 2020, miners have "extracted" nearly $750 million in value from Ethereum users. In the last 30 days, that figure stands close to $94 million. 

MEV-type value extraction, executed by miners who hold sole power to organize transactions within a block, is endemic due to the Ethereum Virtual Machine (EVM) mempool design. This element of mempool design has garnered the Cixin Lin-inspired nickname “the dark forest," a side effect of the EVM architecture that goes unnoticed by most users.

In a nutshell, every transaction on Ethereum submitted to the chain is monitored to check if there’s a possibility of taking advantage of it. It’s in the dark forest that the mainstream Ethereum community learned there is often an adversarial relationship between users and miners.

The MEV “dark forest” gives rise to two intertwined problems: 

  • DeFi users are constantly suffering from all types of MEV, such as front-running attacks that end up making the users' transactions fail even though they paid to execute them, or back-running attacks where the users get value extracted from their operations solely because the miners are in a privileged position. 
  • Even when a transaction tries to prevent a possible protocol exploit, it can still lead to a bigger problem because the existence of the transaction itself signals the protocol weakness to everyone else.

Not all hope is lost. 

Batching solutions

MEV is not going to go away unless we design resilient components for users. Critical infrastructure and correct tooling for DeFi are necessary to combat the problem. And it has to be at the dapp level. The transition to proof-of-stake is an unlikely solution, as changing Ethereum's core protocol requires a very high level of consensus (which is most likely not going to happen). 

There are multiple ways in which dapps or users can combat MEV, but the most realistic approach is to have a trading mechanism (protocol) that enforces batch auctions. Batch auctions, or batch trading, is when an exchange's order book processes orders across a time range with the goal of executing all trades within a batch simultaneously. This serves as a price finding mechanism for correctly pricing token pairs with the same clearing price for each block.

In traditional markets, batch auctions are used during market opens to process all the orders placed during non-market hours. In DeFi, batch auctions are helpful to execute numerous transactions simultaneously in the same block. 

In a system where miners or validators have all the power to reorganize transactions, batch auctions settlements can take away that power from them. This is because a batch settlement forces the miners to execute transactions regardless of the order they have. With a batch auction with uniform clearing prices, the order of the trades can not alter the prices. 

Batch auctions allow dapps built on top of a protocol to offer users improved trading methods, such as: 

  • Gasless order submission, or when users submit off-chain orders via signed messages 
  • Enforcement of the same prices for all trades that happen at the same time, even if they are from different traders
  • Helping users get matched directly with one another – in a "coincidence of wants" – without depending on external, third party liquidity pools

Off-chain, more gain

Submitting off-chain orders through signed messages is a new way of conducting trading that has not been widely used before. Dapp users don’t need to submit on-chain orders for them to be valid. Rather, they can submit off-chain orders by signing a transaction with their order preferences (they are signing a message with their intent to trade).

Because the orders have been placed off-chain, the transactions are not sent to the mempool individually, until they are later sent and settled via the batch auction settlement transaction all at once. This means they can be settled all together in a single batch, which increases the difficulty to replicate and makes the re-organization of transactions irrelevant because all trades have the same price regardless of the order.

At the same time, off-chain orders can allow a protocol to be non-trading route dependent, so that even if a miner is able to pick up the signed messages and tries to take advantage of them, it would be irrelevant as the miner does not know against which AMM pool those trades will be settled. As the protocol does not force users to be bound to a specific trading path, it can focus on achieving better prices rather than on executing transactions the fastest. 

Protocols that have price-finding mechanisms based on batch auctions with uniform clearing prices and coincidence of wants (CoWs) can offer their users a level of MEV protection unmatched by any other form of MEV prevention developed so far. (Coincidence of wants is an economic phenomenon where two parties each hold an item the other wants, so they exchange these items directly without the need of a third party providing liquidity to facilitate the exchange to happen.) 

On a deeper level, this means that if protocols use batch auctions instead of a constant function market maker design, they can offer their users the chance to settle trades directly based on the CoWs that can be found. The protocol can therefore optimize prices according to the different orders it receives in each batch, so that it’s always able to give the best price to traders while protecting them from MEV. As we mentioned before, batch auctions can also allow a protocol to establish uniform clearing prices, which, along with CoWs, can help users be protected from MEV.

This protection comes from the fact that, because the protocol matches the trades without external on-chain liquidity. In other words, in the event of a COW, the protocol would not need to execute an on-chain transaction against an automated market maker (AMM) to make the trades liquid.

Additionally, if no CoWs can be found, uniform clearing prices within a batch auction make the transaction ordering of the auction irrelevant because all trades of the same token pair get the same settlement price, therefore removing the possibility of MEV actors having a chance to extract value by reorganizing transactions. 

MEV is a growing problem for Ethereum, but it can be mitigated. Protocols focused on batch auctions, with these sorts of qualities, can help the DeFi-automated market maker space in the fight against MEV. It’s up to us as a community to ensure we only use those dapps that have the users interest at heart, and that allow them to coordinate trades in a smarter and more efficient manner.

Thanks to Alex Vinyas & the Gnosis team for their feedback in developing this op-ed.

DISCLOSURE

The leader in news and information on cryptocurrency, digital assets and the future of money, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Loading...