Maximal Extractable Value (MEV) represents the highest potential profit that a blockchain miner, validator, or sequencer can achieve by manipulating the inclusion, exclusion, or order of transactions within a block during the block production process. Originally known as Miner Extractable Value, the term has evolved to include all types of block producers across different consensus mechanisms, such as Proof-of-Stake (PoS) and other network protocols. MEV allows those controlling block construction to reorder transactions to maximize their revenue. This often results in disadvantages for regular users.
MEV arises from the ability of block producers to control the order and inclusion of transactions within a block. When users submit transactions to the network, these transactions are placed in a mempool, a pool of pending transactions. Block producers select transactions from the mempool to include in the next block. They typically prioritize those with higher gas fees to maximize their profits. However, beyond ordering by fee, block producers can strategically reorder transactions to exploit profitable opportunities such as arbitrage, liquidation events, or frontrunning user trades. This manipulation allows them to extract additional value beyond standard block rewards.
Frontrunning involves bots monitoring the mempool for large transactions. They submit their own transactions with higher fees to execute before the detected transactions. This can lead to sandwich attacks, where the frontrunner places one transaction before and one after a user's transaction. By doing so, they manipulate the market price to their advantage. As a result, the user experiences higher slippage.
Arbitrage bots exploit price discrepancies across different decentralized exchanges (DEXs). They swiftly buy low on one exchange and sell high on another. Similarly, during liquidation events in lending platforms, bots can trigger liquidations faster than others. This allows them to capture the liquidation rewards, often at the expense of the borrower.
Advanced bots engage in generalized frontrunning by scanning the mempool for profitable opportunities. They replace addresses in transaction payloads with their own and submit these transactions with higher fees. This ensures priority inclusion in blocks.