The MEV extraction amount has exceeded 300 million dollars in the past two months. What impact will this have on the Ethereum ecosystem?
This article was published on Babit Information, written by: Alex Obadia, translated by: Pingfeng.
It is said that DeFi will revolutionize traditional finance. Can the role of intermediaries be replaced by smart contracts and miners, thus eliminating the drawbacks of traditional finance? If the evolution of the financial system is like a patching process, today we find that there is still a patch that has not been applied on the blockchain. In traditional financial markets, brokers act as intermediaries between clients and the market, possessing insider information that may affect future buy and sell orders. Brokers may prioritize executing their own trades before executing client transactions, thereby profiting from this behavior, which is illegal in regulated financial markets.
However, this illegal operation is being "legally" performed on-chain. According to CoinDesk, research shows that in the past month, bots exploiting "flaws" in the Ethereum network have made at least $1.07 billion in reasonable arbitrage profits, referred to as Miner Extracted Value (MEV). This "legal" operation, known as frontrunning, has seen an increasing number of miners actively participating in the game of acquiring MEV. The power of miners may be greater than we imagine; how do they frontrun to obtain MEV, and what impact will these operations have on the Ethereum ecosystem?
The research and development organization Flashbots, dedicated to mitigating the negative externalities and risks of MEV on smart contract blockchains, has conducted an in-depth study of MEV for the first time. They began their research on the Ethereum blockchain from the first block in 2020, classifying over 1.3 million MEV transactions and discovering that since January 1, 2020, at least $314 million worth of MEV has been extracted, with failed MEV transactions wasting $4.5 million in gas fees, equivalent to wasting 4,500 Ethereum block spaces! Below are the research results published by Flashbots through their public dashboard and real-time MEV transaction explorer MEV-Explore.
Introduction
MEV is a metric that refers to the total value that can be extracted by reordering, inserting, or deleting transactions within a block on the blockchain without permission. So far, MEV on Ethereum has mainly been extracted by DeFi traders and bots executing strategies where the order of transactions is crucial, with a small portion being the gas fees generated when these traders or bots extract MEV. MEV-Explore V0 does not provide a theoretical value that can be extracted from a specific block, such as how much MEV miners can gain by reordering transactions in the blocks they are producing, but focuses on empirical evidence of MEV activity currently occurring on Ethereum.
How much MEV has been extracted on Ethereum? How much MEV have DeFi traders and bots obtained? How much of the gas spent on MEV transactions goes to the miners who mined the MEV transaction schemes? What are the most common types of MEV extraction strategies? Which DeFi protocols contain the most MEV? How much network resources do successful and failed MEV transactions occupy?
With these questions in mind, we scraped Ethereum, covering more than eight major DeFi protocols, and collected over 1.3 million MEV transactions on-chain since January 1, 2020. Through our launched MEV-Explore v0 (explore.flashbots.net) public dashboard, everyone can track the latest MEV transactions on Ethereum in real-time.
Since January 1, 2020, MEV extraction has reached at least $314 million
Starting from the first block of 2020 (9193266), we found that the MEV extracted on Ethereum has reached at least $314 million (approximately 540,000 ETH), including successful, reverted, and checked MEV transactions, as well as the gas fees associated with these transactions.
Figure 1: Cumulative MEV from January 2020 to present
Extracted MEV has seen significant growth: in January 2021, MEV extraction amounted to $57 million (47,600 ETH), compared to $180,000 (11,000 ETH) recorded in January 2020, representing an increase of over 300 times in dollar terms and 43 times in ETH terms. Given that the data collection process did not cover all protocols and transaction types, we believe the actual extracted MEV is higher than the aforementioned metrics. This metric is expected to continue growing as DeFi continues to expand, the complexity of Ethereum increases, and new methods of extracting value from transaction ordering emerge, pushing the MEV figures higher.
In MEV-Explore v0, we quantified and categorized MEV activity through MEV-Inspect. Currently, we have collected data based on these metrics to observe the eight protocols listed in the table below (see Figure 2). Many emerging DeFi protocols have significant MEV exposure (e.g., ESD/DSD), while some DeFi protocols that existed before the DeFi boom also have MEV exposure (e.g., Bancor, Kyber, Etherdelta, Airswap). We plan to add observations of these protocols in the next version. Additionally, there is still a large amount of MEV activity not covered, such as multiple trading opportunities (e.g., sandwich trading) and CEX-DEX price arbitrage.
Figure 2: Covered protocols
What does extracted MEV include?
As mentioned above, today MEV is mainly obtained by traders seizing trading opportunities that depend on transaction order. This includes price arbitrage between tokens on Uniswap, loan liquidations after oracle updates on dYdX, and redemption of vouchers for ESD (algorithmic stablecoin).
We categorize MEV transactions into two main types: successful and failed. Failed transactions include two subtypes: reverted transactions and checked transactions.
Successful MEV transactions are those that track MEV opportunities and successfully capture them.
Reverted transactions are a type of failed MEV transaction where the trader tracks an MEV opportunity but fails to seize it for various reasons, such as someone else capturing the opportunity first, running out of gas, or unfavorable market conditions.
Checked transactions are another type of failed MEV transaction, where the failure is more subtle. The sender checks whether the opportunity still exists to save on gas fees before initiating their MEV transaction. Although the sender ultimately has to pay gas fees for their check, the cost is much lower than directly initiating the transaction.
Let’s look at a few examples:
Example 1: Successful MEV transaction through priority gas auctions
A three-hop arbitrage between three liquidity pools: Balancer's ETH/USDC, Sushiswap's USDC/SIL, and Sushiswap's SIL/ETH, paying a transaction fee of 12 ETH (approximately $14,100 at the time) and extracting MEV worth 16.7 ETH (approximately $19,600 at the time).
https://etherscan.io/tx/0x2bde6e654eb93c990ae5b50a75ce66ef89ea77fb05836d7f347a8409f141599f
The high transaction fee indicates that the sender repeatedly bid up the gas price of their arbitrage transaction to compete for the arbitrage opportunity before their existing transaction was packed. A loser in a gas auction here lost 1.18 ETH of "checked" MEV (see Example 3). The winning transaction ultimately paid a gas price of 51,600 gwei, which was 547 times higher than the average gas price at the time (94 gwei), but only twice as high as the loser (27,600 gwei).
Details of MEV extraction for tx#1: the sender received 4.7 ETH (approximately $5,500 at the time), and the miner F2Pool for that block received 12 ETH (approximately $14,100 at the time).
Details of MEV extraction for tx#2: the miner F2Pool for that block received 1.18 ETH (approximately $1,400 at the time).
Example 2: Failed reverted transaction
A transaction attempting to extract MEV from a liquidation on Cream Finance failed due to running out of gas, resulting in the sender losing 5.75 ETH (approximately $10,000 at the time) in transaction fees.
https://etherscan.io/tx/0x8cfb46876ce1d40250e9690482bdaaffc1f6b60e18c3405ff5e98b636840875f
In this transaction, to liquidate a position on Cream Finance, 1.5M gas was used, costing nearly 6 ETH in fees, to request an $88,000 USDC flash loan. It was initially executed this way but failed midway due to a lack of required gas fees. Although on the surface, 0x8cfb4 seems innocent, its internal transactions show over 237 transactions. This was a very complex transaction with intricate logic in EVM calculations, ultimately using 1.5M gas, which accounted for nearly 13% of the block it was included in! Regardless of how much gas was used, this transaction still failed due to running out of gas, ultimately costing the sender approximately 5.75 ETH (approximately $10,000 at the time) in transaction fees.
After this "reverted" transaction, the opportunity still existed and was seized by the second-highest (or first loser) gas bidder, with a total MEV extraction value of 4.125 ETH, of which 3.75 ETH was paid in gas fees.
Details of MEV extraction for tx#1: the sender's income was $0, and the miner Sparkpool for that block earned approximately 5.75 ETH (approximately $9,300 at the time).
Details of MEV extraction for tx#2: the sender#2's income was 0.375 ETH (approximately $600 at the time), and the miner Sparkpool for that block earned 3.75 ETH (approximately $6,000 at the time).
Example 3: A failed checked transaction
A transaction checked the liquidity pools of Uniswap WETH/PRT, Uniswap SFI/PRT, and Sushiswap SFI/WETH to look for a three-hop arbitrage opportunity, found that the opportunity did not exist, and returned, consuming only 43K gas, resulting in the sender losing approximately 0.01 ETH (approximately $19 at the time) in transaction fees.
https://etherscan.io/tx/0xf629036e2740a98e1ca5ce32fff85f27337d224e94cbeee6c3d7aabb7507b050
Some traders are more cost-effective than the first sender in Example 2; before sending a logically complex transaction that consumes a lot of gas, they will perform a "check" to verify whether the opportunity still exists. We consider these to be failed MEV transactions as the MEV transaction was ultimately not sent because the result of the check indicated that the opportunity had disappeared.
Details of extracted MEV: the sender's income was $0, and the miner for this block earned 0.01 ETH (approximately $19 at the time).
MEV transactions have many fascinating aspects, such as their complexity, the more or less elegant ways they fail, and the stories they tell about pseudonymous users (like this arbitrage from a seemingly misaligned 0x open order book, which netted the sender $1.9 million in income while charging $73 in transaction fees).
Network fees for extracting MEV
DeFi trading bots compete for MEV opportunities by participating in frontrunning/priority gas auctions like in Example 1 and engaging in backrunning (i.e., sending many transactions with gas prices slightly below or equal to the target in the same block to be packed, thus following specific transactions like oracle updates as closely as possible).
Both practices are detrimental to Ethereum as they cause a surge in on-chain transaction volume, putting upward pressure on gas fees, as seen in the high gas prices in Example 2. Such high prices impact Ethereum's permissionless nature, as costs become too high for small users, forcing them off the network.
Moreover, a transaction winning an MEV opportunity reveals that there are numerous reverted and checked transactions scattered across the Ethereum blockchain, which we classify as failed MEV transactions. We believe these failed MEV transactions do not need to be recorded on-chain, occupying valuable block space.
Since January 1, 2020, operations extracting MEV have accounted for at least 3% of the overall gas consumption on the Ethereum network (see Figure 4). Amplifying and verifying the MEV transactions, we found that their gas consumption could fill at least 4,500 Ethereum blocks, wasting a significant amount of valuable block space!
Figure 3: Since January 1, 2020, the gas volume of extracted MEV is categorized by successful (green) and failed (red) MEV transactions relative to the overall network gas volume
The evolution of MEV: Maximal Extractable Value
Today, before Ethereum transitions to POS, miners have the greatest power in transaction packaging and ordering because they are the block producers. The term MEV was originally introduced by Phil Daian et al. in their 2019 research report "Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in DEXs," meaning Miner Extracted Value. However, MEV exists on all smart contract blockchains, where one party is responsible for transaction ordering, and this operator is not necessarily a miner, as there are also validators in ETH2.0 and rollup providers on Optimistic Rollups. Therefore, we suggest renaming MEV to Maximal Extractable Value to broaden its scope to cover other blockchain architectures while still retaining the MEV nomenclature.
Removing the term "miner" from the name of MEV also resolves another common confusion: the belief that only miners are the sole actors in obtaining this value. The reality is that, so far, MEV on Ethereum has mainly been extracted by non-mining DeFi traders and bots.
Figure 4: Since January 1, 2020, the distribution of extracted MEV between MEV Tx senders and MEV Tx miners (gas fees)
However, in recent months, we have begun to see more miners actively participating in the MEV game, as they can directly extract by running their own bots, reach profit-sharing agreements with DeFi traders, or utilize market infrastructure for extracting MEV, such as Flashbots' MEV-Geth.
Avoiding the MEV Crisis
The MEV crisis may occur in several ways:
Miner incentive misalignment leading to consensus instability, unilateral miner transactions causing unfair information asymmetry, and excessively high network fees making Ethereum unusable. This crisis is difficult to resolve because any attempt to prevent miners or traders from obtaining MEV income streams may lead to the emergence of opaque off-chain markets. However, the increasing complexity of Ethereum (such as new smart contract deployments, new user additions, and new composability) indicates that the scale of MEV will only continue to grow.
We believe that extracting MEV is inevitable. To avoid the MEV crisis, extraction must be conducted in a trustless, fair, and efficient manner. The first step we are taking to avoid this crisis is to create a mechanism for efficient and fair extraction and to improve its trust guarantees.
Outlook
Although there has been much attention around MEV, it has remained at a theoretical stage until recently, when it has begun to move towards practice, as seen in the research paper "Quantifying Blockchain Extractable Value: How Dark is the Forest?" published by Zhou et al., and the discussions held during our MEV workshop on January 21. This may be because quantifying MEV is complicated, requiring substantial infrastructure, data analysis, and in-depth understanding of interactions with smart contracts. Worse still, as more security-critical infrastructure shifts off-chain (for example, the trading logic of liquidation bots moving off-chain) and the on-chain state and scale grow, understanding MEV will become increasingly complex.
We believe that MEV will be an important topic for Ethereum in the future, and there will be increasing attention in 2021. People cannot separate the social aspects of Ethereum from its technical aspects. Ultimately, the debate around MEV, as well as the future of Ethereum, will also concern the social norms that the community will reach a consensus on. We hope that MEV-Explore can help facilitate discussions around these norms.