Since the publication of the seminal paper "Flash Boys 2.0" by Phil Daian et al. in April 2019, MEV (ie "Maximal Extractable Value", the maximum extractable value, formerly known as "MinerExtractable Value" has been used in Ethereum and other smart contract blocks). A theoretical shadow was cast on the chain. Then in August 2020, Paradigm research partner Dan Robinson published a blog post titled "Ethereum is a dark forest", revealing how this theory is in the blockchain It became a reality.
Although this is seen as a terrible reality, the level of MEV activity was not clear before. This gave birth to Flashbots[3], a team dedicated to increasing the transparency and democratization of the Ethereum Dark Forest. Since the end of 2020, they have been steadily expanding the community's awareness of MEV, including the release of MEV-Geth.
Note: MEV-Geth is a specially customized Ethereum node client, run by the Ethereum mining pool. The mechanism of Flashbots is able to counter arbitrage robots on the Ethereum network (such as rush robots), resulting in a large number of such robots It was closed, making MEV activities more "democratized". Miners (mining pools) can run MEV-Geth to mine MEV blocks to obtain revenue.
The following is an excerpt from the announcement published by Flashbots [4]: "MEV-Geth is our (ie Flashbots team) initial effort to promote the democratization of MEV. It is an upgrade to the go-ethereum client, which enables the block space auction mechanism of sealed bidding to be able to Communicate in terms of transaction order preference. Fundamentally, MEV-Geth provides a more effective communication channel for miners and bidding traders. Although MEV-Geth’s proof of concept is incomplete in the trust model, we believe It is a major improvement to the status quo. The adoption of MEV-Geth can greatly alleviate the large number of blockchain congestion problems caused by front-running bots and back-running bots."
Note:
Front-running: refers to making a profit by placing a specific transaction before the target transaction (attacked transaction) in the same block, mainly for clearing and arbitrage transactions;
Back-running: refers to making a profit by placing a specific transaction after the target transaction in the same block. The typical target is an information input mechanism (Oracle) transaction or a large order transaction;
Sandwich attack: The combination of the above two forms of attack allows the target transaction to be sandwiched in the middle of two specific structured transactions for profit. The sandwich attack greatly broadens the attackable range. The attacker’s first construction transaction creates greater transaction price fluctuations. After the target transaction is executed, the second construction transaction will be executed and exchanged back to the token that launched the attack to complete the acquisition. beneficial.
——From Ethereum enthusiasts
Since then, as the debate about EIP-1559 reached a climax in February, a community conference call around this proposal at the end of February [5] made the Ethereum miners pay more attention to MEV. Since EIP-1559 (by destroying BASEFEE) will remove the generous transaction fees from miners' income, and MEV-Geth provides simple upgrade options, this has made MEV very attractive to many miners (Note: MEV activities have generated “unconventional” income streams for miners), which has led to a surge in mining pools participating in MEV activities in recent weeks.
Above: Since 2015, the change in transaction fees (the red part) as a percentage of the total monthly income of Ethereum miners.
01 How to trade MEV?
Before we start discussing the rapid growth of MEV, it is necessary to understand what MEV trading is like. Most MEVs involve manipulation of the order of transactions. This can be achieved in the following ways:
Gas fee bidding, that is, you (such as an arbitrage robot) make the gas fee bid just above or below the target transaction to ensure that your transaction is packaged and confirmed by the (miner) just before or after the target transaction; or
"Bribery" the miner so that the miner directly arranges transactions in the block you choose.
Regarding the first situation above, if you see one or more failed transactions, the transaction fee is the same as the transaction fee of another transaction that was successfully packaged before it, or slightly lower than the successful transaction. Transaction, the first situation above may have occurred (specifically, the so-called "snap-off transaction" has occurred). These failed transactions are the "victims" of MEV activities, or indicate that other arbitrage robots have lost in the competition (arbitrage robots are also competing with each other).
Above: A failed transaction that was preempted in block 11737990 of Ethereum. The Gas price of this failed transaction was only 0.000000001 Gwei lower than the other two successful preemptive transactions. (Click on the picture to enlarge)
Regarding the second case above, when a mined block contains one or more transactions with a very low Gas price (such as 0 gwei or 1 gwei), it is very likely that the first occurrence will occur. 2 situations.
Above: A sandwich attack on a transaction that transferred 30 ETH occurred in Ethereum block 12209917. (Click on the picture to enlarge)
Although in many cases, the exact method of operation of the above transaction may not be clear (such as the specific amount of "bribery" in the second case above), for Flashbots transactions, these methods of operation are transparent. Summarize the asset inflow & outflow situation of the relevant address of the transaction to view these MEV transactions. For example, by listing the exact amount of Token and ETH transferred in the first 3 transactions in Ethereum block 12165347...
Above: The “bribery” of F2Pool at address 0x000..241 is clearly shown in transaction #3.
…And summarizing the net inflow & outflow of each address and Token, we can see that the arbitrage robot 0x000..241 and F2Pool (fish pool) evenly split the arbitrage profit of 0.04 ETH.
02 MEV's growing appeal
Using data from Etherscan, Flashbots, and an address identified as an Ethermine mining pool[6]\, we have seen that the number of blocks containing]bundled transactions has increased significantly in the past month.
Note: Bundled transactions refer to some transactions that are sorted in an unconventional way in a block, usually as part of a runaway transaction, trailing transaction, or sandwich attack.
Above: The number of blocks containing "bundled transactions" has surged in the past month. Source: Etherscan.io
In other words, blocks containing "bundled transactions" accounted for 30% of the total number of blocks mined in the first week of April!
Above: In the past month, the number of blocks containing "bundled transactions" as a percentage of the total number of blocks mined each week has soared from 1% to 30%. Source: Etherscan.io
What are the mining pools participating in it? The data shows that all the top Ethereum mining pools are included. Before March this year, the UUPool mining pool was the only mining pool that actively participated in "bundled transactions"; in recent weeks, other largest Ethereum mining pools have also joined it, eclipsing the former.
Above: Since February, the number of blocks containing "bundled transactions" mined by major Ethereum mining pools has increased every week. Source: Etherscan.io
Among them, Ethermine is currently the only mining pool that does not use MEV-Geth, and they run their own MEV beta (see the picture below).
Above: On March 18, Bitfly, the parent company of the Ethermine mining pool, announced on Twitter that the mining pool has launched its own MEV beta program to compensate for the upcoming reduction in mining rewards due to the adoption of EIP-1559.
03 Earnings withdrawn by miners
From these mined blocks, we can see the total amount of ETH "bribered" to miners: as of the time of writing, a total of 3404 ETH (equivalent to $7.4 million) was paid to miners. Although compared to the total transaction fee of about 797,000 ETH paid by the Ethereum network from February to February, this fee only accounts for about 0.4%. There is still more room for growth in the MEV value that can be withdrawn by Ethereum miners.
Note: Since Ethermine is not using MEV-Geth, their "bribery" proceeds are not visible on the chain, so they are not included in the data.
Above: The growth of "bribery" income of the major mining pools of Ethereum. Among them, the "bribery" income of Spark Pool changed from 0 to 1 within a week, and it grew rapidly. Source: Etherscan.io
Flashbots’ MEV-Inspect shows that the accumulated MEV value extracted in the current Ethereum network (not just those users who use Flashbots MEV-Geth) has exceeded 360 million US dollars (Note: MEV-Inspect is a monitor created by Flashbots Visual MEV indicator of Ethereum block).
Above: The cumulative value of MEV withdrawn in the Ethereum network has increased since January 1, 2020. Source: https://explore.flashbots.net
04 The most popular way: Sandwich attack
Finally, let's take a look at the number of Flashbots transactions contained in a single Ethereum block. Up to now, the most common occurrence in a single block contains 3 Flashbots transactions, which indicates that sandwich attacks are the most popular type of MEV activity (the typical way of this MEV activity is: the first transaction and the third transaction are arbitrage Transaction, the second transaction sandwiched between the two is the target attacked transaction).
Above: The frequency of Flashbots transactions contained in a single block, of which the frequency of 3 Flashbots transactions is the highest. Source: Etherscan.io
Among them, the highest record is that a single block contains up to 15 MEV transactions, which are 5 sandwich attacks launched on Uniswap. See below:
Screenshot source: https://etherscan.io/txs?block=12096766&ps=10&p=23
Interestingly, the "sandwich attacker" may themselves be "sandwich attack" (see the picture below), which provides endless possibilities for smart predators in the dark forest.
Source: Twitter @fifikobabyashi
It should be noted that all the MEV data shown above may only be a small part of the total value of MEV, and the actual number may be much larger than what has been found so far.
Source: Flashbots
05 How do ordinary users deal with MEV?
For ordinary users, MEV is unlikely to be a more serious problem than the current high gas prices. A high-value AMM (automatic market maker, such as Uniswap) transaction may attract the attention of MEV predators-in this case, limiting slippage may help prevent or limit MEV attacks. Using private transaction service networks such as Taichi Network [7] may also be helpful, although users need to believe that the operators of these services will not also conduct preemptive transactions.
Regarding Etherscan, we hope to increase the transparency of MEV by displaying more detailed information on the block explorer. Stay tuned!