Understanding MEV in Blockchain Networks: A Beginner's Guide

Understanding MEV in Blockchain Networks: A Beginner's Guide

Introduction

MEV or Maximum Extractable Value has gained a lot of traction in recent years in the world of blockchain. It presents an opportunity for entities involved in the network security ecosystem such as miners and validators to get extra value from the network beyond the standard transaction and block fees while impacting the fairness, transparency, and security of blockchain networks. In this article, you will understand what MEV is, scenarios where it can be used, and its pros and cons.

What is MEV?

It's the short form for Maximum Extractable Value, initially called Miner Extractable Value. In the blockchain network, miners have the power to choose which transactions to include in a block depending on some factors, as well as arrange transactions according to the time they arrive in the mempool. With all this power, the miners can use it to try and earn an extra income beyond the standard ways of:

  • Transaction fees. When you create a transaction and want it to be quickly settled, you include a transaction fee. if the fee is high, the miners will consider your transaction first so as to redeem the fees, and vice versa. This explains the logic of why on days when the network is busy, users have to pay lots of fees for their transactions to be processed fast. A miner collecting transactions to include in the block will likely choose those will high fees so as to get a lot of profit. Read about how network fees skyrocketed during the BAYC NFT minting.

  • Block rewards. the miner earns this reward if their block is voted to be valid and is added to the chain on the network. On the bitcoin network, every miner includes a special transaction called the coinbase transaction in the block they are trying to create. The coinbase transaction creates and transfers a specific amount of new bitcoin to the miner in case their block is voted to be added to the blockchain. This incentive enables the miners to keep the network secure while also earning some rewards in terms of network coins.

The MEV strategy is common on networks that facilitate complex transactions such as the Ethereum network that involve lending, borrowing, and staking among other tasks. This has led to more opportunities for miners as they try to create MEVs to exploit the inefficiencies brought about by these transactions.

However, this is not the case for the Bitcoin network since transactions just reflect the transfer of bitcoin from one user to another. With the recent introduction of the lightning network, a layer 2 network on bitcoin, more opportunities may arise as transactions become more and more complex.

What moves prices?

Now that we know that the role of miners is to collect transactions, arrange them in a block, and get rewards, let's also see what moves prices and how that can lead to some attractive MEV opportunities.

Crypto tokens and coins among other factors rely on supply and demand as a fundamental principle for their price movements. Simply put, higher demand and lower supply will drive their prices higher, and lower demand and higher supply will drive their prices down. This is evident as prices rise when many users buy a token and prices fall when many tokens are sold.

Another factor that affects the price movement is the number of tokens involved in a single transaction versus the total number of tokens in supply. Let's take an example of two tokens A and B, with a total supply of 1000 and 10000 respectively. We also assume that the price increases by 1% for every 1% of the token bought.

If a user buys 100 of the two tokens A and B respectively, he will have purchased 10% of token A and 1% of token B. The price for token A will move up 10% and only 1% for token B from our assumption. This brings up some scenarios where Maximum Extractable Value(MEV) can be utilized.

The working of MEV

From the above example, the user will create two transactions; one for buying 100 tokens of A and the other transaction for buying 100 tokens of B. Remember, it's the role of the miners to handle transactions and include them in the block. if the miner is looking for MEV opportunities and receives these two transactions, they will know that transaction A will move the price 10% and thus there is an arbitrage opportunity to profit from.

Since the miner has the power and can re-arrange transactions, what they can do when they receive transaction A is to immediately perform a strategy called sandwiching. In this case, the miner creates a new transaction to buy some amount of token A and places it before the user's transaction. So the miner's transaction will be confirmed first.

When the user's transaction of buying token A is confirmed, the price will move 10% from the user's buy price. The miner now creates a second transaction to sell the tokens of A he bought. After this whole scenario, the miner has a profit of 10% on top of the block rewards and transaction fees, because they bought before the price moved up and then sold.

Pros and Cons of MEV

Though MEV can be profitable on the side of the miner who performs it, it comes at the expense of some users who have to overpay for their trades. This also puts the overall security of the network at risk because the miners override the criteria for handling transactions.

On the good side, it can help stabilize the prices of tokens on different platforms through arbitrage.

Conclusion

As the blockchain ecosystem continues to evolve and more networks are born that support complex transactions, effective strategies have to be developed to mitigate the negative effects of MEV. This can be done by promoting education and awareness of the effects of MEV and creating transparent and equitable transaction ordering systems among other things.