13 min read

What is MEV?: Explained

Maximal Extractable Value

Cover Image

Published on

1 Sep, 2024

Introduction

If one spends enough time in any discussion about blockchain and cryptocurrency, the term Maximal Extractable Value (MEV) inevitably comes up. Since 2021, interest in MEV and the technologies surrounding this controversial topic has surged. The decentralized nature of the blockchain itself gives rise to MEV—a controversial quirk that we will explore today.

From the Ground Up

In blockchains, transactions are submitted and eventually recorded on a block—a permanent, unchangeable structure that underpins all decentralized finance and cryptocurrencies. Before they are added to a block, these transactions sit in a shared space called the mempool, where they wait for validators to include them in the next block.

Because the mempool is publicly accessible, anyone can view these pending transactions and potentially exploit the information within to their advantage. By strategically reordering, inserting, or excluding transactions, actors can extract additional value—this practice is known as Maximal Extractable Value (MEV). These actors, called “searchers” are always on the lookout for MEV opportunities.

Typically, this involves tactics like hijacking gas fees or exploiting arbitrage opportunities within the mempool, allowing these actors to profit at the expense of other users.

In the simplest terms, this is what most people mean when they talk about MEV. While it may sound sinister, MEV is a neutral concept and can even offer some advantages in certain contexts. However, this structural vulnerability has also been exploited in ways that are less than reputable, and if left unchecked, it can have widespread negative impacts on blockchains.

Transaction Ordering

Transaction ordering in blockchain refers to how transactions are arranged within a block, which can impact the value extracted by different participants. In decentralized finance (DeFi), this ordering can lead to slippage, where the actual trade price differs from the expected price.

On Ethereum, the PBS (Proposer-Builder Separation) system manages transaction ordering by distributing the power among various roles like searchers, builders, and relayers.

image (208).png

Definition

The concept of MEV goes back further than the Proof-of-Stake blockchains we see today, and its definition has evolved over time. It first surfaced during the early days of Ethereum under Proof-of-Work, almost a decade ago. Back then, the concern was that miners could manipulate transaction order and selection during the block validation process to increase their profits. This behavior laid the groundwork for what was initially called “Miner Extractable Value.”

Many enthusiasts and even Vitalik Buterin himself, highlighted this issue in 2014. It quickly became a focal point as researchers explored how miners could profit through reordering, censoring, or front-running transactions. As the blockchain space matured, particularly with the rise of Proof-of-Stake and DeFi, the concept of MEV broadened. It now covers a wider range of participants, from validators to arbitrage bots, leading to the current understanding of MEV as “Maximal Extractable Value”.

Ways in which MEV is Extracted

MEV manifests in various forms, each with its own implications for blockchain participants. Key types of MEV include arbitrage, front-running, and sandwich attacks, all of which involve strategic transaction ordering to extract value at the expense of other network users.

Arbitrage opportunities often arise from price discrepancies between decentralized exchanges, while front-running and sandwich attacks typically target specific transactions to maximize profit. Understanding these types is essential for grasping the full scope of MEV and the challenges it presents to maintaining a fair and transparent blockchain ecosystem.

image (205).png

Arbitrage

In traditional finance, arbitrage refers to the practice of exploiting price discrepancies across different trading platforms. This inefficiency also exists in the crypto world, particularly within Decentralized Exchanges (DEXs), where token exchange rates can vary. Searchers, or specialized bots, monitor these discrepancies, buying tokens at a lower price on one platform and selling them at a higher price on another. Thereby extracting value from the difference.

Arbitrage accounts for a significant portion of MEV activity. In fact, over the last 30 days alone, arbitrage strategies have generated approximately $3 million in MEV profits. It’s important to note that arbitrage-based MEV is one of the more constructive applications of MEV, as it helps align exchange rates across DEXs, ensuring users receive fairer prices. By counteracting market inefficiencies, arbitrage plays a key role in maintaining price uniformity across the decentralized finance ecosystem.

image (207).png

Liquidation

Another prominent form of MEV is liquidations, which, like arbitrage, have a parallel in traditional finance. The concept is akin to margin calls: when an investor uses borrowed money to purchase securities, they must maintain a certain level of equity in their account. If the value of these securities drops too much, the investor must either add more funds or sell assets to meet the required equity level. If they fail to do so, the brokerage will step in to sell the securities— a margin call.

In DeFi, the process is similar. Users can borrow against their crypto assets by posting them as collateral. If the value of this collateral falls below a certain loan-to-value (LTV) ratio, the position becomes undercollateralized, triggering a liquidation. To protect the protocol from potential losses, the collateral is sold off to repay the loan and remove the debt from the system, ensuring the protocol’s solvency.

