January 25, 2022 - 6 min read
Miner Extractable Value, or MEV, is defined as a cryptocurrency miner’s ability to structure and position block transactions in order to gain additional revenue. Miner extractable value allows miners to choose trades with higher fees, and negate trades with lower fees.
While blockchains may be immutable, there is no guarantee that transactions will be validated in the order they were submitted to the blockchain, allowing miners (to a certain extent) to reorder transactions as they wish.
Since the only motivation for miners to include block transactions are the gas fees they will obtain, it’s natural that miners would attempt to take any and all measures to increase their profits.
However, MEV manipulation generally comes at the expense of other market participants, who must wait longer and pay more for trades. These extended waiting times can lead to slippage, a difference in price between what a trader intended to purchase an asset for and the actual price they pay.
For example, a trader may place a trade that is then copied by another trader offering a higher gas fee, so miners will choose that trade above others. Sometimes this is done manually, while at other times it’s done by bots. This information is accessible to miners in the mempool, the place which keeps the data on all unconfirmed crypto transactions in a blockchain.
Utilizing MEV is considered a form of “front running” in which market participants, in this case, miners, use non-public information in order to increase their profit during a transaction.
Front running is a common practice among stock and bond traders and is considered illegal when the front running is done based on insider information. Front running is becoming increasingly common for crypto miners and traders, and, while not illegal, may be considered unethical by some.
However, front running is just one way that miners can extract additional value from a transaction. They can also do something referred to as “back running” which allows them to profit by using their information about a certain trade that will change market conditions and placing their trade directly after in order to gain a profit.
Miners sometimes combine front running and back running in what’s called a “sandwich attack” in order to gain profit both before and after a trader’s transaction.
Front running to increase MEV is particularly easy for miners running full nodes, as they monitor upcoming transactions and can easily quote higher gas fees.
In some situations, groups of miners and traders will form private relay networks in order to set gas fees at a certain amount. These networks operate somewhat like a private syndicate, creating an artificial oligarchy that can increase gas prices in order to increase profits for all participants in the private relay network.
Today, MEV activities are most commonly caused by bots that attempt to perform arbitrage by taking advantage of slippage (temporary price differences) on multiple DEXs (decentralized exchanges). Slippage, and the arbitrage opportunities that come along with it, usually result when a very large trade occurs on an exchange.
Sometimes this occurs naturally, but in other cases, it may occur when a trader or trading bot takes out a flash loan, a temporary loan that must be repaid in the same transaction it is taken out.
Slippage, and the arbitrage opportunities that come along with it, usually result when a very large trade occurs on an exchange.
However the slippage is caused, profits can be gained by purchasing the asset at the lower price on one exchange and selling it on the exchange offering the higher price. These opportunities keep increasing due to the increasing popularity of DEXs, and this often leads to bidding wars between bots. Therefore, bots are always on the lookout for abnormally large trades.
Since arbitrage trading bots want to execute their trades as quickly as possible, miners are happy to accept higher gas prices to push the arbitrage bot’s transaction to the front of the line. These higher transaction fees can also influence the value of the asset on the DEX itself, leading to further slippage and even more arbitrage opportunities.
This increases gas prices for miners, leading to more miner profit, but increased gas prices and network congestion for everyone else.
In addition to both arbitrage and front running, miners themselves have the ability to reorder transactions and insert their own purchase transactions into a block for no cost. This ability allows further MEV opportunities but can have even more detrimental impacts on the blockchain itself, including full block reorganizations and even consensus issues.
Some blockchains, like Telos, are attempting to prevent front running by utilizing a hierarchy that gives orders priority via the order in which they arrive, instead of allowing miners to choose which transactions to approve via judging which will provide them the highest gas fee.
Gas fee limiting is another way in which some blockchains have attempted to reduce front running. Gas fee limiting restricts the gas fee to equal to or less than the maximum fee defined by the smart contract owner. Off-chain ordering can also be used to prevent front running. In off-chain ordering scenarios, ordering is done on an outside system, while transactions are settled on the blockchain.
Decentralized oracles can be used to more judiciously order transactions via smart contracts. This can prevent front running by separating the ability to order transactions from the ability to produce blocks.
Decentralized oracles can also be utilized to encrypt transactions, limiting the amount of information miners receive. These transactions are only decrypted after a specific order has been committed to, which also prevents front running and other types of manipulation.
By preventing front running, hierarchical ordering, specialized smart contracts, and transaction encryption can reduce gas prices and congestion, making blockchain transactions faster and less expensive, while reducing slippage and other types of malign market manipulation.
Sign up for the Supra newsletter for company news, industry insights, and more. You’ll also be the first to know when we come out of stealth mode.