• Fri. Sep 29th, 2023



Invisible tax in Ethereum: What is MEV and how to resist it


Nov 21, 2022

Invisible tax in Ethereum: What is MEV and how to resist it

The cryptocurrency market is growing exponentially – its capitalization exceeded $ 2 trillion. Only from the beginning of the year this figure has grown by 180%.

The segment of decentralized finance (Defi) also demonstrates no less impressive results. Its TVL is $ 181 billion, the growth since the beginning of the year exceeded 500%.

The popularity of applications based on smart contracts opens looms for additional income, based on market ineffectiveness, specific features of Ethereum architecture and other blockchain systems, as well as the automatic market material that is common in Defi with slippery and unstable losses.

One of these loopholes is Miner Extractable Value (MEV). This is a profit that a miner can be obtained due to the inclusion, exclusion or change in the transaction order at its discretion in the blocks created by him.

FORKLOG figured out the features of MEV and the reasons for the growth of its popularity. We found out what are the strategies of MEV extraction and solutions designed to minimize the negative effects associated with it.

  • Against the backdrop of the rapid growth of Defi, the relatively new risk to users became MEV. It is not only about high commissions for users who pay the so -called invisible tax, but also about the sabotage of consensus by miners competing for additional profits.
  • Many projects create various tools to mitigate the negative consequences associated with MEV, including the execution of transactions for non -optimal exchange rate.
  • Effectively resisting MEV can develop a second -level scaling solution and the launch of Ethereum 2.0 with a completely different consensus mechanism.

MEV concept

Bitcoin and Ethereum blockchains are unchanged registers protected by a decentralized network of computers, called miners.

Miners constantly aggregate transactions in the blocks of consistently interconnected. Although blockchains guarantee the validity of transactions (for example, the lack of double expenses), it is not at all that in the block itself these transactions will be located in the same order in which they were sent to the network.

Ethereum Mainers usually prioritize transactions depending on the price of gas to maximize receipts from commissions. However, this approach is not at all a requirement of the network. Therefore, miners can receive additional income using the ability to arbitrarily change the transaction procedure. This allows them to extract Miner Extractable Value.

Before included in the Ethereum transaction unit, it is sent to a publicly affordable membrane. It is a large set of transactions awaiting confirmation of the network.

In this Mempool, MEV bots are looking for the possibilities of receiving some income, for example, from arbitration operations or from the elimination of insufficiently secured loans.

Suppose the Uniswap exchange has an arbitration opportunity for $ 10,000 as a result of a price slip after a large trade operation. The arbitration bot notices this opportunity and sends a transaction to seize the prey. The commission offered to the miner is $ 10.

As Paradigm Research experts explained, in this case one of two options for the development of events may occur:

  • The miner copies and censors the arbitrator transaction in order to get prey himself;
  • Other bots notice this opportunity and offer a higher commission; For interception of arbitration, the “war of bets” (Priority Gas Actions, PGA, gas auction for priority) begins.

Potential profit of $ 10,000 – and there is Miner Extractable Value. If the miner does not intercept this possibility, PGA begins for the subsequent possibility of arbitration, and the difference between the cost of completing the auction and the amount of MEV is the profit of the victorious trader. For example, if the commission paid by the miner is $ 4000, then the remaining $ 6000 is the profit of the trader.

This is the most generalized example of MEV, the full picture is much more complicated. The Miner Extractable Value concept was proposed by Philip Diane in the article “Flash Boys 2.0: Frontranding, restriction of transactions and the instability of consensus on decentralized exchanges ”(2019) and popularized by Dan Robinson, Georgios Constantopulos and Samczsun in the articles“ Ethereum-Dark Forest ”and“ Escape from the Dark Forest ”.

There are many MEV strategies. All of them require a clear streamlining of transactions – for example, their placement before and/or immediately after large orders on decentralized exchanges.

Consider the main types of MEV strategies:

  1. Frontranding – the process of getting a new transaction in the execution queue immediately before the original transaction. For example, a trader conducts a major deal with ether on any dex. The operation is large, capable of push up the price of ETH. Having identified the appropriate incomplete transaction in the mempoule, the bot can make a profit: purchase Ethereum at a low price exactly before they buy a large amount of ETH in order to subsequently sell the asset at a higher price after its growth after its growth.
  2. Bacranning. The bot transfers transaction a to the network with a slightly lower gas price in comparison with the expected confirmation by transaction b. Thus, and ends immediately after B as part of the same block. For example, in liquidation strategies, bots place transactions immediately after updating the price oracle to get ahead of competitors. Or the warrant for the sale of the asset is performed immediately after a sharp increase in the price of a coin caused by a previous large purchase.
  3. “Sandwich” – combination from front -line and backraning. Suppose a large order for the purchase has been identified in the mempoule, and the bot puts up its front-line-order before it to purchase tokens at a lower price. A large order is triggered, moving the price up. Then, as a result of backing operation, the bot sells coins with a profit earlier than the rest of the market participants. . A relatively new type of attack: the bot implements a “sandwich operation” based on data found in the Uncle block . The latter, in fact, acts as a membrane.