Liquidators, also known as "keepers," are responsible for purchasing the undercollateralized assets at a discount during these liquidation events. In return, they earn a fee, making liquidations highly competitive and profitable. The competition intensifies during periods of market volatility when multiple positions may become undercollateralized simultaneously.

Liquidations make up a significant portion of MEV extraction. In the past 30 days alone, participants have extracted $1.19 million through liquidations. Although liquidation MEV ensures that lenders receive payment even during undercollateralization, some actors can also exploit it in harmful ways.

Sandwiching

Sandwiching occurs when a searcher detects a large pending transaction in the mempool—usually a trade on a decentralized exchange (DEX). The searcher then submits two transactions: one just before the target transaction and one immediately after. By doing so, they "sandwich" the original transaction between their two trades.

Here’s how it works: Suppose someone is about to buy a significant amount of a token on a DEX. The searcher places a buy order just before the target transaction, driving up the token’s price. Then, as the original transaction is executed at the now higher price, the searcher immediately sells the tokens they just bought, pocketing the difference. This manipulation allows the searcher to profit at the expense of the user who initiated the original transaction, who ends up paying more for their purchase than they would have otherwise.

Sandwiching is particularly harmful because it not only generates profit for the searcher but also causes slippage for the victim, leading to a worse execution price. This tactic is considered one of the more "toxic" forms of MEV as it exploits users' trades, leaving them with less value than they intended to receive. Despite its detrimental effects on users, sandwiching remains a lucrative practice for MEV searchers​.

Front Running/Back Running

Front-running occurs when an adversary observes a pending transaction and quickly submits their own transaction with a higher gas fee, ensuring it is processed before the original one. For example, a front-runner might buy a token first when someone is about to purchase it on a decentralized exchange, driving up the price, and then sell it for a profit when the original transaction is executed at the inflated price.

Back-running, on the other hand, involves submitting a transaction immediately after a known, unconfirmed transaction. For instance during a token listing, one can buy tokens immediately after a new trading pair is created on an exchange, then wait for others to drive up the price before selling. The back-runner’s goal is to capitalize on the price movement triggered by the initial transaction, ensuring they benefit from the subsequent market reaction.

Other Methods

There are multiple new MEV methods emerging and evolving every day. Here are a few mentions -

  • Just-in-Time (JIT) Liquidity Provision: A strategy where MEV bots add liquidity to a pool just before a large trade is confirmed, capturing trading fees and then quickly removing the liquidity afterward, benefiting DEX users by reducing slippage.
  • Time-Bandit Attack: Miners rewrite blockchain history to capture profits from earlier transactions, prioritizing MEV over network stability.
  • Uncle Bandit Attack: An exploit where an attacker takes advantage of transactions in an uncled block, selectively extracting and reordering profitable parts of a transaction bundle before re-submitting it.
  • NFT MEV: An emerging tactic in the NFT space, where searchers use MEV techniques to secure rare NFTs during drops or exploit pricing errors for profit.

Mitigation Strategies

The discovery of MEV can be seen as a net positive, as it fuels research into protective measures. This ongoing effort has spurred innovative techniques in DeFi, enhancing security and efficiency in decentralized exchanges. In the following sections, we’ll explore interesting methodologies to mitigate MEV, along with insights from research that informed this edition of Explained.

These advancements are not just reactive but are paving the way for a more resilient and equitable financial system.

MEV Wiki describes two schools of thought - Offense and Defense. The offense approach accepts MEV as an unavoidable aspect of blockchain systems. Instead focusing on ways to extract and democratize it. On the other hand, the defense approach views MEV as detrimental and seeks to prevent or minimize its impact.

Mitigation techniques can be broadly categorized into three main areas:

1. Front-running as a Service (FaaS) or MEV Auctions (MEVA)

FaaS and MEVA represent the offense approach, where MEV is extracted in a controlled and structured manner. In these systems, miners or validators auction off the right to front-run user transactions via a first-price sealed-bid auction between searchers and miners.

By controlling MEV through mechanisms like auctions, the community can reduce its negative impact while preserving the economic incentives that secure the network.

2. MEV Minimization

The defense-oriented MEV minimization approach focuses on preventing or significantly reducing MEV extraction. This approach includes technical solutions designed to make it harder or less profitable to engage in MEV-related activities.

One prominent example is the Automata Network's Conveyor solution. Their solution processes transactions in a predetermined order to create a front-running-free environment.

Other MEV minimization strategies include redesigning transaction ordering processes, and implementing cryptographic techniques to obscure transaction details. Shutter works by masking transactions and trading amounts. These methods aim to create a more transparent and fair transaction environment, reducing opportunities for harmful MEV practices.

