I recently dived deep into Maximum Extractable Value (MEV) after months of seeing DeFi protocols being taken advantage of.
I wrote a complete deep dive here (https://mirror.xyz/0x1dE17B6c736bcd00895655a177535c2a33C6febA/D7OfvJfGGGndCa8aMtqD6NnOPtcUt2zZBsZTjOVkCW8), but here's a summary of important concepts.
FYI, it's long.
Executive Summary
Miners and validators have the power to mess with the order of transactions in the blocks they produce. And some of them are totally abusing that power to game the system and score massive profits, which is so not cool!
They've cooked up tricky schemes like sandwich attacks to squeeze money from other users' transactions as they pass through. The more resources these players have, the more value they can "extract", as the nerds call it.
This whole sitch with "Maximal Extractable Value" or MEV is letting the big miners and validators concentrate power by playing these tricks to siphon value for themselves.
It's also mucking up prices across exchanges since MEV lets them arbitrage assets. Basically, it risks the fairness and security of everything Web3 stands for!
How am I thinking about this?
So taming MEV is mad important for protecting the crypto ecosystem. We need to rally as a community and find solutions to shut down these greedy extraction plays. It's the only way we can keep things decentralized and achieve the dream of an open financial system.
Many are trying and expressing solutions.
-
Encrypting the pending transaction mempools is one idea being worked on. That could stop miners spying on transactions pre-block.
-
MEV rebates and burning tokens are also on the table to limit profitability. And
-
ePBS allows users to simulate proof-of-stake effects on MEV extraction and test mitigation strategies.
But it's not all figured out yet. Making these solutions actually work smoothly in the wild is still tricky. The coordination and design isn't fully optimized to prevent manipulation just yet.
Inclusion lists and some fee market changes in ETH may help a bit too, but those also have downsides like centralization risks. No silver bullet yet.
The community is putting in the brainpower, though! With enough testing and collaboration, hopefully, the brightest Ethereum minds can tame this beast.
However, challenges around optimal design, coordination, and preventing manipulation exist.
I don’t have any definitive insights or suggestions on how to make encrypting mempools a reality on Ethereum, but I’ve found some great research on how to make it to reality.
-
Time Encrypted Mempool: This proposal highlights important considerations like ensuring fairness, dealing with invalid transactions, and incentivizing miner participation. This proposal by Faraz Shaikh uses practical time lock encryption to encrypt transactions in the mempool so that only the miner or validator who is selected to produce the next block can decrypt them.
-
Mempool Encryption Protocol: A hypothetical protocol (by yours truly) that uses symmetric-key encryption to encrypt transactions in the mempool so that only the intended recipient (the miner or validator) can decrypt them. This protocol leverages a public key infrastructure (PKI) to distribute encryption keys among miners or validators and uses a proof-of-publication (PoP) mechanism to ensure that encrypted transactions are broadcast to the network. This protocol claims to provide strong privacy guarantees for transactions in the mempool while preserving network efficiency and security.
-
ePBS: separate the roles of proposers and builders, where proposers order transactions and builders execute them into blocks.
I will only go into these three topics as I believe it is a never-ending discussion on why we need strategies to overcome MEV.
In my assessment, these solutions have the potential to not just mitigate but potentially eliminate the most pernicious forms of MEV.
Ethereum developers are demonstrating tremendous creativity in designing economic systems and clever cryptographic schemes to turn MEV from a threat into a productive force for good.
Encrypted Mempools Are Still Experimental…
…that aim to encrypt transactions in the mempool so that only the miner or validator who is selected to produce the next block can decrypt them.
Some initial code exists in Geth, but wider adoption requires more testing and node coordination.
The goal is to encrypt transactions in the mempool so only the selected miner can decrypt them before block inclusion. This could prevent other miners from exploiting pending transactions, eliminating certain toxic MEV strategies.
But encrypted mempools aren't a silver bullet - they can't stop all MEV alone. Other techniques like rebates, burning, and whitelists are also being explored to mitigate MEV from different angles.
Encrypted mempools use a verifiable delay function (VDF) to ensure that the encryption key is only known to the elected miner at the block production time.
There are nuanced decentralization tradeoffs to assess - no solution is perfect.
What is Time Encrypted Mempool?
The core idea is to use timelock encryption to encrypt transactions in the mempool.
This encryption can only be decrypted by the specific miner who is elected to produce the next block.
Briefly, the process is as follows:
- A user sends a transaction, which is first encrypted using the miner's public key together with a timelock.
- This encrypted transaction is then sent to the mempool. Here, it remains hidden from other miners as it cannot be decrypted until the timelock expires.
- When the time comes for a block to be produced, only the elected miner can decrypt the transactions with their corresponding private key.
- After successfully decrypting the transactions, the miner then produces a valid block and shares it on the chain. Consequently, the transactions are executed with other miners not having accessed their contents beforehand.
Important to note is that for this process to work, a Public Key Infrastructure (PKI) has to be in place to facilitate the mapping of future block times to miners' respective public keys. Similarly, a verification mechanism must be in place to ensure transactions are correctly published in the encrypted mempool, even when their contents remain hidden. For this purpose, zero-knowledge proofs can be employed. Sanctions are applied to miners who either fail to publish encrypted transactions or decrypt them before their designated time slot, thus discouraging the manipulation or disregard of encrypted transactions.
There are some challenges as well
Now, How can the validity of transactions be verified if the miners or validators who are supposed to include them in a block cannot see their contents due to encryption and cannot check if they comply with the ledger/settlement rules?
Some of the strategies that I had brainstormed
Another hypothetical area that can be explored: Mempool Encryption Protocol (MEP)
How the (hypothetical) Mempool Encryption Protocol (MEP) would work to provide privacy for transactions in Ethereum's mempool:
-
MEP uses symmetric key encryption to encrypt transactions before they enter the mempool. The encryption keys are distributed to miners through a Public Key Infrastructure (PKI).
-
When a user wants to send a transaction, they request the public encryption key for the next scheduled block producer from the PKI.
-
The user encrypts their transaction using this public key, so only the designated miner can decrypt it.
-
The user also generates a proof-of-publication (PoP) by hashing the encrypted transaction. This PoP gets broadcast to the entire network.
-
Miners see the PoP and can verify the transaction was published but cannot view the actual contents pre-decryption.
-
The scheduled block producer decrypts transactions in their allotted time window using their private key and includes them in the produced block.
-
After the block is propagated, the network can verify the PoP matches the now-revealed transactions, ensuring they were correctly published earlier.
-
Invalid transactions would show a mismatch between the published PoP and the revealed transaction at block publication time.
-
The PKI rotates encryption keys to each block between scheduled block producers to maintain privacy.
This protocol prevents mempool front-running and censorship while still allowing transaction propagation and verification of correct publication via the PoP mechanism.
Another proposal that was shared was about Enshrine Proposer-Builder Separation (ePBS)
ePBS was proposed by Mike Neuder and Justin Drake to separate the roles of proposers and builders, where proposers order transactions and builders execute them into blocks.
With ePBS, the roles of transaction proposer and block builder are split between different validator nodes in Ethereum's proof-of-stake consensus protocol.
Read more in detail here: https://mirror.xyz/0x1dE17B6c736bcd00895655a177535c2a33C6febA/D7OfvJfGGGndCa8aMtqD6NnOPtcUt2zZBsZTjOVkCW8
Comparison Between MEP & ePBS
Final Thoughts:
If left unchecked, MEV seriously threatens the fairness, security, and decentralization of blockchain networks like Ethereum. However, promising solutions are emerging to mitigate the risks and impacts of MEV.
Technical proposals like encrypted mempools, MEV rebates/burning, and enshrined proposer-builder separation (ePBS) aim to directly reduce the incentives and ability for miners and validators to extract profits through transaction ordering manipulation. These potential solutions require further testing and refinement to ensure optimal security, efficiency, and decentralization tradeoffs.
Beyond technical measures, community coordination and evolving social norms will likely play a key role in stamping out the most abusive MEV practices over time. If manipulation techniques become culturally unacceptable, this can disincentivize their use. Regulatory frameworks may also eventually restrict MEV as blockchain adoption grows.
A layered strategy should be pursued, combining cryptographic innovations, protocol redesign, incentive tweaks, social factors, and regulatory oversight where appropriate. Each solution will address MEV partially on its own - a holistic and nimble approach is needed.
With continued research, development, and collaboration, solutions can be devised and implemented to eliminate the most harmful forms of MEV. This will help fulfill the promise of an open, decentralized financial system where users can trust in fairness and resistance to manipulation. Taming MEV is a pivotal challenge on this journey that the Ethereum community is positioned to overcome through persistent innovation.
Thank you for reading, and follow me here and on Twitter for more regular post updates.
You can connect with me directly on friend.tech at 0xArhat.
Please join my telegram channel for frequent daily updates: https://t.me/onchainweb3
If you find my work resourceful, please consider donating to 0x1de17b6c736bcd00895655a177535c2a33c6feba (Ethereum/Optimism/Arbitrum/BSC chain).
Also, buy my keys at friend.tech by searching for 0xArhat
I’d also appreciate it if you shared this with your friends, who would enjoy reading this.
You can find my other research & investment thesis here: https://bit.ly/45vA04W
Thank you.