Foresight Ventures: Mapping, Classifying, and Dominating MEVs
secondary title
0. MEV?
Maximal extractable value (MEV) refers to the maximum value that can be extracted from block production in excess of the standard block reward and gas fees by including, excluding, and changing the order of transactions in a block.
a) MEV is always there
The ordering of transactions in the Ethereum block has not been constrained by certain rules from the beginning to the end, but can be determined according to the preferences of the miners.free modification. Geth client'ssource code, three examples are provided:
Type 1: Sort only by Nonce
The second type: sort by gas fee and Nonce (default option)
The third type: After sorting by owner, sort by gas fee and Nonce
actuallySorting is completely an open question, and miners can freely adjust it to capture greater profits, which is the protagonist of our discussion, MEV.
Before MEV is called MEV, its Alpha has been continuously mined by miners. flashfish0x tells aThe MEV story.
Before August 2020, the price feed of Compound is updated by a special oracle machine tx, so there will be miners monitoring Mempool, looking for accounts that can be liquidated, and using flash loans and other methods for arbitrage. Because only arbitrage tx happens to be updated when the price Only after tx is executed can the arbitrage succeed, and ordinary miners (at that time) will randomly sort the arbitrage tx with the same gas fee, so the arbitrageur will send the transaction with the same gas fee as the oracle machine price update tx, and win a random probability with other arbitrageurs .
After August 11, 2020, Geth released a new version, the first tx that reaches the network after the oracle price update tx will be successfully arbitraged, so the speed of obtaining tx information is also taken into consideration for competition.
The good times didn’t last long. On August 17, 2020, Compound switched to a more decentralized oracle. So the competition of MEV capturers became a pure gas war. They tried to get a higher price gas than others, Until no profit is captured by this liquidation operation, or someone wins.
secondary title
b) MEVs are everywhere
Before formally interpreting the definition of MEV, we can look at some data about MEV, so that we can intuitively feel its existence and influence.

May 2022,More than half of the trading volume on Uniswap is contributed by MEV robots,And only less than 20% of the trading volume comes from the front-end page of Uniswap.

dex.guruThe data also shows that a large part of the transaction volume of AMM on Ethereum is contributed by MEV robots.
MEV bots are ubiquitous in the dark forest of the blockchain, and have always dominated.
c) MEV supply chain
So how is a MEV activityproducewhat about

The life cycle of a tx in a crisis-ridden blockchain is as follows:
Health: Ordinary users interact with applications according to their intentions, wallets and applications interpret the intentions as tx, and send them to systems such as the public tx pool for processing.
Old: MEV Seekers (probably miners) pick out all profitable opportunities and try to catch MEV by sending transactions or ordering them deliberately.
Disease: L1 miners (in most cases will not be MEV searchers) or L2 Sequencer aggregate transactions and generate blocks.
Dead: The verifier (currently still a miner) verifies the block, and the transaction is officially confirmed.
MEV robots carry out activities on the chain according to their owner's will, pack tx and send it to uninformed miners to produce blocks.From a good point of view, they are important roles to ensure market stability and DApp activity; from a bad point of view, they use their natural advantages (they can monitor the entire Mempool) to treat "ordinary users" unequal of exploitation.
d) Specific definition of MEV
The word MEV has two official interpretations, its full name can be:
Miner Extractable Value (miners can extract value)
Maximum Extractable Value
When we combine the two explanations, we get a concept that is easiest to understand:MEV is the maximum value that miners can extract, which is the incentive for inserting tx at a specific position in a block.
Personally, I think that a more comprehensive definition of MEV refers to miners/Validators/robots/oracles/roles other than ordinary users, using the asymmetric information of miners to extract the maximum value.The roles of non-ordinary users (understanding the code, understanding the network mechanism, and understanding the use of MEV), through their own "privileges" to extract additional value and thus profit, can actually be regarded as MEV in a broad sense:
Take the block miner as an example: After seeing the transactions in the Mempool, when it is the turn to generate a block (very small probability), it can completely reorder the transactions in the block according to its own wishes (instead of normal nonce and gas fee), and send new transactions, so as to obtain greater additional profits in addition to rewards.

