Larger MEV Blocks Rekts Decentralization

Sep 02, 2022

MEV Analysis, Centralization Incentives and Cross-time Optimizations

Maximum Extractable Value (MEV), formerly known as Miner Extractable Value, is one of the more fascinating concepts in the blockchain space. While each blockchain attempts to set up their consensus mechanisms so that users have fair and equitable access to transact, MEV has arisen (either as a spectre or an opportunity) to be at the forefront of the minds of developers, operators, and even participants of blockchain applications.

In this post, we’ll be examining MEV Arbitrage opportunities on the Ethereum blockcahin. If you’re already familiar with MEV and Arbitrage, feel free to skip to the analysis, but if any of these concepts are new to you, read on for a brief introduction.

Wait, what exactly is MEV?

Blockchain empowers users to transact with eachother in a trustless, decentralized fashion, and in the case of blockchains like Ethereum, they rely on block ‘miners’ to consent on the contents of blocks to give transactions on the blockchain a total order.

Just like in other blockchains (such as Bitcoin), miners receive rewards paid by transactors to include transactions into the next block. The basic economic principle is fairly simple, those actors who are willing to pay the miners more to include their transaction will have their transactions ordered first, while those with less urgent transactions will offer a lesser incentive, and a natural market based ordering will be achieved.

Unfortunately, this relatively simple model doesn’t work nearly as well as might be expected naively. To begin with, users do not have a perfect view of the transactions they are competing with for inclusion in the block. In order to avoid dramatically overpaying to transact, users must attempt analyse the outstanding transactions in the pool, and price their transactions accordingly (a tedious, and error prone process). In Ethereum, some of this was attempted to be addressed in EIP-1559, but, there are more subtle ways than transaction fees in which the ordering behavior of miners may be influenced.

Especially in ‘smart contract’ based blockchains like Ethereum, the blockchain applications themselves provide an incentive for miners to order transactions outside of the natural ‘transaction fee’ order. Often misunderstood, blockchain contracts never execute autonomously, they are always driven by external transactions, so when engineering applications, smart contract developers will employ incentives for users to conduct the transactions which cause the contract to operate properly.

For instance, consider an overcollateralized lending contract. If the contract lends $100k of USDC to a user in exchange for $150k worth of ETH collateral, then if the value of ETH begins to drop precipitously, then the contract wants to force liquidation of the collateral to ensure that the loan is repaid. The user which performs the transaction is rewarded with a bounty for liquidating the debt, so the first actor to transact is rewarded. For any miner which can recognize the opportunity, they always have the ability to prioritize their own transactions to claim such prizes for themselves, and other transactors cannot compete ‘fairly’.

Although there are many opportunities for MEV (such as liquidations, sandwich trades, and other), the most prevalent which we’ll discuss below is arbitrage.

What’s Arbitrage?

Arbtirage is a traditional concept in finance, where a trader active in two or more different markets will buy and sell the same security simultaneously, taking advantage of market inefficiencies and price differences between those markets to turn a profit.

For Ethereum, and DeFi in general, this means looking for discrepencies between the pricing of different tokens on different Decentralized Exchanges (DEXes). If ETH is trading at $3,578 in Uniswap V3 and $3,570 in SushiSwap, then, an astute trader (or more likely trading bot) can buy USDC on Uniswap and immediately sell it for more ETH than they started with on SushiSwap.

Of course arbitrages can be more complex than a simple pair. A transaction could for instance take a flash loan of Token A (a loan that must be repaid in the same transaction) from a lender, to swap for Token B, to swap for Token C, to swap for Token D, to swap back for Token A to repay the loan with surplus to spare. The number of arbitrage opportunities available can be enormous, depending on the protocols understood by the trader and the capital assets available.

Before we begin, let’s take a quick look at our Ether pricing data as derived from the on-chain DEX data. We’ll discuss in detail how we use this pricing data later, but this price chart demonstrates how the DEX data accurately tracks the more traditional exchange pricing.

Rendering...

Analysis

What Value?

When we talk about MEV, there are multiple facets of how value may be extracted.

Miners of course collect gas payments in exchange for preferential ordering in blocks, but, even with gas, things aren’t as simple as they seem. Miners may also collect payments ‘out of band’, using a network like Flashbots which can be preferred by transactors because of the additional protections it affords them (like only paying if the transaction is successful).

Beyond the fees collected by miners to prioritize transactions, there are the arbitrage and liquidation opportunities, as well as harder to detect multi-transactions like sandwich trades.

Inspecting 1349572 instances of arbitrage transactions
Rendering...

The above plot looks at ‘Relative Gain’ because arbitrages can involve any set of tokens, and a gain of a million ETH is not the same as the gain of a million USDC, but normalizing all tokens to the same nominal value is also not necessarily obvious, since differing levels of liquidity can severely impact the real market value of lesser circulated tokens. For this reason, let’s see if we can eliminate these less liquid tokens from our analysis without dramitically impacting the data.

First, let’s look at the prevalance of the top four tokens where profits are taken in arbitrage.

Total WETH arbitrages 1311642/1349572 (97.19)%
Total [WETH, USDC, USDT, DAI] arbitrages 1345580/1349572 (99.70)%

Unsurprisingly, the vast majority of arbitrage transactions terminate with with WETH as the profit token, while the remainder of all but the last 0.3% are settled in USD stablecoins. We can confirm that pruning this small set less liquid tokens has almost no impact on the shaded plot.

Rendering...

With that out of the way, we can now normalize our dataset into USD values without liquidity concerns. We’ll use the current price of WETH to USDC/USDT/DAI averaged across multiple decentralized exchanges for the thirty minute window in which the arbitrage occurred.

Rendering...

This plot is much more interesting, and shows a number of interesting trends.

First and foremost, is that the instances of arbitrage seem to actually cluster fairly tightly between $1 and $1000, generally occurring on values the magnitude of $100. This would seem to indicate that there actually is a fairly robust arbitrage market, with competing bots, preventing most arbitrage opportunities from growing too large.

But, far more interesting is all of the arbitrage transactions, starting around block 12,100,000, which appear to be losing money. Perhaps some poorly written arbitrage bots could make a mistake, but this losing strategy seems to be persistent, so what’s going on?

First, let’s plot the arbitrage profit after transaction costs.