Author: Paul Veradittakit, Partner, Pantera Capital
Original compilation: Leah, Foresight News
Introduction to MEVs
MEV (Maximum Extractable Value) is a concept that has recently received a lot of attention in the cryptocurrency space. With the development of blockchain technology, the importance of transaction ordering has become increasingly prominent, but ordering can be manipulated, and people with a heart can extract value from the transaction system.
MEV is the value that miners or validators extract from the blockchain beyond normal transaction fees. When miners package transactions, they can sort certain transactions and intervene. Through these operations, miners may obtain additional profits in addition to transaction fees and block rewards. These extra values are called MEV. To mitigate the negative impact of MEV, companies like Flashbots, a Pantera portfolio company, have emerged.
example
Let us analyze the application of MEV in the field of cryptocurrencies through a hypothetical scenario.
Suppose you are a trader on a decentralized exchange and want to buy a certain token at a specific price point. After you place an order, you wait for the blockchain network to execute it. But what you may not realize is that the trade you want to execute has been incorporated into a more complex web of trades at the same time.
At the same time, a miner in the transaction network can access all pending transactions and potentially manipulate them for his own benefit. For example, miners may choose to prioritize certain transactions, including their own, in order to gain profit. This is the so-called MEV.
When executing your transaction, if your order is queued after another transaction with a higher handling fee, the miner may choose to execute the transaction with a higher handling fee first, resulting in your order not being accepted by you. Expected price deal. The result is that you, the trader, suffer losses, and the miners make more profits.
In general, while MEV is a problem in the crypto space, all parties are working together to find solutions in the hope of mitigating the negative impact of MEV and providing a fairer and safer environment for traders and users.
Most Common MEV Attacks
Below I will introduce some of the most common MEV attacks and their attack principles.
Front-Running
In simple terms, front-running is when a malicious actor places his own transaction ahead of known pending transactions in the execution queue. Malicious actors usually use front-running trading robots to complete the order grabbing behavior. These robots will scan large orders on decentralized exchanges. After discovering large orders, the robots will preemptively complete the attack transaction with a higher gas fee, so as to seize Benefit.
Sandwich Attacks
A sandwich attack is a type of front-running where the attacker places a transaction before and after the victim's pending transaction. On decentralized exchanges, sandwich attacks are commonly used to extract MEV from unsuspecting traders. Attackers manipulate asset prices by identifying tokens that victims are about to buy, running front-running transactions to drive up prices, and then selling previously purchased tokens when the victim's buy order price has increased significantly.
Back-Running
A post-transaction is when a malicious actor places their transaction immediately after the target transaction is known to be processed. Seekers use post-trading bots to monitor new token pairing lists in mempools or liquidity pools created on decentralized exchanges. When new token pairs are discovered, the bot submits trades immediately after the initial liquidity, buying as many tokens as possible so that other traders subsequently buy fewer tokens. The bot then waits for the price to rise, and other traders buy the tokens and sell them at a higher price for a profit.
Liquidations
Liquidation is a type of attack that extracts MEV by liquidating overcollateralized loans of a decentralized on-chain protocol. Liquidators use specialized robots to monitor the network for liquidation opportunities and choose pre-execution or post-execution in transactions to liquidate loans. They extract MEV from unwitting borrowers by liquidating their loans before the borrowers repay, and selling their collateral.
Time-Bandit Attacks
A time bandit attack is an attack that only miners can perform. These attacks extract MEV opportunities from previously mined blocks by reorganizing blocks. When MEV is high enough compared to block rewards, miners may break consensus to extract MEV from old blocks. A miner with sufficient capacity may decide to regenerate an old block to capture arbitrage opportunities, thereby having a longer chain than the miner who originally generated the block.
Solution: Flashbots
Flashbots is a company focused on reducing the downside of MEV by allowing miners to privately and securely funnel transactions before they hit the chain. This reduces the incentive for miners to extract MEV by reordering transactions. Instead, they can simply process transactions in the order they were submitted, allocating MEV to users.
Flashbots has developed a number of mechanisms to achieve this.
One of the most important mechanisms is the Flashbots Relay, a peer-to-peer network connecting miners and transaction senders. Relay allows miners to receive transaction packages directly from users without relying on mempools. This enables better privacy and security for users and reduces incentives for MEV withdrawals.
Another key mechanism developed by Flashbots is the MEV-Geth client. This client gives miners access to all transactions that can be included in a block, not just those in the mempool. This enables miners to more efficiently capture MEV without reordering transactions.
In addition to these mechanisms, Flashbots has developed many other tools and techniques to address MEV extraction. These include a transaction simulation tool that allows users to estimate the potential MEV of their transactions, and a transaction pool management system that enables miners to manage the transactions they receive.
MEV Statistics and Related Data
Total MEV withdrawn (i.e. successful MEV transactions + gas fees for successful MEV transactions + gas fees for failed MEV transactions) was over $690 million.
Over $5 million in MEV has been withdrawn in the past 30 days alone.
Of all MEV extracted, 36.4% was MEV Miner revenue, while 63.6% was MEV Seeker revenue.
The vast majority of MEV is done through arbitrage; less than one percent is done through liquidations.
Among the MEV withdrawals by protocol, Uniswap V2 has the largest withdrawal volume, accounting for about 62% of the total. Uniswap V3 and Balancer also have a lot of withdrawals.
ETH/WETH is the main token used for MEV profit acquisition (95% of the total).
in conclusionFlashBots
in conclusion
In summary, MEV is a term that has cropped up in the cryptocurrency industry to describe the profits miners can make by manipulating transactions for their benefit. While MEV is not a new concept, it has become more common in recent years due to the rise of decentralized finance (DeFi) and fierce competition among miners for higher fees.
MEV has both positive and negative impacts on the cryptocurrency industry. On the one hand, MEV can incentivize miners to contribute to the security of the network by prioritizing more important transactions and blocks. On the other hand, it can also lead to market manipulation, promote unfair behavior, and damage the integrity of the network.
Despite these challenges, companies like Flashbots are working on innovative solutions to mitigate the negative impact of MEV and create a fairer and transparent cryptocurrency ecosystem. As MEV continues to be a topic of discussion and debate in the industry, various stakeholders need to work together to find effective solutions that balance the interests of all involved. Through continued innovation and collaboration, the full potential of blockchain and cryptocurrencies can be realized to create a more inclusive and decentralized financial future.
