Cointime

Download App
iOS & Android

What is MEV in Ethereum?

Validated Venture

Maximal Extractable Value (MEV) is a method for miners or validators to increase their profits by changing the order of transactions before approving a new block on the network. Is it really profitable? How does it work? Let’s find out!

MEV is used to boost network commissions at the expense of increased user costs, which are commonly associated with transactions in decentralized applications. Miners or validators, in particular, try to gain an arbitrage position so that the user pays the extra commission that was not accounted for before the transaction is sent. MEV is regarded as an unethical practice.

MEV was first seen in Ethereum and EVM-compatible networks. Flash bots were one of the most effective solutions to this problem.

According to experts, the switch to Proof-of-Stake (PoS) will not eliminate MEVs from Ethereum, but it will result in the separation of validators into professional categories, the emergence of different types of blocks, and the creation of long-term strategies based on MEVs.

How does MEV work?

Blocks recorded in a blockchain, as we know, are immutable information that cannot be rewritten. However, before a transaction is validated, miners or validators can include, exclude, or reorder it in a future block at their discretion.

Each unconfirmed transaction is routed through the public mempool first. Following that, miners select which transactions from the mempool to include in the block. The miners form the most profitable combination of user transactions for themselves in this manner.

This results in abuse. Miners (and, since Ethereum’s transition to PoS, validators) prioritize the largest transactions, descending in size from largest to smallest, and add them to the next block to be written to the blockchain.

This feature led to the creation of a mechanism for extracting value by substituting transactions in the right order. This method is known as maximum extractable value, or MEV.

The MEV strategy entails validators searching for speculative transactions based on available unconfirmed transactions and increasing the actual fees for their execution.

Let’s look at an example where an Ethereum user decided to exchange 10,000 USDC for ETH at $2,000 per coin on DEX in the USDC/ETH liquidity pool. Here’s what happens after you submit an exchange request:

  1. The mempool runs special bots that monitor unconfirmed transactions and collect various data from DeFi-applications, including price and liquidity volumes.
  2. When the bots detect a user’s intent to buy ETH, they initiate a transaction that raises the price just before the user’s transaction is executed. A bot, for example, can add more USDC/ETH to the liquidity pool to raise the price of ETH.
  3. Thus, the user’s expected price of $2000 per ETH coin will change to a notional $2500 per ETH coin. The transaction will be executed, but the user will only receive 4 ETH instead of 5 ETH. The initiator of this MEV transaction will profit 1 ETH minus commission costs.

Because MEV results in higher commissions for the user, it is also called an “invisible tax,” which is not unique to Ethereum.

When did the “invisible tax” appear in MEV?

The problem of “spoofing” user transactions, now called MEV, was first raised on Reddit by algorithmic trader and analyst Pmcgoohan in 2014, , prior to the launch of Ethereum mainnet. He proposed that miners could manipulate user transactions for their own gain without violating any consensus rules.

The term MEV was not coined until 2019 in “Flash Boys 2.0” which was the first publicly available publication to explore the severity of the problem described by Pmcgoohan.

The scale and seriousness of the problem was only brought up in 2020 in articles such as “Ethereum is a dark forest” and “Escaping the Dark Forest” written by Dan Robinson, Georgios Konstantopoulos, and crypto investor Samczsun. These publications were intended to inform Ethereum users about the “invisible tax” levied on them.

Varieties of MEVs

The growth of the decentralized finance (DeFi) sector and specific elements of the Ethereum ecosystem, such as price oracles, liquid tokens, and cross-chain bridges, has resulted in the emergence of various MEV strategies.

Front-running

The most common strategy where an MEV transaction is attempted before the original transaction. Special bots can track potentially profitable transactions by simply copying users’ transactions, acting ahead of the curve.

Back-running

Issuing a transaction as a consequence of an event. For example, as soon as a new pool appears on Uniswap, the exploiter may buy back a significant portion of the tokens and take first place in the queue, effectively emptying the pool. He then lets the other participants sell before selling himself at a higher price.

Sandwich Attack

