DeFi in the MEV Era

Source: https://www.youtube.com/watch?v=2EmAWVzEaLE

DeFi in the MEV Era

This talk's main objective is to discuss theoretical frameworks for understanding MEV (Maximal Extractable Value), quantifying MEV in DeFi, and proposing mitigations for MEV.

MEV in DeFi

Ciamac (the speaker) considers MEV arising from DeFi trading to be the dominant and prototypical form of MEV, and a significant driver of changes in the Ethereum ecosystem (e.g., priority gas auctions, proposer-builder separation, concentration of the builder market).

MEV extracting profits from end-users (swappers, liquidity providers...) is detrimental, as it prevents the matching of organic buyers and sellers, reduces the volume of trade, and ultimately reduces overall social welfare.

In trading, welfare is improved when there is a gain from trade between a buyer and seller with differing valuations for an asset, and the distribution of gains between them is irrelevant (zero-sum).

MEV intermediaries create friction that disrupts this organic matching of buyers and sellers, thereby reducing the overall gains from trade.

The most dominant form of MEV discussed is "sniping MEV", which exploits the static pricing in automated market makers (AMMs) like Uniswap compared to the dynamic real-world prices.

Arbitrageurs with superior information can make profits by exploiting the price discrepancies between AMMs and other sources, such as centralized exchanges or other AMMs. This profit comes at the expense of AMM liquidity providers.

The core issue is the inconsistency between the static pricing in AMMs and the dynamic, credible public signals of the asset's true value.

While the arbitrageurs are providing a service by correcting these price discrepancies, this should not be so highly compensated.

Loss-versus-Rebalancing (5:20)

This model aims to quantify the losses incurred by AMM liquidity providers due to arbitrageurs. It makes standard finance assumptions, such as geometric Brownian motion for prices, the presence of fees, and discrete block generation.

The main components of arbitrageur profits per unit of time:

  • The square of price changes
  • The amount of liquidity available at that price
  • The inability of arbitrageurs to always trade profitably due to the fee threshold

Simplifying the equation below 👇

The arbitrageur profits per block are proportional to the block length raised to the power of 3/2, showing that longer block times are better for arbitrageurs and worse for liquidity providers.

The way this scales per unit time follows a square root rule - for example, if Ethereum block times drop from 12 seconds to 3 seconds (4x decrease), the arbitrageur profits would be expected to decrease by half.

Faster block times would create more intense competition between arbitrageurs, forcing them to act immediately on smaller opportunities, rather than holding out for larger ones.

Empirical studies have replicated the model's predictions, showing a roughly square root-type decay in arbitrageur profits as block times are reduced from 16 seconds to 1 second, with potential flattening of the curve below 1 second.

Dutch Auctions (10:20)

Dutch auctions are the second most popular primitive in DeFi after AMMs, used in mechanisms like UniswapX, 1inch, and peer-to-peer lending protocols (Ajna, Blend, Euler...)

Similar to the AMM case, Dutch auctions are susceptible to a "sniping" issue due to the discrepancy between the continuously evolving fair price (e.g., the price on Binance) and the discretely updated auction price.

There is a framework to quantify the "loss versus fair" that the Dutch auction seller incurs when the auction price crosses below the fair price before the next block is generated.

The key parameters:

  • Rate at which the auction price is decreased (the "drift")
  • Starting price of the auction.

Decreasing the drift (i.e., slowing down the price decrease) can reduce the loss versus fair, but there is a fundamental lower bound on this loss, which is proportional to the asset's volatility and the square root of the block length.

There is a tradeoff between minimizing the loss versus fair and the expected duration of the auction - slower auctions can minimize losses, but may take much longer to complete.

The underlying issue is the fundamental friction between the continuous evolution of prices and the discrete nature of blockchain block generation, which creates opportunities for arbitrageurs to exploit price discrepancies.

MEV Mitigations

Faster blocks (15:05)

We can make blocks faster, either by reducing block times or using pre-confirmations or first-come-first-serve transaction ordering, so we can reduce the profits of arbitrageurs.

However, this approach has downsides:

  • Very short block times can introduce challenges with networking, geographic centralization, and consensus.
  • Faster blocks do not eliminate all MEV, as prices can still jump discontinuously, which can also be a source of sniping opportunities.

Dynamic AMMs (17:00)

The general idea is to improve the trading strategy of AMMs in a way that reduces the adverse selection and the profits available to arbitrageurs.

