Trades initiated on DEXs and wallets create profit opportunities for specialized bots that identify and manipulate the order of trades, and they profit through front-running or arbitrage operations. These opportunities are opaque and rarely seen by ordinary users.

These automated programs are called MEV bots, and since 2021, MEV bots have made approximately $700 million in value through the above operations.

1.1 Definition

MEV (Maximum Extractable Value) refers to the value extracted from users by reordering, inserting, and reviewing transactions within a block, such as arbitrage, liquidation, etc. It can be fundamentally understood as "the additional benefits obtained by adjusting the order of Tx when creating a new block."

The concept of MEV was first proposed by Phil Daian in "Flash Boys 2.0". Before the Ethereum merger, MEV was mainly captured by miners, so it was also called "Miner Extractable Value" at the time.

When a user submits a transaction on the blockchain, the transaction generally enters the Mempool, a publicly accessible pool of pending transactions. Arbitrageurs and miners can search the Mempool and find opportunities to obtain MEV.

After the Ethereum merger, the roles in the MEV supply chain have also changed due to the change in the mining mechanism. Before Danksharding was implemented, Flashbots proposed MEV-Boost as a practice of PBS outside the protocol. Buider focuses on building blocks and maximizing the benefits of each block as much as possible, and then the most profitable block is submitted to the Proposer. The implementation of the PBS mechanism has brought about some changes in the interests of the blockchain block industry, while promoting the specialization and commercialization of relevant institutions in the industry chain, and also forming a new pattern for the MEV supply chain.

1.2 Classification

According to the way MEV is obtained, it can be mainly divided into the following categories:

Front Running: The act of preempting the execution by paying a higher Gas Fee than the target transaction in the Mempool. For example, if the Mempool contains a Tx of a certain trading pair, which will cause a large fluctuation in the price of the token, you can insert a Tx before the Tx; or when a new NFT project is launched, the Tx of the Mint NFT can be preempted. At present, it is also simple to prevent being preempted. You only need to connect to a Private Transaction Pool like Flashboots Auction to get Frontrunning Protection;

Back Running: refers to the act of inserting a transaction after a transaction that will cause a large price fluctuation, which may be arbitrage, liquidation, etc. For example, a large Tx occurs on the chain, causing a price fluctuation in a certain trading pair. Inserting a transaction after it can not only level the DEX price, but also make a profit for the arbitrageur; or after a mortgage loan occurs on the chain and triggers the liquidation line, a liquidation order is inserted after it;

Sandwith Attack: Sandwith Attack is actually a combination of Front Running and Back Running. The searcher searches for potential large transactions in the Mempool, buys assets that will eventually appreciate before the transaction occurs, and sells these assets immediately after the large transaction is executed, thereby earning the difference;

Time Bandit Attack: This type of MEV mainly occurs in blockchain networks that follow the longest chain principle (such as Bitcoin with the Nakamoto consensus).

Judging from the results of these MEVs, Back Running MEVs are generally benign to the blockchain network. For example, arbitrageurs use the price difference between two DEXs + flash loans to achieve risk-free arbitrage, and liquidators maintain the healthy operation of the lending agreement. Front Running and Sandwith Attacks may cause losses to other users.

2.1 Current situation

In fact, MEV is controversial because the existence of non-benign MEV does not seem to be moral. For example, Front Running, Sandwith Attack, and Time Bandit Attack will destroy the transaction experience and harm the interests of ordinary users on the blockchain. Therefore, for a long time, I have hoped that the industry can launch a solution/product/protocol to prevent the occurrence of these non-benign MEVs.

However, the public visibility of transactions in the Mempool and the bidding rules for Tx on-chain sorting determine that MEV is inevitable. As a second choice, if your transaction cannot avoid being deducted from MEV, it is better to use a product/protocol that can feed back the benefits to you.

In view of the negative externalities that MEV (especially non-benign MEV) may bring to stateful blockchains (such as Ethereum), there are currently some products in the industry that can mitigate these risks. For example, the Falshbots series of products:

Flashbots Auction: Flashbots Auction provides a private communication channel between Ethereum users and Validators to effectively communicate the preferred transaction order within the block. This type of product allows on-chain transaction users to achieve Pre-trade Privacy, Failed trade privacy, Finality protection, etc.

Flashbots Protect RPC: This is an RPC endpoint product that allows users to implement Front-Running Protection. Users can add it to their wallets so that their transactions can be submitted to Flashbots Auction. For users, there is no perceptual difference from ordinary transactions, but the results can achieve Front Running Protection, Failed trade Privacy, etc.

MEV-Boost: During the PoS period, validators can sort and package transactions in Mempool, or they can choose blocks with higher MEV income that have been sorted by Builder and pushed by MEV-Boost. Through MEV-Boost, validators' income can be greatly increased, so most validators will choose to access MEV-Boost instead of sorting by themselves.

