What is MEV?Behind the scenes of most major blockchains, shadowy super-coders and the bots they build are using the transparency of blockchains and th
What is MEV?
Behind the scenes of most major blockchains, shadowy super-coders and the bots they build are using the transparency of blockchains and the transaction fee market to their advantage. By watching a database of all pending and unconfirmed transactions called the mempool, the bots are able to pay higher transaction fees to slip in their own transaction in an order that is profitable, often at the expense of decentralized finance (DeFi) users.
This article originally appeared in Valid Points, CoinDesk’s weekly newsletter breaking down Ethereum 2.0 and its sweeping impact on crypto markets. Subscribe to Valid Points here.
According to the Ethereum Foundation, Maximal Extractable Value (MEV) is the catch-all phrase for “the maximum value that can be extracted from block production in excess of the standard block reward and gas fees by including, excluding and changing the order of transactions in a block.” More specifically, arbitrage, liquidations, frontrunning and sandwich attacks are all forms of MEV in its current state.
MEV is not inherently bad and exists in any transaction fee market-driven chain with open access to the mempool. Decentralized exchanges and lending protocols even rely on MEV to arbitrage pools and liquidate undercollateralized loans in a competitive and efficient manner. The ability to order transactions within a block also casts a dark cloud over MEV because searchers are able to front run buy orders just to simultaneously sell on the trader after the order goes through. Searchers may earn an extra percent on the transaction, but it is completely at the expense of the trader who overpaid for the asset they received.
Concentrated liquidity and MEV
Flashbots, a development organization focused on mitigating the negative externalities of MEV, co-hosted a Twitter Spaces with the Uniswap team in late January to talk about “Just-In-Time” (JIT) Liquidity Provision, an increasingly popular MEV strategy. Just as it sounds, MEV “searchers” scour the mempool for large pending exchange swaps and provide liquidity to the associated pool before the swap is confirmed. This allows the searcher to gain a large cut of the trading fees only to subsequently pull that liquidity out in the same block.
This MEV tactic has proven more profitable on concentrated liquidity decentralized exchanges like Uniswap v3. Version 3 allows liquidity providers to supply capital within certain price ranges, theoretically improving trading depth around current prices and increasing fees for active liquidity providers. MEV searchers deploy their LP within a tight price range of the trade, taking up a significant amount of the trading fees and making the transaction worthwhile.
The strategy employs a non-atomic approach to MEV where searchers are exposed to delta risk, the chance that an asset drops in price. Therefore, the searcher must have some short-term outlook on the market because their portfolio was rebalanced from the trade, and future price volatility could quickly take away the profits made via trading fees.
Potential benefits and drawbacks of increasingly sophisticated MEV
The Uniswap team foresaw the potential of JIT liquidity on v3, but wanted to see how the strategy affected traders and liquidity providers in actuality. Should the tactic come to be a net negative for the protocol’s users, Uniswap considered implementing capital punishments for liquidity providers that deposited and withdrew liquidity in the same block. However, JIT liquidity has been largely positive for traders who have seen increased liquidity in their trading range, minimizing slippage.
The product lead at Flashbots, Robert Miller, posted an insightful thread on JIT liquidity and an on-chain reference example. Miller highlighted the benefits JIT liquidity brings to traders and how it differs from sandwich attacks, even while it employs a similar strategy. Furthermore, LPs have been able to remain profitable even despite JIT liquidity. Because the MEV searcher cannot utilize this strategy in a single atomic transaction, it is not risk-free and may not fit the bots risk profile.
A large concern is that MEV will continue to benefit the few at the expense of everyday DeFi users. Passive liquidity provision will continue to become more difficult if JIT liquidity strategies prove profitable, and trading on DEXs will be less desirable if users are being frontrun and sandwich-attacked. We run into some of the same problems as we see in traditional finance, with order flow selling and high-frequency trading.
However, at both the protocol and application level MEV can and is being mitigated. Flashbots has brought the misunderstood sector to light and is building products to combat the drawbacks felt by everyday users. For example, an off-chain marketplace where searchers can compete for transaction order ensures that on-chain gas wars become less likely. Over the next several months we may get a clearer picture of who is affected by…
www.coindesk.com