The Mempool and Transaction OrderThe Mempool is where our story starts. This is the place where all Ethereum transactions are held before they’re included in a block. The Mempool is transparent, meaning anyone can see all transaction that are submitted. This transparency and knowledge of other’s actions creates opportunities that can be taken advantage of. South Park characters in the Mempool, before getting on buses (blocks). Once included in a block, transactions are executed in sequence, from first to last. The order of transactions within blocks is usually based on the gas price each transaction has, with the highest going first. If someone is aware of a transaction, they can submit one that’ll be included either before or after it, since they know exactly how much gas they need to set. In the process, they can extract value. What is MEV?MEV is not exclusive to Ethereum, or even to cryptocurrencies. Scalping is a similar phenomenon where a few buy up significant stock of an item, PS5s or Taylor Swift tickets for example, and sell the rest at a more expensive price. That value is extracted by anticipating transactions and getting ahead of them. Since the mempool is completely transparent, transactions are easy to react to. MEV is the practice of using knowledge of other’s transactions to extract value. MEV was first thought of on a Reddit post by u/pmcgoohan. They proposed that miners could extract value by changing the order of transactions in a block, or use their knowledge of incoming transactions to extract value. Since then, the concept of “searchers” has been invented for people or bots that search for opportunities to extract value by looking at transactions in the Mempool. There are several common MEV strategies. Each is explained in greater detail below.
MEV StrategiesFrontrunningFrontrunning happens when someone sees a transaction you’ve submitted, then sends another transaction with more gas, leading to their transaction executing first. This can place the transaction you’ve sent at a disadvantage. Profitable transactions can be copied and sent with higher gas, and more elaborate strategies are also possible. In traditional finance, this is illegal. BackrunningBackrunning is very similar, but involves sending a transaction with very slightly less gas than the one you’ve sent, thereby taking advantage of the impact your transaction has had on prices or the market overall. Sandwich AttacksSandwich Attacks are a combination of both of the above. Let’s look at an example. Imagine you want to sell 10 ETH for $12,000, so you go to a decentralized exchange (DEX) like Uniswap, and you submit your transaction. As soon as you do, an MEV Bot sends two transactions, one to be included before yours, and one after. The first one buys ETH to make it more expensive, then your transaction executes, then the final transaction executes selling ETH at the new higher price. This results in you getting slightly less ETH, and the MEV Bot extracting value. NFT SnipingNFT Sniping is a form of Frontrunning that sees a profitable purchase for an NFT, usually far below the floor price on a collection, and sends a copy of the transaction with higher gas to be included ahead of it. DEX ArbitrageDEX Arbitrage is often seen as a positive form of MEV, relative to the others. This simply involves buying assets on one DEX and selling them on another to take advantage of tiny price differences. This makes prices more consistent across exchanges. LiquidationsLiquidations happen when bots detect opportunities to lower prices of assets on specific exchanges enough to cause someone’s loan to be liquidated. They then take advantage of the decrease in prices to buy those assets at a discount. This is also seen as non-toxic MEV as it results in dangerous loans being removed from the market. MEV’s ImpactMEV can be harmful or it can lead to positive effects. In either case, it is extremely profitable. It results in value being extracted, often at the expense of users, to the benefit of people who employ these strategies. Today there are tools that automate the extraction of MEV. Validators can choose to run them, and searchers can also use them to extract value even without needing to have a node. FlashbotsThe biggest name in MEV is Flashbots. They are a company created to allow everyone to employ MEV strategies, instead of only a few. Since validators often belong to pools that share rewards between validators in that pool, the bigger a pool is, the more blocks it will propose and the more MEV it will obtain. Further, they noticed that searchers began working with validator pools directly, submitting to them their transactions privately instead of publicly through the Mempool. Flashbots creates an open platform for any validator to extract MEV, by allowing searchers to submit MEV strategies to validators privately on a block by block basis, side-stepping the Mempool and the risks associated. This institutionalizes the practice of MEV. So far, Flashbots has processed more than half of the blocks since the Merge. Beyond centralization concerns surrounding Flashbots, the concerns behind MEV are well-founded. Those that employ these strategies can accrue more value quickly, leading to centralization. As a result, everyone’s forced to employ MEV strategies or be at a disadvantage. This results in all opportunities to extract value being fully exploited, often at the expense of the people using Ethereum everyday. MEV’s FutureMEV’s future on Ethereum is questionable, thankfully. Solutions including PBS mitigate its impacts and prevents the censorship it can lead to. PBS is Proposer-Builder Seperation, an upcoming upgrade that splits the role of the validator into two, one that assembles transactions into blocks, and another that chooses from assembled blocks and adds them to the blockchain. Further, on L2’s a “First Come First Serve” rule could ensure that transactions are executed in the order they’re submitted. This is being prioritized on Arbitrum, for example. Finally, the entire swimlane of “The Scourge” in the Ethereum roadmap is focused on eliminating or mitigating MEV as much as possible. We may be living in a unique time in Ethereum’s history, after MEV’s discovery but before it’s solution. Thank you for reading! If you learned something, please sign up to my free newsletter below! I'll send you one email a week with a simple write-up on a blockchain topic. No ads, shills, or affiliations. Stay kind. Stay curious. ????????️ [link] [comments] |
You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.
Comments