3. Other Solutions

Beyond the main strategies of auctions, fair-ordering and transaction protection, there are additional approaches to mitigating MEV:

  • MEV-Aware Design: Some DEXs are implementing MEV-aware design, like CoW protocol, claiming to be the first MEV capturing AMM.
  • Backstop Liquidity Providers: These protocols acquire the ability to liquidate under-collateralized loans and distribute a portion of the profits to platform users. B Protocol has brought forward this approach.

Research Excerpts

Now that we have covered the basics, we look at some excerpts from some research pieces, which can give us a glimpse into alternative sides of the MEV discussion. These works also helped us frame this edition of Explained.

FCA UK Research Notes

Humphry, Rebecca, et al. "Review of Maximal Extractable Value & Blockchain Oracles." (2024).

This research piece highlighted a variety of perspectives on MEV, recognizing both its potential benefits and drawbacks. The research also touched upon the moral complexities surrounding MEV, noting that differing views on its acceptability stem from varying beliefs about what constitutes ethical behavior in the financial landscape. This diversity of opinion underscores the challenges regulators face in navigating these issues.

In addition to MEV, the research explored the role of blockchain oracles, emphasizing their crucial function in enabling interoperability and expanding the capabilities of decentralized finance (DeFi) applications. However, it also identified significant risks associated with oracles, such as their vulnerability to attacks, which can have immediate and far-reaching consequences. The design choices in oracle systems, including the selection and quality of data sources, were noted as key factors influencing their resilience.

EY Report Findings

EY Report March 2023

The detailed EY Report highlights potential mitigation strategies and the future of MEV in blockchain systems.

The report suggests that advancements in cryptography and software development could make MEV mitigation at the protocol level more achievable. Key changes like SSLE, VDFs, and zero-knowledge Ethereum Virtual Machine are identified as crucial, with socially driven changes like Proposer-Builder Separation (PBS) requiring community support.

A promising approach discussed is committee-based MEV smoothing. This method would distribute MEV rewards equally among validators, encouraging a more decentralized staking environment. This could also prompt discussions on acceptable types of MEV.

The report emphasizes that MEV will likely persist, making it critical to address now. Testing mitigation strategies, especially on Ethereum roll-ups, and raising awareness of cross-domain MEV are essential.

The (Questionable) Legality of MEV

Vadlamani, Aniruddh. "The (Questionable) Legality of" Maximal Extractable Value": A Securities Law Perspective." U. Ill. JL Tech. & Pol'y (2024): 85.

Critics of MEV argue that it acts as an "invisible tax," burdening users with hidden costs due to lack of clear regulation. This interesting paper looks at MEV from a legal perspective.

Vadlamani's analysis approaches this issue by questioning the legality of MEV practices under existing securities laws. The article suggests that these practices could violate at least two provisions of the Securities Exchange Act. It compares them to illegal trading activities such as market spoofing and manipulative trading. By drawing parallels between MEV extraction and these traditionally harmful trading practices, the article underscores the potential for MEV to be considered unlawful.

To address these concerns, the article offers two policy recommendations for regulatory bodies. First, it suggests the need for clear regulatory frameworks that specifically address MEV extraction, ensuring that these practices are not left in a legal gray area. Second, it advocates for the indictment of MEV extractors who engage in particularly egregious forms of manipulation, holding them accountable under securities law.

Conclusion

As technology advances, new vulnerabilities emerge, often exploited by users for personal gain. MEV, while a natural outcome of blockchain's structure, presents both challenges and opportunities. The ongoing debate around MEV highlights the need for further research and awareness to address its complexities.

Even traditional finance grapples with similar issues, and the cryptocurrency space is no different. MEV is not inherently malicious, but its potential for misuse cannot be ignored. As the DeFi ecosystem evolves, it's crucial to align with the core values of decentralization and fairness, addressing these challenges head-on.

By engaging in the conversation around MEV, we contribute to shaping a more resilient and equitable decentralized economy for the future.

About Luganodes

Luganodes is a world-class, Swiss-operated, non-custodial blockchain infrastructure provider that has rapidly gained recognition in the industry for offering institutional-grade services. It was born out of the Lugano Plan B Program, an initiative driven by Tether and the City of Lugano. Luganodes maintains an exceptional 99.9% uptime with round-the-clock monitoring by SRE experts. With support for 45+ PoS networks, it ranks among the top validators on Polygon, Polkadot, Sui, and Tron. Luganodes prioritizes security and compliance, holding the distinction of being one of the first staking providers to adhere to all SOC 2 Type II, GDPR, and ISO 27001 standards as well as offering Chainproof insurance to institutional clients.

Line pattern
© 2024 Luganodes | All rights reserved