MEV is the invisible tax every crypto investor pays—except for those collecting it. Here's what investors must know about maximum extractable value.
Updated Apr 20, 2023
Many companies on MoneyMade advertise with us. Opinions are our own, but compensation and in-depth research determine where and how companies may appear.
Crypto
NFTs
Technology
Blockchain promises a decentralized, transparent, and permissionless system that provides equal opportunity and value to all in the network. However, giving control to the miners hinders this promise because they can effectively charge an invisible tax to every crypto user that doesn't use their own node.
Miners who use MEV effectively can make money simply by prioritizing certain transactions over others. But what is MEV? How does it work? While this is a basic explanation, gaining a fundamental understanding is a little more complex, so buckle up.
Maximal extractable value (also called "miner extractable value" or MEV) is a term coined in Flashbots 2.0 that refers to the opportunity blockchain miners and validators have to make extra money beyond just collecting block rewards and transaction fees.
MEV opportunities are generated when miners and validators are able to take advantage of the information they have access to, such as the order of transactions in the blockchain and the fees associated with them. This process is essentially the value that a miner can extract by moving user transactions around in a block.
In 2014, Reddit user pmcgoohan predicted the use cases of MEVs when he noticed that Ethereum had an inherent flaw that allowed miners to rearrange transactions to make a profit. This was back when crypto users were unaware of miner extractable value. The Redditor explained the essence of MEV through an example:
To understand maximal extractable value (MEV) better, you must know how transactions are added to a blockchain. Whenever a transaction is signed, it moves to an unconfirmed state in a pool where miners can access them and add them to a block. Since blockchains are decentralized, the network itself (a collective of nodes) is responsible for validating transactions and adding them to the blockchain, and the balances on the ledger update accordingly.
MEV stands for maximum extractable value, and it's a way for miners to make money by processing people's crypto transactions. Crypto traders make money using things like arbitrage bots, staking rewards, yield aggregators, lending, and HODLing. But there are also bad strategies that can cause many problems for users, like front-running and draining your wallet. Be careful when investing in MEV bots because they can be scams.
This can be understood by a simple example. If Alice wants to send 2 ETH to Bob, this transaction is added to a pool of unverified transactions that are subsequently verified by miners or validators. Once the transaction is validated, the record of this transaction is added to the blockchain, and the balances are updated to reflect -2 ETH for Alice and +2 ETH for Bob.
Different blockchains have different implementations for this model. Bitcoin uses proof of work as the algorithm to validate transactions, while Ethereum recently made the shift to proof of stake.
As discussed above, each blockchain uses an algorithm to validate transactions. This algorithm secures the network from unauthorized users adding transactions. A consensus algorithm is an agreement within a network that makes it decentralized. This model not only eliminates the need for a central party to control and authorize the circulation of value, but also removes the potential of single points of failure in the network.
These algorithms reward nodes that help secure a version of the ledger that's unanimously agreed upon by the entire network. Proof of work and proof of stake are the most commonly used frameworks for blockchain consensus, and these are where most MEV opportunities take place.
All transactions are held in a mempool, which is a public waiting area for unconfirmed transactions. The mempool is where miners select the transactions, order them, and add them to a block. It's also where miners found a loophole to profit from the algorithm in a way that wasn't intended. Essentially, MEV is economic value that the algorithm doesn't account for and can be captured by opportunistic miners.
Although miner extractable value opportunities seem exclusive to validators, independent network participants can also search for these opportunities using bots. Once these “searchers” have found the value extraction opportunity, they submit a transaction to the network with high gas fees to offer to the miners. This high gas fee is offered to put their transaction on priority so to capitalize on the profit-making opportunity that presents itself in the market. So, given the right resources, MEV can be utilized by any validator to order transactions as well.
MEV offers a few opportunities for validators and other network participants to make profits. Some of the opportunities are:
Miner extractable value opportunities can’t be generalized as all bad. There are good and bad consequences of these activities on a network.
MEV front running and sandwich attacks artificially inflate the value of assets and increase network congestion. This increases the gas required for the transaction and slows down the network by prioritizing trades over other transactions. Sandwich attacks also have a negative impact on the network because they can increase slippage and cause transaction execution issues. This results in a bad experience for traders on decentralized exchanges (DEX).
On the other hand, arbitrage helps regulate different bid-ask spreads of a currency across all exchanges. MEV arbitrage bots search for opportunities where the gap in prices of two exchanges is large enough to make a profit. You can capitalize on arbitrage by looking at the difference in exchange rates on popular platforms like Kraken or Public and collecting the difference.
DeFi lending protocols also rely on searchers to swiftly process liquidations so that lenders get paid back. This makes the lending process fast and efficient. Additionally, MEV brings in new revenue streams for miners, which can stabalize the network by sustaining miners in the event that mining rewards fall below breakeven. In other words, it creates an incentive for miners to secure the network that's uncorrelated with its built-in reward mechanisms.
Flashloans are uncollateralized loans that can be used to borrow huge amounts. The user is supposed to borrow and return the funds in the same transaction. If the user fails to return the amount before the transaction is fully executed, the smart contract cancels the whole transaction and returns the amount to the lender. Flashloans are instantaneous, so users need to find opportunities where they can take out the loan, make a profit, and pay the loan back all in the same transaction.
The Flash loan-MEV combo has helped create wealth out of thin air. The arbitrage bots find maximal extractable value opportunities and trigger the flash loan. Here’s how the process works:
Flashloans are low-risk opportunities where users don't have to pay interest or fees. Aave and Dy/Dx have DeFi flash loan opportunities where users can borrow hundreds of thousands of dollars worth of crypto in a transaction without spending a penny. However, if the trade is successful, the lender gets a small share of the profit.
The crypto space has cultivated a new era of financial liberty and get-rich-quick schemes while also increasing the level of FOMO and greed among investors. This dynamic creates opportunities for scammers, especially since it's largely unregulated. No one shares the key to their passive income-generating treasure. If something sounds too good to be true, it probably is.
This is something all crypto investors should learn as soon as they get into the space. Crypto has a lot of opportunities to make decent profits, but it also has a dark side. Scammers have found creative ways to drain user wallets, and we’ve seen lots of losses in the name of bots that detect profitable MEV opportunities.
You might come across tweets and Reddit threads by social media influencers trying to clickbait you into buying their MEV front-running flash boats. More often than not, they have smart contracts that drain your wallet and send your funds to an unknown address.
Twitter user and Metamask engineer Harry.eth recently analyzed a case where a youtube scammer tried to steal the funds from users. Upon reverse engineering the bot, he found that the code triggered the transfer of funds from the user’s wallet to an unknown address, presumably the scammer's wallet.
It's highly recommended that anyone hoping to spot MEV opportunities codes the bot themselves or makes it with the help of a trusted developer. This would usually be someone who is familiar with the Solidity coding language and has experience working with Ethereum clients and validator nodes. Additionally, crypto fundamentals and the factors that affect crypto prices also are prerequisites to understanding the market.
Some MEV opportunities hurt the crypto ecosystem, while others help make the processes more efficient. Currently, MEVs contribute to front running, sandwich attacks, network congestion, and transaction failures. This creates a lot of uncertainty and FUD (Fear, Uncertainty, and Doubt) in the market. Projects like Flashbots are working on mitigating the negative uses of MEVs. Other solutions include burning MEVs:
DeFi has brought lots of profitable opportunities for crypto traders. A good strategy that incorporates MEV arbitrage bots, staking rewards, yield aggregators, lending, and HODLing can definitely bear fruit in the long run.
MEV is an important concept for crypto investors as it can help them make more money through mining and validating transactions. While MEV can be beneficial to miners and validators, it can also be detrimental to regular users by increasing transaction costs and causing delays. Solutions such as Flashbots and proposer-builder separation are being developed to address these issues and make the blockchain more secure and efficient for all users.