The latter strategy is obvious to the significant advantage of miners over the rest of the market participants, since it is they who can detect UNCLE blocks in the first place.

The most common are operations using one or more decentralized exchanges. Arbitration opportunity appears when the course of the asset differs at various sites. The cause of such differences may be low liquidity of coins and large transactions that short -term affect their cost.

Arbitrators buy an asset on the site where it is cheaper and sell where it is more expensive. Such transactions contribute to the return of the price to the equilibrium value. Similar operations are also possible between DEX and centralized exchanges.

FORKLOG addressed the commentary to the expert of the MEV segment, who preferred to maintain anonymity (for convenience we will assign him the pseudonym Konstantin Nikiforov).

“There are several types of arbitration operations. The first technique, probably the most popular, is a “sandwich”. When one transaction is placed over, that is, before a large transaction. And the next transaction should lie down as close as possible to it, ”Nikiforov explained.

Drawing a parallel with the traditional market, it is worth noting that arbitration and frontraning are by no means new phenomena for it. The techniques and tricks used for decades, involving a high speed of operations performed by special programs, are described in Michael Lewis’s book “Flash Boys: High-frequency Revolution on Wall Street”, published in 2014.

Becranking in traditional markets is usually associated with mechanisms that allow trading firms to execute orders immediately after certain events.

Dark Pools also exist in traditional markets for not the first year. They are closed areas for trading assets that are inaccessible to ordinary investors. Buyers and sellers at such sites can set orders without disclosing information about them to the general public.

“MEV is a business one way or another. In some context, it can be compared with high -frequency trade. This is such a pseudo-hft. That is, when you have to do everything quickly, but not as fast as on classic centralized sites, where your task is to win nanoso, ”Nikiforov shared his opinion.

Since not only miners, but also other market players participate in such operations, MEV is increasingly deciphering as Maximum Extractable Value (“maximum extracted cost”).

The growth of the popularity of MEV

According to the MEV-Explore service, since the beginning of 2020, the market participants have extracted MEV in the amount of over $ 700 million.

A logical question arises: what is the size of potential profit from MEV operations? According to Nikiforov, profit from such operations can be calculated by millions of dollars.

“On the Flashbots service.NET is a section that indicates the amounts that are received by arbitrators beyond the scope of ordinary revenues. There were operations and a million dollars. My maximum transaction is about $ 50,000, ”Nikiforov noted.

The screenshot below presents a list of the largest MEV operations at various transaction commissions.

MEV boom, which is also called “invisible tax”, became the reason that miners began to launch their own bots.

In March 2021, the large Etherum Pouple Ethermine from https://gagarin.news/news/cryptocurrency-market-capitalization-what-should-an-investor-know/ the Austrian company Bitfly introduced the Meiner revenue arbitration strategy designed to compensate for the EIP-1559 activation under the London hardforte. 80% of the extracted profit is distributed among the participants in the pool.

Archarswap service from Archer Dao counteracts front-line and slippage, and also avoids loss of funds due to unfulfilled Ethereum transactions.

MEV bots and miners share profit from operations in the form of ARCH control tokens. Liquidity providers provide bots (Suppliers) with the means necessary for the implementation of strategies.

Archer SWAP makes it possible to switch between Uniswap and Sushiswap, providing users with a “familiar tokens exchange interface, but with additional options and excellent basement functionality”.

“This is not a new DEX, but an expansion on top of existing decentralized exchanges to offer improved user experience,” the project blog said.

Taichi Network is a private transaction service running the SPARKPOOL pool. Transactions are visible only of the pool and are not transmitted by other Ethereum Nodam, preventing the possibility of extracting MEV by third parties.

MistX.Io Alchemist is DEX working on the basis of Flashbots technology. User transactions do not enter the publicly available Ethereum pool to prevent front -line.

“Mistx does not provide for gas fees in its traditional sense. Instead of using ETH to pay for gas in Mistx transaction, tips are provided for miners. They are proportional to the traditional gas commissions, however, trading on MistX involves powerful protection and guarantees of transactions, ”the project said in the documentation.

Project Chainlink Developed Fair Sequencing Services-a MEV solution using a network of decentralized oracles for “fair streamlining of transactions sent by onchain to smart contract”.

“By separating the possibility of streamlining transactions from the possibility of blocking of blocks, you can prevent harmful extraction of cost like front -line,” the Chainlink blog says.

According to developers, FSS not only contributes to the “fair streamlining of transactions”, but also to reduce transaction commissions, preventing the emergence of “gas wars”.

At the end of April, the GNOSIS project presented a protocol for decentralized exchanges with protection against MEV and the co -installation mechanism of Coincidence of Wants (COES). Cowswap -Decentralized exchange with functions of the DEX aggregator based on GNOSIS PROTOCOL V2 (GPV2).