A combination of the previous two schemes. If the bot finds a large buy order in the mempool, it places its own order in front of it to buy tokens at a lower price using frontrunning. The large order is executed, causing the price to rise. The coins are then sold at a profit ahead of the other users using back-running.

Liquidation

A strategy used by the validator to make profit by redeeming the pledged position in the lending protocol immediately after it has been liquidated. The user notices that the position can be liquidated in the next block and sends a transaction to redeem the collateral.

Uncle bandit attack

A complex type of MEV strategy based on a speculative chain of transactions found in a competing block. There are times when miners find two blocks at the same time. At that point, miners can use the data from the “neighboring” block to their advantage.

Time bandit attack

Involves a process of reorganizing previous blocks in which miners specifically suggest competing blocks containing other transactions. This results in the disappearance of transactions and their inclusion in a completely different block.

How to self-protect from MEV?

MEV is not unique to Ethereum. Bots moved into EVM-enabled blockchains such as Polygon and BNB Chain as the DeFi-application sector evolved and competition became more intense. However, in terms of combating this problem, Ethereum has become the most advanced network.

According to 2021 data, Ethereum miners earned $730 million in MEV extraction rewards, accounting for 4.3% of total annual revenue. This indicates the growth of “dishonest markets,” which leads to a worsening user experience through higher fees and a lack of predictability in the transaction execution process.

As a solution, a centralized Flashbots system, funded by venture capital firm Paradigm, emerged in 2020. It does not seek to eliminate the problem, but rather to take control of it by creating an open market through the development of a public auction of ETH transactions.

The solution quickly gained popularity. According to BitMEX, the research arm of the cryptocurrency exchange, more than 90% of miners on the Ethereum network were connected to the Flashbots server in May 2022. According to the researchers, 63% of the rewards for MEV transactions went to operators, while the remaining 37% went to miners.

Was it interesting? Leave your feedback in comments.Study more with us and make a profit with our exchange!

Comments

All Comments