From the perspective of MEV Supply Chain, these three products play a role in each link of MEV Supply Chain.

2.2 Future

For the future of the MEV field, combined with the analysis of the current development status of the MEV field, there may be the following main trends:

(1) The head effect will be very serious: more than 90% of the past 500 Epochs were served by MEV-Boost, and Flashbots' series of products were almost the leading position in all aspects of block production during the PoS period. With the existence of First Mover such as Flashbots, new entrants who want to enter the MEV field need some core competitiveness to seize more market share;

(2) Whoever has the orderflow wins the world: To get more MEV opportunities, it is important to have sufficient orderflow. For ordinary trading users, there is actually no way to completely eliminate MEV. Even if the user adopts Flashbots Protect RPC, it can only prevent the Searcher of the Public Mempool from capturing the potential MEV of its Tx. The Builder in the Flashbots Auction network still has the opportunity to extract MEV from its Tx. Therefore, for ordinary users, since it is impossible to completely avoid the extraction of MEV, it is better to choose Wallets, DEXs or other Dapps that will feed back MEV income to Users;

(3) Multichain MEV still has room for growth: MEV within the Ethereum chain alone may have been fully captured. However, blockchain is a Multichain ecosystem, and MEV opportunities between Layer1 and Layer1, and between Layer1 and Layer2 are still difficult to capture. MEV in this regard may still have some room for growth;

(4) The chain requirements for deep-difference-resistant transactions can always be met: According to MEVwatch data, after the Merge, the blocks on the Ethereum blockchain that meet OFAC compliance requirements account for 57.49% of the total blocks. Only 35 of the last 100 blocks have implemented OFAC compliance, which has little impact on the chain of deep-difference-resistant transactions. Although after the Merge, most of the top staking platforms are centralized platforms, these centralized entities are inevitably subject to legal supervision, thus posing a challenge to the deep-difference-resistant capabilities of the Ethereum blockchain. However, even if more than 90% of Validators review relay routing transactions through MEV, those deep-difference-resistant transactions can still be chained within an hour.

3 Scenarios

3.1 Solana

Like Ethereum, Solana’s growth in financial activity attracted MEV activity, which began to degrade the end-user experience. However, unlike Ethereum, where gas fees became prohibitively expensive, Solana’s problems were caused by a combination of the following factors:

(1) Extremely low gas fees.

(2) Lack of fee market.

(3) The lack of a suboptimal transaction propagation protocol does not provide many options for preventing network spam.

During times of extreme market volatility or popular on-chain events such as NFT Mints, the volume of spam sent to the network can sometimes be so large that it can cause network outages.

Some may wonder why the Flashbots product suite can’t simply be repurposed for Solana. However, it’s important to consider that Solana’s architectural design is radically different from Ethereum’s and therefore requires a unique approach. Major differences include Solana’s speed (400ms block interval), unique data propagation protocol, transaction forwarding without a mempool, native fee markets, and parallel transaction processing.

In 2022, Jito Labs stepped in to provide much-needed MEV infrastructure with an approach specific to the Solana ecosystem. Like Flashbots, they started with a few key goals in mind: minimizing the negative externalities of MEV, preventing centralization, and distributing MEV rewards.

Since then, Jito has been the dominant MEV solution provider on Solana and has released a number of products, including:

Jito-Solana is the first third-party Solana client optimized for efficient MEV extraction. Much like mev-geth, it supports transaction collections and works seamlessly with Jito Relayer and Jito Block Engine.

Relayer is designed to provide a layer of protection for validators between their TPUs (transaction processing units) and network spam. Validators can run their own Relayer or use a version hosted by Jito Labs.

Block Engine is essentially a high-performance block builder - it conducts sealed bid auctions for block space and forwards the most profitable collection of transactions to the current leader for immediate execution. Block Engine is also globally distributed to provide open access with low latency.

3.2 Cosmos

While Cosmos arguably has only the most rudimentary DeFi ecosystem, it promises to be fertile ground for blockspace market design and cross-domain MEV experimentation.

Unlike Ethereum, which has already reached billions of dollars in transaction and lending volumes, and Solana, which focuses on low-latency financial applications, Cosmos seems to be making slow progress on MEV.

There are many possible reasons for this, but the most obvious explanations are the Tendermint client’s default use of first-in-first-out (FIFO) ordering, and a lack of financial activity.

It wasn’t until the launch of Osmosis in late 2021, and even the Terra crash in May 2022, that people began to notice and measure meaningful amounts of MEV captured in the Cosmos ecosystem. Combine these events with bear market conditions like plummeting fees, and it’s easy to understand why validators began to consider other options in an attempt to remain profitable.

As a result, several Cosmos-native MEV solution providers began to enter the space, most notably Skip Protocol and Mekatek.

Mekatek's core products

