May 29, 2022

MEV

What is MEV?

MEV, or maximal extractable value, is a practice by miners to include, exclude, or change the order of transactions in a block for financial gain. This direct or indirect added value is separate from regular rewards and gas fees distributed to miners for supporting the network and producing blocks. MEV is also known as miner extractable value. We're mainly focusing on MEV executed by miners, not bots scanning DEX's and lending platforms.

Basics

When a block is produced by miners, pending transactions sit in a memory pool. Typically, miners will select transactions to include in a block based off which have the highest gas fees, to increase the value they gain for their service of producing blocks for the network; this method of choosing transactions is unbiased, in theory, considering the accepted system of paying higher gas fees for your transaction to be confirmed faster. When a group of transactions is selected form the mem pool, all of the transactions included have not happened yet, and they will technically occur at the same time from the perspective of: they are all confirmed at the same time and also all share the same status.

Block producers can affect that order, and the knowledge of what transactions are about to be confirmed creates an arbitrage opportunity. Depending on the transactions in the mem pool, it could be more valuable to include a transaction with lower fees and rearrange or front run it. This isn't against any set of rules or anything, but it does defy the expectations of networks users.

In addition to direct effects on users of the network, miners' transactions to attempt to gain more value congest the network by allowing less 'organic' transactions in each block. More congestion equals higher gas prices, which is again more money lost by an average user.

Types of MEV

Front Running: Placing a transaction before a pending one in the queue. This doesn't have to be executed by a miner; anyone can see the transactions in the mempool and bid a higher gas fee to probably get theirs ahead in the queue.

Back Running: Placing a transaction directly after a pending one.

Sandwich: Placing transactions before and after a pending transaction. Likely a buy before and a sell after, or vice versa.

Bug or Feature?

Many see this practice as unethical, as it is essentially front-running, and it will almost always cause actors to pay more than they otherwise would have. You could argue that it's a bug instead of a feature, but so many protocols rely on the fact that arbitrage opportunities will be acted upon; this ensures prices remain somewhat constant across different platforms. If it's so terrible then why hasn't the community brought forward an EIP to 'fix' it? Unfortunately a solution to prevent less favorable types of MEV isn't so simple; this is a topic that a lot of big names in the space have explored, and thus far there's no solution. In the meantime, anyone that wants to exploit the system in this way can do so, just become a validator. MEV in general (including exchange arbitrage) is necessary to a degree, but there is push back on MEV executed by block producers.

Leave a Reply

Related Posts