Potential strategies include:

  • Adjusting the AMM's pricing mechanism
  • Reallocating liquidity dynamically
  • Optimizing swap fees (better static + dynamic fees)

We can do this by leveraging off-chain information sources, like price oracles and volatility data to adjust prices and fees. Hence, we give more favorable terms to the retail traders

But implementing these dynamic strategies is challenging:

  • It's as hard as solving the optimal market-making strategy
  • On-chain implementations are limited by gas requirements and need to be simple
  • Centralization concerns

Ex-post auctions (19:55)

Ex-post auctions refer to auctions held during the block generation process after the transactions and market state are known.

Combining ex-post auctions with a uniform clearing price mechanism could potentially reduce MEV to zero, under ideal conditions.

Challenges:

  • They require a fast, censorship-resistant off-chain mechanism to run the auction, as the on-chain consensus process cannot handle it.
  • This can lead to centralization issues
  • Composability is difficult, as the auction is an asynchronous operation.
  • The auctions may not be as competitive as desired, and may not be able to fully rebate the extracted MEV back to liquidity providers.

CoWswap and Sorella are building ex-post auctions combined with batch auctions, with different variations.

MEV Boost is a related concept, but it redirects the MEV profits to validators rather than rebating it to liquidity providers.

Ciamac mentions "MEV taxes", which will be discussed below.

Ex ante auctions (23:15)

Ex-ante auctions refer to auctions held well ahead of the actual block generation, to auction off the right to extract MEV in future blocks.

Benefits:

  • They can be run on-chain, as the time scale is slower compared to ex-post auctions.
  • They can smooth the payments to liquidity providers (LPs), as the bids will reflect the expected MEV value rather than the actual, stochastic MEV.
  • Risk shift from the LPs (smaller agents) to the auction participants (larger, more sophisticated searchers).

mcAMM auctions off the right to be the "lead searcher" who gets to trade first in each block and the payment for this privilege is then distributed to the liquidity providers.

Issues:

  • The lead searcher may be required to unlock each block, creating gas inefficiencies.
  • The lead searcher may censor certain blocks, effectively increasing the block time to increase their profits (due to the relationship between block time and MEV).

Auction-managed AMM is an ex-ante auction approach where the right to set and receive the swap fee is auctioned off for a certain period.

The auction winner, referred to as the "pool manager", can capture most of the MEV by effectively trading without paying fees (since they're paying fees to themselves).

This allows the pool manager to capture small arbitrage opportunities that would not be profitable for other traders due to the fee.

Benefits:

  • It not only captures the MEV but also optimizes the swap fee, which is a challenging trade-off for AMM protocols.
  • Under competitive assumptions, this mechanism can lead to higher liquidity levels than regular AMMs.

Challenges:

  • May be less competitive than an ex-post auction, as participants have to model the future value of the block rather than knowing the current state.
  • The pool manager can fully "sandwich" any user transaction, exploiting their ability to trade without fees.
  • Allocating the rent payments to liquidity providers in a concentrated liquidity model (like Uniswap v3) requires accounting for the degree of adverse selection faced by each LP position.

Questions & Answers (30:40)

Regarding market concentration and competition in ex-ante auctions, are there important differences between the markets for MEV extraction in DEX-specific contexts versus block proposer/inclusion markets?

The ex-ante auction market may be less competitive for block proposer/inclusion rights compared to a DEX-specific context, due to the increased complexity and risk.

Participants in the proposer market have to model future value, whereas DEX auctions can be based on the current known state.

Why can't the consensus mechanism be used to run the auctions, and would that be possible on an app-chain rather than Ethereum?

Running the auctions on-chain within the consensus process is challenging, as the consensus mechanism itself cannot handle the required speed and censorship resistance.

However, on an app-chain, there may be more potential to tightly integrate the consensus and economic mechanisms.

Is there a "happy medium" between the ex-ante and ex-post auction designs, and what would be required to achieve that?

Ciamac is unsure of a true "middle ground" solution, as it seems to be a fundamental trade-off between doing the auctions far in advance (with expected value bidding) versus closer to real-time (requiring alternative consensus mechanisms).

Is MEV extraction a pure welfare loss, and would the "obvious solution" be to simply centralize around an oracle like Binance?

Centralization around an oracle could potentially eliminate the welfare loss from MEV

However, there are other objectives beyond just economic efficiency that need to be considered in these decentralized systems.