Take a user who understands the concept of using MEV as an example: useFlashbots ProtectAs a tx pool, avoid being cut by MEV robots and tx can be obtainedPriority execution and other advantages; passflashsideOr the Compound liquidation example in the previous article, monitor Mempool to arbitrage NFT and on-chain activities, and use just the right gas fee to let uninformed miners help them capture MEV; throughmint.funMonitor Mempool to mint the latest NFT projects.
Take the most exploited ordinary users as an example: get up in the morning to buy ETH, but the first tx fails due to insufficient gas and timeout; the second tx at noon finally succeeds but is cut by the trap; stay up late at night, want to mint a fancy It has been a free mint NFT for a long time, but the transaction was monitored by others as soon as it was sent, and the mint was not received in the end.
The additional profit of MEV extractors comes from other transactions in the block (almost from ordinary users), and squeezes a part of the space in each block (despite the lack of elastic demand for gas fee, their transactions are usually in the block The first one, will not directly affect user tx),first level title
Classification of MEV transactions
The following is 0xminion’s feedback on MEV activitiesclear illustration:

In terms of purpose, MEV operations can be divided into: various arbitrage, simple front-running, trap attacks, etc.
Most of these operations will be arbitrage operations, which are basically initiated by robots. These robots have done a lot of work for the optimization of gas. For example, they usually have countless tokens in their wallets, each of which is only a little Quantity. This is mainlyUtilizes EIP-2200,When the user receives the ERC-20 token, if there is this token in the wallet, it will save more gas than if there is no. There isLet the address have more zeros. Of course, the above arbitrage optimization operations have little to do with MEV itself.
MEV itself is mainly divided into the following six types:
a) Front Running
Front Running means that the MEV robot pays a slightly higher gas fee to preemptively execute a transaction before a Mempool transaction, such as Swap tokens at a lower price.

When this type of MEV activity does not cause subsequent "casualties", it can be regarded as neutral (not benign because it mainly jumps in the queue); but in many cases, subsequent transactions usually fail or perform worse, Therefore it is considered malignant.
There are currently many services focused on improving the capture of such MEVs, such asbioXroute(Similar to the faster and more private Mempool provided by the mafia after collecting protection fees, thereby speeding up the confirmation efficiency of tx and the defense against external Front Running).
the heart of the matterThe main reason is that this type of MEV directly reflects the unequal information between MEV capturers and ordinary users. However, it is impossible for everyone to completely open, transparent, and uniformly reach a consensus on the transaction sorting method and algorithm.
b) Back Running
Back Running is when a robot tries a different arbitrage, liquidation, or trade after a trade has caused a large price dislocation.
The most typical example is the clearing and arbitrage operation we mentioned earlier. This type of MEV activity can be considered benign as a whole, which can ensure the stability and continuous operation of the market.

On a multi-chain architecture network like Cosmos, such MEV activitiesEspecially do well,Because there are so many networks, such activities are needed to keep DeFi applications running and efficient at all times.
c) Sandwich Attack
Sandwich Attack is a combination of the previous two attacks, which attack the transaction before and after. It is usually called a clip. For example, the MEV robot places a buy order before the transaction and a sell order after the transaction, allowing the user's transaction to be executed at a worse price.

This attack can sometimesVery complex and potentially very damaging,The picture below shows a user who has a robot holding Curve through 100 million DAI:

It can be generally considered vicious, but somehow acts like a speedometer on a highwayspurThis allows users to use a more reasonable slippage, thereby enhancing the overall interests of the network.
d) Time-Bandit Attack
The time thief attack is that after the block is generated, the miner re-mines the block to cause the block chain reorg, and at the same time extracts the value in the block dug by himself. This is the most vicious MEV, which will cause the user transaction to be invalid. At the same time, although this Minimal, but it happenspossibility.

Due to the principle of the longest chain in the blockchain network under the Nakamoto consensus, block reorg occurs very quicklyfrequently (The delay is also large),Therefore, this type of MEV is likely to be captured. In Tendermint or PoS Ethereum, the occurrence of this type of MEV will be greatly reduced.

About Time Thief MEVcool pointYes: Future events can affect the past (include "future" transactions in "past" blocks).