Zenith aims to create an open market for block construction in Cosmos. Seekers can submit transaction packages and compete for priority within a block, while validators can outsource block construction to Zenith and sell their block space for maximum profit.

Skip Protocol’s core products

Mev-Tendermint is a modification of Tendermint that allows validators to accept bundles of transactions and introduces sealed bid auctions for inclusion at the top of a block (Skip does not build the entire block, just the top).

Skip-Select brings Cosmos sovereignty to MEV by allowing fully configurable, governance-driven blockspace auctions. It enables validators to easily decide how to distribute MEV rewards, what percentage of the construction of a given block should be outsourced to Skip, whether to protect blocks from front-running/sandwiching, and more. Skip-Select also lays the foundation for future voting and enforcement of MEV preferences within the protocol through on-chain governance, which is enabled by the Cosmos SDK and ABCI++ (Application Blockchain Interface).

Success of PBS — The concept of Block Builder Separation (PBS) has spread beyond the Ethereum ecosystem, with some version of it now existing in the Cosmos and Solana ecosystems;

Latency Wars — Due to issues with the Solana network architecture, Jito Labs has adopted a latency-sensitive approach to MEV withdrawals, which gives an advantage to users running servers or validators outside of the United States or Europe;

Enshrined Solutions — Due to the level of sovereignty and autonomy that the Cosmos community has over its technology stack, it is often easier to embed MEV solutions such as PBS into the core protocol. This is for many reasons, including that while Cosmos governance is often challenging, it can be done on-chain without having to consider how changes will affect other applications. On the technical side, innovations such as the latest version of ABCI++ allow for new possibilities in how Cosmos-based applications can communicate directly with the consensus layer, allowing features such as threshold encryption;

Cross-domain MEV - As Flashbots describes in the SUAVE manual, the incentives to acquire cross-domain MEV will increase in the coming years and could pose a validation threat to the economic security model of various ecosystems. Since Cosmos is built to be cross-chain, it may be exposed to the centralized power of cross-domain MEV. There are already some large entities running validators on multiple Cosmos chains, which, if not controlled, will lead to a world where only a small number of extremely well-capitalized validators control a meaningful stake share on various chains.

4. Confrontation

When there is controversy, someone will naturally stand up.

4.1 Wallchain

Wallchain, a provider of anti-MEV solutions, announced that it has received a $2 million investment led by Cypher Capital, a multi-strategy venture capital firm headquartered in Dubai, UAE. The investment will be used to promote Wallchain's in-depth research on Web3 to achieve revenue growth and launch new MEV solutions.

Wallchain addresses the growing problem of MEV front-running by integrating its anti-MEV solution into DEXs and wallets, which will recapture these profits at the source. In simple terms, the solution inserts hedging transactions into user transactions, completely eliminating the possibility of MEV. The profits generated by the hedging are then distributed to the platform and end-users as cashback, creating a win-win situation for both parties integrating Wallchain.

4.2 Encrypted Memory Pool

Encrypted memory pools are a fascinating design space, let’s take a look at several implementation options.

Crypto memory pools are a powerful tool for solving MEV (if I can’t see it, I can’t preemptively trade) and deep differential problems (unless all crypto transactions are excluded), and there are currently multiple related solutions that can be used individually or in combination.

The basic idea is to allow users to submit encrypted transactions, which can only be decrypted after the block producers submit them:

User encrypts and broadcasts transaction, encrypted transaction is submitted, transaction is decrypted, transaction is executed (note: submission, decryption and execution may be in a single slot)

A key point to ensure here is to ensure that decryption does not depend on the user. There are several ways to achieve this:

(1) In-flight, trust a third party and send the data privately to him, who can decrypt and view the data, but promises not to disclose it publicly before the data is submitted to the chain. This is how products such as Flashbots Protect work.

(2) You can leverage trusted hardware. Plaintext can be run in trusted hardware but will not be publicly decrypted until the transaction is submitted. The most famous example is Flashbots SUAVE’s SGX.

(3) Threshold encryption/decryption (TED), where a committee can come together to force decryption of a ciphertext, but it requires the signers to reach a threshold to do so. For example, your “threshold” might be that 2/3 of the validators agree to decrypt.

(4) Delayed Encryption/Decryption (DED)

With delayed encryption, you can set encrypted information to automatically decrypt after a certain amount of time, which is a sequential computation associated with a VDF. To actually implement DED, you need a VDF ASIC. Fortunately, the Ethereum Foundation and Protocol Labs have been working on building them, and recently obtained the first test samples of chips built by GlobalFoundries. These VDF evaluators should be able to perform extremely fast sequential computations. These VDF ASICs are also suitable for time-lock puzzles and DED. (5) Witness encryption/decryption (WED), WED allows any witness to force decryption of ciphertext, which works well, but has not yet been implemented.

References: IOSG Ventures Jiawei, Natalie Mullins, TechFlow, Jon Charbonneau, 0x11, Foresight News