Back to Insights
Research2024-03-15

Understanding MEV in DeFi Markets

## Introduction to Maximal Extractable Value

Maximal Extractable Value (MEV) represents one of the most significant and complex phenomena in decentralized finance today. Originally termed "Miner Extractable Value," the concept has evolved alongside the transition of major blockchains from Proof-of-Work to Proof-of-Stake consensus mechanisms. At Hilbert Trading, we have spent years studying, analyzing, and ultimately harnessing MEV to generate alpha while simultaneously contributing to market efficiency.

MEV refers to the maximum value that can be extracted from block production beyond the standard block reward and gas fees by including, excluding, or reordering transactions within a block. This value extraction is possible because block producers (whether miners or validators) have the power to determine the order of transactions within the blocks they create.

The Mechanics of MEV Extraction

Transaction Ordering and Its Implications

In traditional financial markets, transactions are typically processed on a first-come, first-served basis. However, in blockchain networks, the paradigm is fundamentally different. Pending transactions sit in a public mempool, visible to anyone who chooses to observe them. This transparency, while essential for the trustless nature of blockchain technology, creates opportunities for sophisticated actors to extract value.

When a user submits a transaction to swap tokens on a decentralized exchange, that transaction becomes visible before it is included in a block. Searchers—specialized actors who scan the mempool for profitable opportunities—can identify this pending transaction and construct their own transactions to profit from it.

Common MEV Strategies

Arbitrage: The most benign form of MEV, arbitrage involves identifying price discrepancies across different decentralized exchanges and executing trades to profit from these differences. For example, if ETH is trading at $3,000 on Uniswap but $3,010 on SushiSwap, an arbitrageur can buy on Uniswap and sell on SushiSwap, pocketing the $10 difference (minus gas costs). This activity actually benefits the ecosystem by improving price efficiency across venues.

Liquidations: In lending protocols like Aave, Compound, and MakerDAO, positions that fall below required collateralization ratios must be liquidated. MEV searchers compete to perform these liquidations, earning a portion of the collateral as a reward. While liquidations can seem predatory, they are essential for maintaining the solvency of lending protocols.

Sandwich Attacks: Perhaps the most controversial form of MEV, sandwich attacks involve placing transactions before and after a target transaction to profit from the price impact. If a searcher observes a large buy order in the mempool, they can place a buy order just before it (frontrunning) and a sell order just after it (backrunning), profiting from the price movement caused by the original transaction.

Just-In-Time (JIT) Liquidity: A more sophisticated and arguably beneficial form of MEV, JIT liquidity involves providing concentrated liquidity to a DEX pool moments before a large trade is executed, then withdrawing it immediately after. This can actually reduce price impact for traders while generating profit for the liquidity provider.

The Evolution of MEV Infrastructure

From Dark Forest to Flashbots

The early days of MEV extraction were characterized by what researchers called the "Dark Forest"—a hostile environment where sophisticated bots preyed on unsuspecting users. Gas price auctions would escalate rapidly as searchers competed to have their transactions included first, leading to network congestion and inflated transaction costs for everyone.

The introduction of Flashbots in 2020 marked a paradigm shift in how MEV was extracted. By creating a private channel for searchers to submit transaction bundles directly to miners, Flashbots reduced the negative externalities of MEV extraction. Searchers no longer needed to spam the public mempool with failed transactions or engage in gas price wars.

The Post-Merge Landscape

Ethereum's transition to Proof-of-Stake in September 2022 fundamentally altered the MEV landscape. Under the new system, validators are selected to propose blocks in advance, creating new dynamics for MEV extraction. The introduction of proposer-builder separation (PBS) through MEV-Boost has created a more structured market for block space.

Today, specialized block builders compete to construct the most valuable blocks, which are then sold to proposers through a competitive auction. This separation of concerns has professionalized MEV extraction while also raising new questions about centralization and censorship resistance.

MEV's Impact on Market Microstructure

Price Discovery and Market Efficiency

Contrary to popular belief, not all MEV is harmful. Arbitrage activities, which constitute a significant portion of MEV, actually improve market efficiency by ensuring prices remain consistent across venues. Without arbitrageurs, price discrepancies could persist indefinitely, harming traders who might execute at suboptimal prices.

Our research at Hilbert Trading has shown that markets with active MEV searchers exhibit tighter spreads and faster price convergence following external shocks. The competitive nature of MEV extraction ensures that these efficiency gains are rapidly arbitraged away, benefiting all market participants.

The Hidden Costs

However, MEV also imposes costs on the ecosystem. Sandwich attacks directly extract value from traders, while the priority gas auctions that characterize MEV competition can congest networks and increase transaction costs. Some estimates suggest that MEV extraction has cost Ethereum users hundreds of millions of dollars since the rise of DeFi in 2020.

Protecting Against Harmful MEV

Protocol-Level Solutions

Various solutions have been proposed to mitigate harmful MEV at the protocol level. Encrypted mempools would prevent searchers from observing pending transactions, eliminating the information asymmetry that enables frontrunning. Fair ordering protocols attempt to establish more equitable transaction ordering rules.

Threshold encryption schemes, such as those being developed by Shutter Network and others, encrypt transactions until they are committed to a block, preventing any single party from gaining advance knowledge of pending trades.

Application-Level Defenses

At the application layer, DEX aggregators and private transaction relays offer protection against MEV. Services like Flashbots Protect allow users to submit transactions through private channels, bypassing the public mempool entirely. MEV-aware DEX designs, such as CowSwap's batch auction mechanism, can protect traders from sandwich attacks while still allowing beneficial forms of MEV.

The Future of MEV

Cross-Chain Considerations

As the blockchain ecosystem becomes increasingly multi-chain, MEV dynamics are evolving to span multiple networks. Cross-chain arbitrage opportunities exist whenever the same asset trades at different prices across chains. The development of faster and more secure bridge infrastructure is enabling searchers to extract value across chain boundaries.

At Hilbert Trading, we are actively researching cross-chain MEV dynamics and developing strategies that can capitalize on these emerging opportunities while minimizing risks associated with bridge security.

MEV and Layer 2 Solutions

The growth of Layer 2 scaling solutions introduces new complexities to the MEV landscape. Sequencers on rollups like Optimism and Arbitrum have significant power over transaction ordering, creating new MEV extraction possibilities. The move toward decentralized sequencers and shared sequencing layers will reshape how MEV is captured and distributed in the L2 ecosystem.

Conclusion

MEV represents a fundamental aspect of blockchain economics that is unlikely to disappear. Rather than viewing it purely as a problem to be solved, we believe it is more productive to understand MEV as a feature of open, transparent financial systems. The key is developing infrastructure and practices that maximize the benefits of MEV (such as improved market efficiency) while minimizing its costs (such as value extraction from users).

At Hilbert Trading, our deep expertise in MEV dynamics informs every aspect of our trading strategy. We believe that sustainable alpha generation in DeFi requires not just understanding MEV but actively participating in its extraction in ways that benefit the broader ecosystem.