But under simple quantification, theExpected rate of return is not highAt the same time, it will be condemned for deliberately undermining the stability of the blockchain network (such asReorg-as-a-Service),So it rarely happens.
e) Clogging
The validity of any NFT, asset, and Rollup transaction is actually guaranteed by purchasing a certain space in a certain block on the blockchain network. The following is the blockchainblock spaceMarket supply and demand:

Clogging is to win by continuously monopolizing all the space of the block, such asFomo3DThe victory of the game.
Remember the Geth source code at the beginning? Since about 70% of Ethereum miners sort transactions according to the default gas fee sorting, Clogging is generated.
But at present, because of the complete infrastructure, such as oracle machines and Rollups, etc. will submit transactions rain or shine, and the MEV robot will carry out such activities during the active period of the network, and the cost will be relatively high.
f) Non-Broadcast Transactions
The initiators of the previous activities are basically MEV robots, not the block miners themselves.
Non-Broadcast Transactions are the tx secretly submitted by the miners who produced the block, that is, when the miners know that they can produce a block, they instantly insert some transactions into the block to capture MEV.

first level title
2. Is MEV good or bad?
In the previous analysis, we discussed different types of MEV, interspersed with our evaluation of each and whether it is good or bad. So overall, is MEV good or bad? How should we deal with it? Different networks will How to deal with it differently?
Pros and cons of MEV:
Good MEV: Used for arbitrage liquidation (Back Running), open and transparent market (Flashbot, MEV Auction), and does not affect the network or other users.
Bad MEV: Used to extract value from other users (Sandwich Attack), send privately without broadcasting (Time-Bandit Attack, Non-Broadcast Transactions), affect the normal operation of the network (Clogging).
From the perspective of the number of categories, MEV seems to be a neutral role that is neither bad nor bad, but when considering the nature of MEV (incentive to insert tx into block), this incentive is too large, which will cause the damage caused by chasing bad MEVs to be far greater than that of good ones. The benefits of MEV. In addition, the emergence of MEV is also due to the unequal information and knowledge. There is only equality but no equity in the blockchain network.
first level title
3. In-depth thinking and processing of MEV
secondary title
a) Solve the MEV black market and its huge incentive
MEV is a black market (or dark forest) of opaque information and knowledge that creates huge profits. We will use this lens to think about strategies against MEV.
Black market valuations across the worldAbout $180 million, and an inevitable evil that cannot be eradicated. The market for MEV is also far larger than we can observe.

Since this black market is inevitable, why not let it be exposed to the sun, so that everyone can freely capture and protect their own MEV, so that ordinary users can form a joint force, and can weaken the confrontation of MEV capturers against users.
Flashbots proposes the following five market scenarios to limit MEV extraction,Thereby reducing the overall negative externality of MEV:

secondary title
b) The Complexity of MEV: Scenario Differences
Single-chain scenario: Most of the pen and ink in this article is to discuss the MEV situation in a single blockchain network, but in reality this is an overly idealized analysis.
Cross-chain scenario: one blockchain network = one trust zone. In reality, there will be countless blockchain networks with different mechanisms and different types of MEVs. TheseCountless trust zones allow arbitrage between networks to exist everywhere.For example, even if there is no MEV in Ethereum at all, if there is an arbitrage opportunity on Cosmos, then the verifier of the bridge or the cross-chain application robot can capture MEV on Cosmos, and eventually Ethereum also becomes a victim of this MEV.

secondary title
in ours
in oursExplore Rollup Network Articles, we learned the difference between the single Layer1 and the Layer2 Rollup built on top of it.
1. Rollup
As an "enhanced smart contract" and a "centralized trusted blockchain network", Rollup currently has a centralized block generation and sorting mechanism, so it has different MEV performance. The current centralized Sequencer (that is, only A node) causes all MEV to be captured by Rollup. As more and more liquidity and on-chain activities are transferred to L2, the income (including MEV) that L1 miners can obtain is actually being captured by RollupMoved to L2 Sequencer.
Of course, the Rollup network itself is aware of and solves this problem, and their fair ordering of tx reflects the processing of MEV. Different Rollups have different strategies for MEV, and the meanings for network participants are completely different:

