Overview of Ethereum Transactions
To understand MEV, it is essential to understand how Ethereum transactions are executed. To execute a transaction, a user submits a transaction to the mempool, a pool of transactions waiting to be executed. Miners are responsible for selecting transactions from the mempool and incorporating them into the next Ethereum block (therefore completing the transaction). Miners first select transactions with the highest gas fees as these are most profitable for the miner and then fill the block with lower fee transactions. Therefore, if users want to guarantee miners will incorporate their transactions in the next block, they will need to submit a high gas fee to guarantee selection.
What is MEV
MEV refers to ‘Minter Extracted Value’ or ‘Maximum Extracted Value’ and is primarily associated with on-chain arbitration and the Ethereum Dark Forest. Every Ethereum transaction is sent to the mempool, where it waits for a miner to include the transaction in a block. It is important to note a transaction in the mempool has been submitted to the network but not executed by miners. The mempool is Ethereum’s Dark Forest, where arbitrageurs hunt for opportunities at the expense of users.
The mempool is public, meaning anyone can observe and simulate transactions waiting to be executed. While transactions are in the mempool, it is common for arbitrage bots to scan transactions for profit opportunities. If a bot finds a profitable trade, the bot will submit the same transaction with a higher gas fee, meaning that the bot will receive profit and the user will not. There are various opportunities for bots watching the mempool, including pure arbitration, increasing slippage to create arbitrage, and arbitrage through liquidations.
MEV is used to define the maximum amount of value an arbitrager can extract from an opportunity and therefore also represents the maximum amount of gas an arbitrager is willing to pay to front-run the transaction. Typically, multiple bots will identify the same opportunity and attempt to outbid each other, in the form of gas fees, to execute the trade first and collect the profit. Hypothetically, the bots will bid up to the MEV to secure a small profit. In all MEV based transactions, the miners are the real winners because they earn profit through higher gas fees. On the other hand, MEV bots can only make small profits, the user who submitted the original transaction misses out on an opportunity, and other network users will experience increased gas prices.
It is important to note MEV is only a problem for on-chain transactions and does not affect trading on centralised exchanges.
Do You Need to Protect Yourself Against MEV?
While most retail users will not notice the effects of MEV, they will be affected by its downstream effects. Primarily, users may see small spikes in gas prices as bots battle for block positioning, or users will experience increased slippage when transacting in markets with lower liquidity.
Users concerned about the adverse effects of MEV on their transactions have a limited array of protection options: Transaction Protection, Flashbots, and MEV Protocols.
Transaction Protection is when a user attempts to hide their transaction from bots monitoring the mempool by creating complex smart contracts that are difficult or impossible for bots to simulate. This requires extensive smart contract knowledge and is considered less effective because it is not gas efficient. Another less sophisticated form of transaction protection would be to execute transactions on centralised exchanges with no public mempool.
Alternatively, users could utilise Flashbots, which route transactions directly to miners instead of placing them in the mempool. Flashbots are still in their early stages and require technical knowledge to operate.
Lastly, users can use MEV protection protocols such as KeeperDAO, which captures and shares MEV profits with the user. Using MEV Protection Protocols is the most realistic solution for retail users; however, it is important to remember that these protocols are in their infancy and have not been battle-tested.