Topics In Demand
Notification
New

No notification found.

The Dark Side of MEV Extraction & Exploitation: Is Your Blockchain at Risk?
The Dark Side of MEV Extraction & Exploitation: Is Your Blockchain at Risk?

January 31, 2025

8

0

In the year 2014, when Micheal Lewis released the book “Flash Boys”, who would have thought that the concept of latency arbitrage, prevalent in traditional finance, would find its roots deeply ingrained in an emerging technology called blockchains, allowing network participants to capitalize on super normal profits? Due to this latency arbitrage, who would have thought that a blockchain as grand as Ethereum would lose $1.3 B?

Moreover, down the line, the latency arbitrage getting rebranded as MEV would turn into a headache for blockchain networks. But here we are in the present, where MEV is ending up as a complex, systemic problem for blockchains. How can we get past it? Only when we know what it is and the ways we can adopt to overcome this problem.

What is MEV Extraction And How It Turns Malignant?

MEV extraction is the process where the block producers extract some value at the time of aggregating/including/executing/broadcasting transactions on blockchains. This process is necessary for the smooth running of the blockchain. But turns evil nonetheless the moment the MEV extractor, instead of simply relying on auctioning for the block space in exchange for higher fees, starts to exploit other means to profit from the users. Thereby compromising the blockchain network and putting the users’ interests in jeopardy.

What MEV Extractors Do To Jeopardize User’s Interest?

In the blockchain design, the veracity of the blockchain depends on how every participating entity, like the block producers, sequencers, proposers, builders, and others, is rightfully doing their task to safeguard users’ interest and ensure smooth running of the blockchain. In lieu of these services, these participating entities/ aka extractors, are extracting value in the form of fees for auctioning the block space, but they turn parasitic upon doing the following activities;

  1. Front Running & Back Running

Front running is the process where the miners/validators insert their own transactions. This generally happens because the miners/validators are aware of the type of transaction in the mempool. So, they try to manipulate that by placing their transaction before based on the favorable situation.

For example, if the miner/validator is seeing a volume of an asset purchase, for example, Ethereum in T4. To exploit the favorable scenario, the miner validator can place an order for the purchase of an equivalent or lesser amount prior to that transaction. It will be followed by the MEVTarget Transaction( T4), and in this way, later on, the miner/validator will place a reverse nature transaction with high gas fees to benefit from the same as shown in the image;

 

 

But one may question that it would amount to reputational damage done to the validator. It is a reality as long as the validator is old enough in the network, but what if there’s a new validator. For instance, if it is a new node undertaking the front-running, they can withhold the transaction for a fraction of a second/millisecond. Now, this rogue validator can scan through multiple transactions to assemble them all at once and since it only consumes a millionth or lesser, even for all the honest nodes validating the transaction, it becomes very hard to trace the misbehaviour.

Validators on the Bancor protocol abused users in the worst ways using this technique. The perpetrator used flash bots to identify transactions in the mempool by a millionth of a second delay. What they did was place a higher fee to get their transaction executed first after analyzing all the transactions and keeping them in a specific order. Due to this practice, the daily profit of the front-runner bot hit $2500. Moreover, they were able to generate more than $6 million in total revenues, which would have otherwise accrued to other users on the platform.

At the same time, due to this practice, the UX had also gone for a toss because validators/ sequencers sequencing the transaction in their own ways amounted to compromising the throughput and finality of the protocol. So, instead of transactions happening in seconds, it took more than 1 minute to even 30 minutes to execute a transaction. These events severely dented the adoption of blockchain in specific regions where laws are passed against such practices.

 

 

  1. Back Running

Back running is the process where the MEV extractor of the blockchains can identify a high-value transaction and accordingly take action based on that transaction to profit from it. As you can see in the image below, how the back running is in progress where the MEV extractor is placing a transaction immediately after an executed transaction to extract benefit.

 

 

This could be catastrophic if the MEV bot can identify all the transcations as a buy/sell and arrange the same in the manner that it can benefit them.

The Balancer exploit is a prime example to put here. In that event, the MEV extractors saw a technical glitch where in the Balancer pool, some specific tokens like STONK(STA) required a small transfer fee while initiating the swaps. The attacker exploited this design flaw by swapping tokens in and out of the protocol countless times to reduce the STA Token balance. Due to repeated exploitation of the transfer fee mechanism that validators could see on the Balancer protocol, they were able to drain $500,000 of WETH, LINK, and other tokens from various Balancer Pools because STA token value depreciated to such a level that they could literally take $10,000 in loans and were required to pay only $500, as an example and they remaining amount swapped was kept as their profits.

  1. Sandwich Attack

Sandwich is the combination of the two attacks explained above, where the MEV extractor will backrun and front-run a transaction all at once to inflict damage on the user. As a result of that, the user will be executing the trade at the worst price possible as shown by the image below.

 

 

Due to this practice, DeFi, which is driving crypto adoption has been hit the most. Why? For example, the BNB Chain almost lost $1.5 billion in trading volume in a single day, affecting more than 43,400 transactions. Due to this, it can severely impact all the DeFi applications hosted on top of a blockchain like BNB. The users can feel that their trust has been breached and it could even trigger mass exodus, thereby completely destroying the liquidity of the DEX.

  1. Time Bandit Attacks

This is considered the second worst type of MEV attack because it completely dilutes the ethos of blockchains. For example, we all know that blockchains are immutable, secure, and irreversible. But the time bandit attack completely flips this concept.

 

MEV Extraction & Exploitation

 

In a time bandit attack, the attacker can completely rewrite a blockchain transaction that has already been mined to profit from the same. It might sound like a double-spending attack, but instead of the validator using the same cryptos for making more than a single payment, in a time bandit attack, an attacker will see a transaction, bribe the validator to re-do the transaction by auctioning the consensus of the block by controlling the hash/network power.

Which means, if you made a profitable trade of say $1 M, the attacker will replace that transaction by putting the consensus of that block on auction. The highest auction will win the way to validate the block and it will include a new transaction and replace the inflicted transaction with that of the time bandit attacker.

The Ethereum Classic incident that happened in August is a prime example to put here. On the Ethereum Classic chain, the MEV attacker organized more than 7,000 blocks or two days’ worth of mining.

 

Due to this event, the hashrate of the Ethereum Classic blockchains nosedived to new lows and even questioned the authenticity of launching an application on top of blockchains.

How Do We Get Past Such Attacks As The Next Victimized Blockchain?

From Intent Based Trading to auctioning to more, a lot of progress has been going on to counter-balance MEV attacks. For example, Paraswap has introduced Intent Based Trading in August, 2024. In the Intent based Trading, the validators will only see the Intent in the mempool instead of the whole transaction to exploit opportunities. Likewise, decentralized sequencers for roll ups is another major sprint in nipping the bad MEV problem in the bud. In order to understand how decentralizing sequencers for rollups could help solve the bad MEV problem, you will have to look at Cero’s initiative to fight the bad MEV wars. We shall cover that in our next installment where we will explain how CERO is solving the innate roll ups MEV problem.


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


© Copyright nasscom. All Rights Reserved.