GNOSIS PROTOCOL V2 uses the following technologies:

  • Coings. When one trader wants to buy an asset, and the other to sell the same asset, the “coincidence of desires” occurs ”. The protocol performs such orders directly, without an external market maker or liquidity supplier.
  • Batch AUCTIONS. The protocol groups orders into packages, within which the prices of tokens are homogeneous and do not depend on the order of orders. This allows you to protect traders from MEV.
  • GAS FREE TRANSACTIONS (GFT). The user of the exchange confirms the warrant outside Ethereum without gas fee. At the same time, Cowswap optimizes the cost of execution of the transaction: applies COWS, monitors the prices of other DEX and takes into account the price of gas to include transaction in the block. Users pay a commission if the protocol performs a transaction on their conditions.

Cowswap sends users’ orders to GPV2. The protocol unites orders into packages (Batch Actions, BA) and transfers them to decisive users (Solvers). The latter are engaged in the search for the most profitable market price and receive awards for this in GNOSIS (GNO) tokens.

Any user can become decisive. For this you need:

  • block 100 GNO in gnosisdao;
  • receive the approval of participants in a decentralized autonomous organization;
  • Install the software for creating BA.

When the best prices are found, the protocol performs orders in the package. First, he is looking for Cows-dodes: when the desires coincide, a smaller order is performed for a larger application. Then GPV2 is looking for liquidity to other DEX to perform the remaining orders.

Researchers Paradigm Research are convinced that any application can be designed to minimize the potential MEV they generated by the potential MEV.

“This can be a competitive advantage, as it will reduce the costs of market participants and improve user experience,” experts said.

According to them, it is also important to update the EIP-1559, which provides for the burning of the basic commission. This approach is designed to stabilize the income of miners, supplementing the incentives for ensuring the safety of the protocol, which eventually helps to compensate for MEV.

Nikiforov is sure that simple opportunities to avoid MEV arbitration “were, are and will”. For example, when exchanging tokens, an ordinary user can change the Slippage Tolerance parameter aside reducing and use liquidity aggregators from decentralized exchanges like 1inch.

“The occurrence of profit from the“ victim ”transaction is due to the settings of these transactions. If you want no one to earn it, you can do it. For example, reducing the Slippage Tolerance parameter or scattering the route along the pools using 1inch. If you are too lazy to bother, pay a little, ”Nikiforov explained.


The growth of the Defi segment is associated not only with hacker attacks and fraudulent schemes. A relatively new risk for users of decentralized exchanges has become MEV.

A variety of opposition solutions to Miner Extractable Value are being developed. However, it is obvious that so far the risks associated with MEV for users of Defi applications can only be reduced, but not completely excluded.

The most effective solutions are presented to the privacy of the solution that prevent front-line and “sandwich”. Such tools distribute part of the profit among users and provide other benefits, including “bezed” transactions. However, MEV strategies are constantly developing and becoming more complicated, so current protection tools can soon become obsolete.

Another possible way to reduce the MEV problem is the development of second -level scaling solutions (L2). Vitalik Buterin is convinced that due to the development of Rollups, the vast majority of transactions can be carried out in L2, leaving Ethereum as a basic level of data and publishing only the minimum amount of information necessary to identify fraud (or its absence). As a result, the network participants receive high speed and throughput, not to the detriment of guarantees of the security of the base level network.

The Optimism team proposed its approach – MEV AUCTION (MEVA), which involves the separation of the distribution of transactions and their execution. The ARBITRUM project competing with Optimism is working on Fair Sequencing – an algorithm for “fair” streamlining transactions.

The mechanism of consensus Proof-OF-STAKE in theory can beat off the validators to carry out “Time-Bandit attacks” thanks to the Slashinka mechanism. However, for this, the size of the fine must exceed the potential benefits from MEV.

Not far off the transition to Ethereum 2.0 (ETH2), and, according to Vitalik Buterin, the reorganization of the blockchain for the advance of the profitable transactions of users in Defi protocols will be difficult.

For direct reorganization, it will be required that the attacker actually controls at least half of all validators. The implementation of the software for reorganization is useless, unless it is used by a very large number of other validators at the same time.

Buterin is convinced that the short reorganization that currents are not fatal. In his opinion, the most effective response of MEV will be to accelerate the transition to Ethereum 2.0.

As of 19.09.2021 at the deposit contract Ethereum 2.0 contains more than 7.72 million ETH worth $ 26.6 billion. This impressive amount indicates the confidence of users in the prospects of the new version of the ether, the launch of which will undoubtedly become the most important milestone in the development of Defi and the entire industry.

Subscribe to FORKLOG news in Telegram: Forklog Feed – the whole news feed, FORKLOG – the most important news, infographics and opinions.

Leave a Reply

Your email address will not be published. Required fields are marked *