Monad combines Ethereum's cultural characteristics with Solana's scalability.
Written by: 100y
Compiled by: Luffy, Foresight News
1. The Fallen Ethereum Village
Once upon a time, a group of green Pepe frogs lived in the Ethereum village. It was once one of the most bustling realms, where high decentralization and strong security fostered a prosperous economy.
Guided by these principles, villagers regularly hold elections to appoint leaders who oversee the generation of block records every 12 seconds. In this way, they diligently manage the prosperous economy of the village.
Now, the former glory of Ethereum began to fade, the meme virus rampant, and the village's strength weakened. Shadows loomed over the streets, with green Pepe frogs dragging their heavy feet, aimlessly wandering in the desolate and gloomy village.
However, some green Pepe frogs long to restore the lost glory of Ethereum. They support 'L2 Reform', a movement aimed at revitalizing the village. With their efforts, Ethereum began to prosper again, achieving economic vitality once thought impossible.
But L2 reform also has its limitations. Nearby villages like Solana and Sui, although young and full of instability, are rapidly developing through an unprecedented scientific revolution. Their innovations make complex financial transactions seamlessly interconnected, while Ethereum, despite its reforms, still struggles. Thus, rumors circulate among the Pepe frogs about the possibility of relocating to these neighboring villages.
Then, on a fateful day, a purple Pepe wizard appeared in the Ethereum village.
2. The Arrival of the Purple Pepe Wizard
The purple-robed Pepe wizard gazed sadly at the splendor lost in the Ethereum village, determined to establish a new realm called Monad.
One day, he appeared before the green Pepe frogs, announcing his grand plan to establish Monad village. He gathered the green Pepe frogs in the central square and began to listen to their thoughts.
Green Pepe Frog 1 spoke, 'I hope life in Monad is like it is in Ethereum. Although Ethereum lacks the scalability of Solana or Sui, I have never considered leaving because their culture is so different from ours.'
Green Pepe Frog 2 added, 'It is important to maintain the same lifestyle and culture, but I also hope for a system as efficient as those in other villages. While Ethereum is secure, it is not fast enough for enterprises seeking speed and agility.'
The wizard kept their wishes in mind, promising to create Monad with Ethereum's cultural characteristics and the scalability of Solana and Sui. He pondered the powerful spells needed to realize this dream, a village compatible with Ethereum traditions that could meet the efficiency demands of a new era.
Then, he shared his vision with the eager Pepe frogs looking forward to the new village, igniting their hope for a home that could truly provide the best of both worlds.
3. Secret Technique One: Delayed Execution
One limitation of the scalability of the Ethereum village lies in the processing of each transaction during the consensus process, which is a necessary step in generating each new block.
In Ethereum, the leader proposing the block must compute all transactions within the block before proposing it to ensure the result of each transaction. Additionally, the validating nodes receiving this block must also compute all transactions to verify the block's legitimacy and vote.
Due to the consensus process involving computation and communication among villagers, the time budget allocated for processing transactions is very low, ultimately leading to limited scalability.
To address this issue, the purple Pepe wizard introduced a new spell called 'Delayed Execution'. This spell separates the 'consensus' process (ordering villagers' transactions) from the 'execution' process (computing the outcomes of these transactions).
In simple terms, it does not achieve consensus and execution on each block simultaneously, but rather achieves consensus on block N while executing block N-1 (whose transaction order has already been determined).
By allowing a complete block time for execution, this method significantly increases the number of transactions that can be processed within the same time frame.
Advanced Spell: Delayed Merkle Root
In Ethereum, nodes compute before reaching consensus to ensure the validity of the block. However, in Monad's delayed execution system, consensus and execution are separate. This allows malicious nodes the possibility of ignoring previously agreed transactions or arbitrarily changing computational states.
To prevent this, Monad embeds the Merkle root (the computation result of block N-10) into the proposal for block N. If more than two-thirds of the nodes reach consensus on block N, it means consensus has been reached for the computation of block N-10.
If any node's computation result for the N-10 block does not match the Merkle root contained in the N block, that node will be removed from the consensus starting from the N block. The 10-block delay of the Merkle root ensures timely detection of any computational errors.
It is worth noting that the block time of Monad is 1 second, but this does not mean that the finality of Monad requires 10 seconds. Thanks to Monad's MonadBFT system, single-slot finality can be achieved, meaning finality can be reached within 1 second.
4. Secret Technique Two: Transaction Hash
The clever purple Pepe wizard pondered how the village leaders could quickly broadcast block proposals to other nodes.
In Ethereum, it is common to package the entire block proposal (including all transactions) and then send it through the network.
However, the Pepe wizard realized that if Monad adopted this approach, broadcasting block proposals containing a large number of transactions would be a daunting and labor-intensive task.
To solve this problem, the purple Pepe wizard introduced the concept of 'Transaction Hashes'. Since all transactions submitted by villagers have propagated through the network, each node maintains a record of Monad village transactions in its own memory pool.
This means that the leader no longer needs to transmit a complete list of transactions in each block proposal. Instead, the leader can simply reference the transactions and send only the hash values.
Thus, Monad's block proposals contain only the hash values of each transaction. Upon receiving these hash values, other nodes can easily compare them with their own transaction records.
5. Secret Technique Three: MonadBFT
In Monad village, the order of transactions within each block and the consensus on block creation are controlled by MonadBFT, a high-performance consensus mechanism based on HotStuff. This phased BFT (Byzantine Fault Tolerance) algorithm allows consensus to be achieved in two steps.
The role of the block leader is randomly chosen based on each participant's staking share. In Monad, the efficiency of block construction is higher than in the Ethereum village, as each block N proposal is transmitted along with the quorum certificate (QC) of the previous block N-1, indicating that over two-thirds of the nodes have validated the block.
The sequence of events is as follows:
Leader N broadcasted the proposal for block N along with the QC for block N-1.
Then, the validators validated block N and sent their votes to leader N+1.
Leader N+1 shared the proposal for block N+1 and the QC for block N.
However, even with QC N, validators cannot immediately determine block N because the nature of the blockchain cannot ensure that all participants are synchronized online.
To fully protect block N, validators must send their 'in favor' votes for block N+1 (which contains QC N) to leader N+2. When leader N+2 generates QC N+1, it confirms the successful completion of the N+1 round, thereby finalizing block N.
Thus, with clever magic, the purple Pepe wizard guided Monad village into a new era.
6. Secret Technique Four: Parallel Execution
In Monad, to handle the large number of villagers' transactions, the purple Pepe wizard designed a new spell that processes transactions between different Ethereum villages not in a serial manner, but in parallel.
With delayed execution, execution only begins after the transaction order within the block reaches consensus. Monad village consists of many skilled executors, each responsible for processing transactions, independently computing their inputs and outputs, and creating a pending list.
These inputs and outputs do not immediately alter the village's state but wait in a suspended magical form, ready to be submitted in the order determined by consensus. This submission merges the outputs into the current state one by one, just like magical threads weaving a seamless, orderly tapestry.
However, things took a turn. Parallel processing introduced the possibility of transaction conflicts, which were rare in the orderly Ethereum village but posed a new challenge in Monad.
For example, if a transaction (transaction b) shows villager A giving 1 ETH to villager B, and another transaction (transaction c) shows B spending that ETH at the village inn, then their order is crucial. If transaction c attempts to execute before transaction b, the transaction will fail. In this case, the conflicting transaction is rescheduled, and transaction c will wait to execute until transaction b is completed.
Therefore, in Monad, the core of parallel execution lies in ordering: the results are computed in parallel, but state updates are merged in the precise order required.
7. Secret Technique Five: MonadDb
The purple Pepe wizard's ingenuity did not stop here. He conjured MonadDb, a unique custom database for Monad village, specifically designed to store the state of the blockchain. Ethereum relies on a complex Merkle Patricia Trie, known for its resilience but also infamous for its inefficiency with external clients.
MonadDb was designed with the village's parallel execution in mind, supporting multiple reads and writes simultaneously with high precision. Unlike traditional databases that require completing one task before moving to the next, MonadDb features asynchronous I/O magic, allowing tasks to overlap seamlessly, paving the way for true parallel transaction processing.
8. Come visit Monad village
Through a series of wonderful spells and complex magic, the purple Pepe wizard created the Monad village. Here, Ethereum's trusted accounts, cryptography, transaction formats, languages, and wallets easily integrate with the scalability of Solana and Sui. Now, Monad is thriving, heading towards the dream of achieving 10,000 transactions per second.
Born from wisdom and hope, can Monad village save a world plagued by meme viruses and help Ethereum regain its glory? Only time will tell the answer.