Recommended for you

  • Tevaera Closes $5 Million Funding Round to Create One-Stop Gaming Ecosystem Powered by zkSync's ZK Stack

    Tevaera, a gaming platform powered by zkSync's ZK Stack, has closed a $5 million funding round led by Laser Digital and Nomura Group. The funding will support Tevaera's mission to create a one-stop gaming ecosystem. The project has attracted prominent investors, including Hashkey Capital, Fenbushi Capital, and Crypto.com Capital. Tevaera has also launched a redesigned website and is preparing to introduce two new games and the first decentralized L3 gaming chain on zkSync.

  • The Hong Kong Securities Regulatory Commission’s official website has listed the Bitcoin and Ethereum spot ETFs and stock codes of China Asset Management, Bosera and Harvest.

    Hong Kong Securities and Futures Commission website has listed the Bitcoin and Ethereum spot ETFs of three fund companies, Huaxia, Boshi, and Jiashi, with approval dates all on April 23, 2024. The related funds are not derivative product funds, specifically including:1. Huaxia Bitcoin ETF (BUU163) with share codes of 03042, 09042, and 83042;2. Huaxia Ethereum ETF (BUU164) with share codes of 03046, 09046, and 83046;3. Boshi HashKey Bitcoin ETF (BUU104) with share codes of 03008 and 09008;4. Boshi HashKey Ethereum ETF (BUU105) with share codes of 03009 and 09009;5. Jiashi Bitcoin Spot ETF (BUT244) with share codes of 03439 and 09439;6. Jiashi Ethereum Spot ETF (BUU885) with share codes of 03179 and 09179.

  • Correction: Nigeria’s central bank says “freezing Bybit, KuCoin, OKX, Binance user accounts” is unofficial

    The official X account of the Central Bank of Nigeria (CBN) stated that the announcement "the Central Bank of Nigeria will freeze Bybit, KuCoin, OKX, and Binance user accounts" is not an official release. Previously, according to Cointelegraph, the Central Bank of Nigeria (CBN) issued an instruction requiring all banks and financial institutions to identify individuals or entities trading with cryptocurrency exchanges and ensure that such accounts receive no debit (PND) instructions within six months.

  • Alliance of 314: The X314 contract is suspected to have a hidden additional issuance switch, developers should pay attention to verification

    Alliance of 314 issued a statement claiming that the contract of a certain 314 project has not been open-sourced on the blockchain. As for whether other platforms have open-sourced their contracts, there is a misconception that open-sourcing on other platforms is self-submitted and does not necessarily mean that the contract is deployed on the chain, so there may be unknown hidden issuance. Additionally, the said 314 project announced that it will soon launch a trading platform, and the first requirement for logging into a centralized exchange is to open-source the contract. Open-sourcing is the first thing that any project should do to ensure investor confidence. Referring to the open-sourcing of the 0.1, 0.5, and 0.9 versions before, it can be concluded that there is hidden code in the X314 contract, and therefore it cannot be open-sourced out of fear. The biggest risk warning: after decompiling and querying ethervm, it is highly suspected that a certain 314 has a hidden issuance switch to increase mining pool output and arbitrage. The field is as follows: 0x40c10f19mint(address,uint256). The risk alert level for this switch is the highest level, and generally, ordinary developers do not set this switch.

  • Binance Founder Faces Potential Three-Year Prison Sentence and $50 Million Fine for Money Laundering and Sanctions Violations

    Binance founder Changpeng Zhao has been recommended a three-year prison sentence by federal prosecutors for violating federal money laundering laws and sanctions. The Department of Justice argued that this sentence would hold him accountable for his intentional criminal conduct and send a message to the world. Zhao made a "business decision" to break the law to attract users, build his company, and line his pockets, according to prosecutors. Along with the prison sentence, DOJ lawyers also requested that Zhao pay the $50 million fine he agreed to as part of a plea deal. Zhao, who is a citizen of the UAE and Canada, has been released on a $175 million bond but must remain in the U.S. until his sentencing on April 30.

  • Market News: South Africa authorizes 75 companies as cryptocurrency service providers

    According to Jinshi news, South Africa has authorized 75 companies as cryptocurrency service providers.

  • Indonesian President: $8.6 billion laundered through cryptocurrency in 2021

    According to Golden Finance News, Indonesian President Joko Widodo stated that he has noticed signs of money laundering through cryptocurrency in 2021, amounting to $8.6 billion (IDR 139 trillion). In addition to cryptocurrencies and NFTs, the president emphasized the need to monitor other potential money laundering tools, including virtual assets, market activities, e-currencies, and AI-driven transactions. Mahendra Siregar, Chairman of the Financial Services Authority (OJK) Committee, responded to the President's directive, stating that when cryptocurrency regulation is transferred to the OJK next year, his agency will supervise these issues.

  • BTC breaks through $67,000

    Tthe market shows that BTC has broken through $67,000 and is now trading at $67,025.99, with a daily increase of 1.12%. The market is volatile, please be prepared for risk control.

  • Bitcoin spot ETF had a total net inflow of $31.6354 million yesterday, and the ETF net asset ratio reached 4.27%

    According to SoSoValue data, the total net inflow of Bitcoin spot ETF was $31.6354 million on April 23 (US Eastern Time).Grayscale ETF GBTC had a net outflow of $66.8838 million on April 23, and the historical net outflow of GBTC is $16.833 billion.The Bitcoin spot ETF with the highest net inflow on April 23 was BlackRock ETF IBIT, with a net inflow of $37.9233 million in a single day, and the historical total net inflow of IBIT has reached $15.479 billion.The second highest was the ARKB ETF from Ark Invest and 21Shares, with a net inflow of $33.282 million in a single day, and the historical total net inflow of ARKB has reached $2.267 billion.As of now, the total net asset value of Bitcoin spot ETF is $55.82 billion, and the ETF net asset ratio (the proportion of market value to the total market value of Bitcoin) is 4.27%, with a historical cumulative net inflow of $12.416 billion.

  • CZ announces Giggle Academy logo and design ideas

    CZ has released the Giggle Academy Logo and its design concept. He hopes that the logo can showcase youthfulness, fun, positive energy, and growth while continuing the "Binance tradition":