Next month, years of research and development will culminate in the merger, when the Ethereum blockchain transitions to the proof-of-stake consensus mechanism. There are many reasons to be excited about the end of ether (ETH) mining, an energy-intensive process.
Perhaps most importantly, the merger may have effects on a perennial problem facing the Ethereum blockchain: maximum (formerly minor) extractable value. More commonly known as MEV, this process forms the basis of a secret industry based on extracting value from block production and has generated over half a billion dollars since 2020.
To begin, we must delve into the mysterious world of the memory pool, or “mempool” for short.
Nathan Thompson is Senior Technical Writer at Crypto Exchange Bybit.
When you make a transaction on the Ethereum blockchain, it will join all other transactions in the mempool, which is like a doctor’s waiting room. They stay there until a miner includes them in the next block. When a block is full, it is committed to the chain and you receive a message indicating that your transaction was successful.
So far, so good. Well, it turns out the mempool isn’t what you would call “a safe space”. Because hidden in there lurk sophisticated bots looking to take advantage of arbitrage opportunities and let you foot the bill.
Explain the MEV
One of the most diabolical tactics deployed by bots is called the “sandwich attack”. This is where a bot spots a large transaction, duplicates the transaction, and pays the miner a small tip to include their transaction ahead of the target.
Let’s take a hypothesis. You have 10 ETH and want to buy 2000 exampleCoin (EC) tokens. So you go to your favorite decentralized exchange (DEX) and trade.
See also: Ethereum Merger Will Increase Its Use Cases and Boost Its Investment Story
Your trade goes into the mempool and is spotted by a bot. It copies your transaction exactly and pays the miner a “priority fee” (read: bribe) to get their transaction processed first. Thus, the bot buys 2,000 EC for a price of 200 EC per ETH.
Now it’s your turn. You expected to get 200 EC per ETH, but the bot initiated the transaction causing the price to change, so you only get 199 EC per ETH. So you receive 1,990 EC for your 10 ETH.
After your transaction is completed, the price of exampleCoin will change again. This time, one ETH will buy you 198 EC. This means that the bot can sell its 2,000 EC for 10.1 ETH, making a profit of 0.1 ETH within minutes.
It may not seem like much, but these bots work constantly, and over time, upstream transactions can become very lucrative.
There are many other strategies used by mempool-roaming bots that are even more sophisticated. Collectively, these actions are referred to as maximum extractable value, many of which are as laborious as the leading example.
MEV has become a major problem for real Ethereum users with no obvious solutions. These algorithms are easy to code and very lucrative. Indeed, MEV-explore has a dashboard tracking this action, and it shows that these exploits have brought in nearly $700 million since records began on January 1, 2020.
It is very difficult to control this situation as it would require a centralized agency, which is against Ethereum’s decentralized ethos. However, third parties have found ways to protect users from these shenanigans.
Flashbots Protect, for example, offers something called a remote procedure call (RPC) that you can send transactions through a private server to avoid the public mempool. Similarly, The Eden Network allows stakers using their service to access a network where their transactions are handled privately.
Proof of Stake
Once the fusion is complete, the nature of the MEV will change. Ethereum’s upcoming proof-of-stake system introduces a new player into the mix: the block builder. They are the ones who order the transactions and send them to the block producer for final approval.
In the proof-of-work (PoW) system, miners decided how to order transactions coming out of the memepool.
Since each block is made up of transactions and each transaction will come with different fees and bribes, the value of each block will vary depending on the transactions included in it. Therefore, block builders have an incentive to build the most lucrative blocks as they will be prioritized by block producers and confirmed first.
See also: What is Ethereum Merge?
There are already several protocols looking to claim their share of the new block building market, and it could become a very lucrative industry. Then there’s MEV Boost, which aims to make MEV mining more accessible and fair.
Without going into granular detail, if a protocol can create the most lucrative blocks, block producers will finalize their blocks first. This could attract more users to their service, giving them a larger private pool of transactions to choose from and the ability to create even better blocks. A virtuous circle ensues.
It’s strange to think that the solution to bots exploiting Ethereum’s open, trustless system lies in professional teams exploiting the system better than anyone else and returning profits to users, Robin Hood style. It’s not Occam’s razor, but it might work.
The views and opinions expressed herein are the views and opinions of the author and do not necessarily reflect those of Nasdaq, Inc.