Modular BlockchainModular BlockchainAfter the realization of the more prevalent, the problem of MEV needs more research and thinking. For example, the modular layout of Ethereum and Celestia will be different. Currently, Rollups on Ethereum are all Secured Rollups, just buildn two-way trusted cross-chain bridges(They are supposed to build such a bridge), the common settlement is on Ethereum, and the Sovereign Rollup encouraged by Celestia is independent, DA is likely to be different, and n^2 bridges or protocols like IBC or XCM may be needed to fully Open up. This creates a completely different MEV market and captures opportunities.
From the L2 MEV problem, we can also derive the L1 and L2Thoughts on Value Relationship,No additional expansion is done in this paper.

2. More centralized blockchain
for faster,Solana has no public Mempool,Instead, use a Gulf Stream that is only visible to miners who are expected to generate blocks as a Mempool (That's why it crashes…). This means that MEV Bot has no way to capture MEV. Only miners who run a Validator and are about to generate blocks have the opportunity to sort transactions or send new transactions to capture MEV. But combined with Solana’s In the case of low profit for miners, this design actually leads to lower income for miners. So now there isJito LabsDo a mev-geth client similar to Flashbot to allow miners to auction their own block space, so that MEV can form an open free market. Solana also hasQUIC and per account fee marketfirst level title
3. Conclusion
For the topic of MEV, this article is only a superficial analysis, and there are many interesting things that have not been mentioned due to space limitations (SGX, PBSVery low rates (low fees)
in aideal networkinside:
Anyone can send transactions (no censorship)
No spam (no spam)
Very low rates (low fees)

The existence of MEV makes it impossible to have both fish and bear's paw:
no spam + low fees: Web2-like Censorship must exist.
no censorship + low fees: MEV Searcher will send spam to affect normal transactions.
no censorship + no spam: You need a fee rate market to sort transactions, and you need high gas to prioritize transactions.
But don't worry too much,Web1 or Web2 or the real world have not completely solved the negative externalities of "MEV", and the various solutions of Web3 have done very well. MEV has always been an open problem, there is no completely correct solution.
Then Web3 uswhat to do?
L1/L2: Prioritize MEV in design.
Miners: Be confident and bold to capture value without affecting the ecology, because this is a part of network game theory.
DApp developers: consider MEV when designing applications, and whether the mechanism will harm ordinary users.
Users: Understand MEV, and try not to use networks or applications with insufficient MEV mechanism design.
Foresight Ventures bets on the innovation of cryptocurrency in the next few decades. It manages multiple funds: VC fund, secondary active management fund, multi-strategy FOF, special purpose S fund "Foresight Secondary Fund l", with a total asset management scale of more than 4 One hundred million U.S. dollars. Foresight Ventures adheres to the concept of "Unique, Independent, Aggressive, Long-term" and provides extensive support for projects through strong ecological forces. Its team comes from senior personnel from top financial and technology companies including Sequoia China, CICC, Google, Bitmain, etc.Front run the crisis.
About Foresight Ventures
Foresight Ventures bets on the innovation of cryptocurrency in the next few decades. It manages multiple funds: VC fund, secondary active management fund, multi-strategy FOF, special purpose S fund "Foresight Secondary Fund l", with a total asset management scale of more than 4 One hundred million U.S. dollars. Foresight Ventures adheres to the concept of "Unique, Independent, Aggressive, Long-term" and provides extensive support for projects through strong ecological forces. Its team comes from senior personnel from top financial and technology companies including Sequoia China, CICC, Google, Bitmain, etc.
Website: https://www.foresightventures.com/
Twitter: https://twitter.com/ForesightVen
Medium: https://medium.com/@foresightventures-zh
Substack: https://foresightventures.substack.com
Discord: https://discord.com/invite/jYtyfxfB
Linktree: https://linktr.ee/foresightventures
Links
https://thedailyape.notion.site/MEV-8713cb4c2df24f8483a02135d657a221
0a:
https://ethereum.stackexchange.com/questions/6107/what-is-the-default-ordering-of-transactions-during-mining
https://github.com/ethereum/go-ethereum/blob/290e851f57f5d27a1d5f0f7ad784c836e017c337/miner/worker.go
https://twitter.com/flashfish0x/status/1516378083628093447
0b:
https://twitter.com/sui414/status/1532088483296120832
0c:
https://twitter.com/thegostep/status/1521104235114508289
0d:
https://docs.flashbots.net/flashbots-protect/rpc/quick-start/
https://twitter.com/blockworksres/status/1532782392569606145
https://twitter.com/_anishagnihotri/status/1520579207478267905
https://www.recvc.com/mev-2-0-the-rise-of-mpsvs/
https://twitter.com/hasufl/status/1439938607142277121
1:
https://rileygmi.substack.com/p/what-is-mev-a-simple-guide
https://twitter.com/0xminion/status/1418059536712167432
https://twitter.com/libevm/status/1474870665773682692
https://medium.com/coinmonks/on-efficient-ethereum-addresses-3fef0596e263
1a:
https://rekt.news/return-to-the-dark-forest/
https://medium.com/offchainlabs/five-theses-about-transaction-ordering-mev-and-front-running-5ebf52bc0cbe
1b:
https://twitter.com/thyborg_/status/1547898785933639684
1c:
https://twitter.com/bertcmiller/status/1527757146716348416
https://twitter.com/tarunchitra/status/1549134678036303873
1e:
https://www.longhash.com/en/news/2280/With-Just-$1400,-You-Can-Clog-the-$20-Billion-Ethereum-Network
https://twitter.com/Leorzhang/status/1374383287309758476
1d:
https://www.paradigm.xyz/2021/07/ethereum-reorgs-after-the-merge
https://www.paradigm.xyz/2022/07/consensus-throughput
https://twitter.com/0x9116/status/1413687410941169666
https://femboy.capital/mev-time-turner
https://twitter.com/SiegeRhino2/status/1416311471303188481
1f:
https://medium.com/blockchannel/life-cycle-of-an-ethereum-transaction-e5c66bae0f6e
2:
https://docs.google.com/presentation/d/13q_cmaznKdAElherLI6fsBexJILYwTj2ddQlMTGUipU/edit#slide=id.g10d8f164256_0_0
2a:
https://twitter.com/mohakagr/status/1417143241812561930
https://docs.google.com/presentation/d/13q_cmaznKdAElherLI6fsBexJILYwTj2ddQlMTGUipU/edit#slide=id.g45d315b027c424f1_13
2b:
https://pdaian.com/blog/mev-wat-do/
3a:
https://twitter.com/mohakagr/status/1417143241812561930
https://docs.google.com/presentation/d/13q_cmaznKdAElherLI6fsBexJILYwTj2ddQlMTGUipU/edit#slide=id.g45d315b027c424f1_13
3b:
https://mp.weixin.qq.com/s/GT4Yfw8VPhBikME4mKCTNQ
https://twitter.com/j0hnwang/status/1489268470973878272
https://ethresear.ch/t/mev-auction-auctioning-transaction-ordering-rights-as-a-solution-to-miner-extractable-value/6788
https://ethresear.ch/t/mev-resistant-zk-rollups-with-practical-vde-pvde/12677
https://twitter.com/j0hnwang/status/1489268486358671364
https://www.youtube.com/watch?v=lLuHFFbYv0Y&t=10s
https://twitter.com/benjaminsimon97/status/1380291321286569986
https://twitter.com/apriori0x/status/1546464783318372353
https://twitter.com/0xmisaka/status/1511370043501785091
https://twitter.com/jon_charb/status/1546501633856634880
https://twitter.com/sreeramkannan/status/1550572765899472896
https://twitter.com/barnabemonnot/status/1550346797494800384
4:
https://twitter.com/bertcmiller/status/1399737488151830538
https://notes.ethereum.org/@vbuterin/pbs_censorship_resistance
https://twitter.com/0xmisaka/status/1511370037306834954
https://pdaian.com/blog/mev-wat-do/
https://medium.com/flashbots/frontrunning-the-mev-crisis-40629a613752
Not Included but Recommended to Read:
https://twitter.com/0xElan/status/1547026528235429894
https://twitter.com/uriklarman/status/1546971147018948609
https://twitter.com/Thyborg_/status/1547898785933639684
https://twitter.com/0xcacti/status/1548470752071913472
https://twitter.com/sxysun1/status/1483860078331584512
https://theknower.substack.com/p/its-all-a-dark-forest
https://flashbots.mirror.xyz/NayGRPko-vFnauN5WOn6rQHgMEUqCpmlPPDfKRXJriU


