IOTA 2.0 Introduction Part 15
This blog post discusses the concept of the mempool and Maximal Extractable Value (MEV) in blockchains, and how IOTA 2.0 tackles these concepts to protect its users against harmful value extraction.
A blockchain is a permanent record of linked transactions that can’t be changed. In most blockchains, before your transaction is included in a block and added to the blockchain, it goes through a memory pool (or "mempool" for short), which is like a waiting area for transactions. The mempool stores unconfirmed transactions until they can be verified and included in a block. Once it’s in the block, your transaction can't be tampered with.
In traditional blockchains, there isn’t one universal mempool for all nodes. Different nodes may have different mempools because of network issues or different configurations. Individual nodes may also have different rules for accepting transactions based on factors like gas price and mempool size.
Nodes receive transactions in their mempools and verify them to ensure they’re valid. They do so by verifying correct signature schemes, that the sum of output values doesn’t exceed the sum of input values, and that funds haven’t been double spent. They then send the transactions to other nodes (this process is called “gossiping”) until a leader (for example, a miner) eventually takes transactions from the mempool and adds them to a block. Once a transaction is added to a block, it is removed from the mempool.
Miners are motivated by profits, so they usually prioritize transactions carrying higher fees from the mempool. This allows transactions with higher fees to replace transactions with lower fees and, in effect, a bidding war can ensue with the highest bidders “winning” by getting included in the next block. If you’re not willing to pay more, you could get “priced out” multiple times while your transaction sits unconfirmed in the mempool.
In summary, the mempool in traditional blockchains is a waiting area for transactions before they are added to the blockchain. It helps determine the order of transactions and prioritize transactions based on fees.
Another drawback to a mempool is how it enables MEV.
What is MEV?
Maximal Extractable Value (MEV), also known as Miner Extractable Value, refers to the potential profit that miners or validators can extract from information they glean from your transaction while it waits in the mempool.
In Proof-of-Work consensus systems, each miner has the power to choose the transactions they include in a block, usually favoring those that benefit them the most. This creates a strong temptation for miners to manipulate block content, re-order transactions, or carefully place their own transactions for their own advantage.
The rearranging and selecting of transactions isn’t exclusive to miners but also applies to validators in Proof-of-Stake blockchains. Many blockchains use gas prices to determine the order of transactions: The higher the gas price a user pays, the faster their transaction gets included in a block. By observing the gas cost of transactions in the mempool, one can easily influence the order by placing another transaction before or after them.
MEV has drawn criticism as a form of market manipulation that increases transaction costs, causes chain instability, and negatively impacts retail traders. Some argue that MEV incentivizes miners to validate the network, but the general sentiment is that preventing MEV is beneficial for the future of DeFi.
For a description of different types of MEV attacks, check out this article by our Director of Research.
What is the Mempool in IOTA 2.0?
IOTA 2.0 has no mempool like in traditional blockchains. Here's why:
- Our users are also our validators: DLTs generally have two competing groups of actors: users who want cheap throughput and low node requirements and miners and validators who want to maximize the value of blockchain through MEV, block rewards, and fees. The motivation and incentives of these groups are at odds, with miners and validators effectively extracting value from users. In IOTA 2.0, service providers are eliminated and these two groups become one: This means users can directly write transactions into the data structure without any intermediaries. This resolves conflicts of interest and allows users to maintain their digital autonomy, as there isn’t a separate group of block creators to charge fees or extract value from the network.
- Leaderless consensus: The leaderless nature of the IOTA 2.0 protocol enables parallel stream processing: Its DAG-based structure allows for the rapid creation of small blocks without the need for a mempool. All transactions can be processed as they arrive, without waiting, and blocks can be processed in any order (check out Parallel Stream Processing in this blog post for more information). The leaderless consensus also eliminates the need for shared mempools for pending transactions and the special roles of miners or validators.
- Simplified transaction life-cycle: In traditional blockchains, the transaction lifecycle involves several steps: creation and broadcast, waiting in the mempool, ordering into a block, issuing the block to the network, validation, execution, and receiving approvers. In IOTA 2.0, the transaction lifecycle is simplified: the transaction is packaged into a block and broadcasted to the network nodes, where it is executed upon arrival, and the block receives approvers. This more efficient process also eliminates the need for a mempool, allowing for faster execution and confirmation.
How Leaderless IOTA 2.0 Minimizes MEV
Because there is no mempool in IOTA 2.0, your transaction is directly packaged into a single transaction block and added to the ledger without waiting. This prevents bots from being able to scan your transactions and reorder them before being included in the next block. As an effect, value extraction through MEV becomes essentially impossible.
Finally, removing intermediaries like miners or validators altogether also helps to address the MEV problem. In traditional leader-based protocols, the transaction order is decided by a leader, meaning they have control over the ledger state. In contrast, IOTA 2.0 is a leaderless protocol, where many validators independently propose blocks. Leaderless sequencing of blocks prevents manipulation of transaction order, eliminating MEV.
In our next and final blog post in this introduction to IOTA 2.0, we show how we achieve accessible writing and why it matters.
IOTA 2.0 Introduction
Part 11: What Makes IOTA 2.0 Secure?