Once upon a time, a purple Pepe wizard appeared…
Once upon a time, in the village of Ethereum, there lived a community of green Pepes. Ethereum was once one of the most prosperous realms, a place where high decentralization and formidable security had given rise to a thriving economy.
Guided by these principles, the villagers held regular elections based on their stakes, appointing leaders to oversee the blocks of transaction records created every twelve seconds. Through this, they diligently managed the village's bustling economy.
But now, Ethereum’s former glory had faded, and a plague of meme-viruses swept through, sapping the village’s strength. Shadows hung over the streets as the green Pepes trudged along, aimlessly wandering in what had become a desolate, gloomy village.
Yet, there remained a few green Pepes who longed to restore Ethereum's lost grandeur. They championed the "L2 Reform," a movement aimed at revitalizing the village. With their efforts, Ethereum began to flourish again, enabling a scale of activity once deemed impossible. The Pepes regained some of the vibrancy that had once filled their lives.
Still, the L2 Reform faced its limits. Nearby villages like Solana and Sui, though young and at times fraught with instability, were advancing rapidly through unprecedented scientific revolutions. Their innovations made complex financial transactions seamless, while Ethereum struggled despite the reforms. Thus, whispers spread among the Pepes about the possibility of moving to these neighboring villages.
Then, one fateful day, a purple Pepe wizard appeared in the village of Ethereum.
A purple-robed Pepe wizard, gazing sorrowfully at the lost glory of the Ethereum village, resolved to build a new realm named Monad.
One day, he appeared before the green Pepes, announcing his ambitious plan to establish the village of Monad. Gathering them in the central square, he opened the floor to hear their thoughts and dreams.
Green Pepe 1 spoke up: “I hope life in Monad will feel just like Ethereum. Even though Ethereum lacks the scalability of Solana or Sui, I never considered leaving because their cultures felt so different from ours.”
Green Pepe 2 added, “Keeping the same lifestyle and culture is important, but I also want a system as efficient as the other villages’. While Ethereum is safe, it falls short for ventures that demand speed and agility.”
Taking their desires to heart, the wizard pledged to create Monad with the rich culture of Ethereum and the scalability of Solana and Sui. He contemplated the powerful spells necessary to achieve both dreams, a village where compatibility with Ethereum’s traditions would meet the efficiency of new-age advancements.
Then, he shared his vision with the eager Pepes, inspiring hope for a place that could truly offer the best of both worlds.
One of the limitations restricting the Ethereum village’s scalability lies in the processing of every transaction during the consensus process, a necessary step to generate each new block.
In this village, the leader proposing a block must compute all transactions within it before proposing it, ensuring each one’s outcome. Additionally, the validating nodes that receive this block must also compute all the transactions to verify the block’s legitimacy and cast their votes.
Since the consensus process involves both computation and communication between villagers, the time budget allocated for processing transactions is quite low, ultimately resulting in limited scalability.
To solve this, the purple Pepe wizard introduced a new spell called "Deferred Execution." This spell separates the “Consensus” process, which orders the villagers' transactions, from the “Execution” process, which calculates the outcomes of these transactions.
In simpler terms, instead of performing consensus and execution simultaneously for each block, consensus for the Nth block is conducted while the execution is performed for the N-1th block, whose transaction order has already been established.
By allowing a full block time for execution, this approach greatly increases the number of transactions that can be processed within the same timeframe.
Advanced Spell: Delayed Merkle Roots
In the Ethereum village, nodes perform calculations before reaching consensus, which ensures the block’s validity. However, in Monad’s Deferred Execution system, consensus and execution are separated. This opens the possibility for malicious nodes to ignore previously agreed transactions or freely alter the computed state.
To prevent this, Monad embeds a Merkle root—representing the computed results from the N-10th block—into the proposal for the Nth block. If more than two-thirds of nodes reach consensus on the Nth block, it implies agreement on the N-10th block’s computations.
If any node’s computations from the N-10th block do not match the Merkle root included in the Nth block, that node is removed from consensus starting at the Nth block. This ten-block delay for the Merkle root ensures that any computational errors are detected in time.
Notably, the block time in Monad is 1 second, though this does not mean Monad’s finality takes 10 seconds. Thanks to Monad’s unique MonadBFT system, single-slot finality can be achieved, granting finality within 1 second.
The wise purple Pepe wizard pondered how a leader in the village might swiftly spread a block proposal to the other nodes.
In the Ethereum village, it was customary to package an entire block proposal, including all transactions, and send it as one massive bundle across the network.
However, the wizard realized that if Monad village adopted this method, broadcasting such a vast block proposal full of countless transactions would be a daunting and laborious task.
To solve this, the purple Pepe wizard introduced the concept of "Transaction Hashing." Since all villagers’ submitted transactions are already propagated across the network, each node maintains a record of Monad village's transactions within its own mempool.
This insight meant that the leader no longer needed to transmit the full transaction list in each block proposal. Instead, the leader could simply reference the transactions, sending only the hashes.
This way, Monad's block proposals remained compact, containing only the hashed values of each transaction. Upon receiving these, the other nodes could easily compare the hashes to their own records and identify the referenced transactions.
In Monad village, the order of transactions within each block and the consensus on block creation were governed by MonadBFT, a high-performance consensus mechanism based on HotStuff. This two-phase BFT (Byzantine Fault Tolerance) algorithm allowed consensus to be reached in two steps.
The role of block leader was probabilistically chosen based on each participant’s staked share. In Monad, blocks were crafted more efficiently than in the Ethereum village, as each block N proposal was transmitted along with the Quorum Certificate (QC) for the previous block N-1, indicating that over two-thirds of the nodes had validated the block.
Here is how the sequence unfolded:
Leader N spread a proposal for block N, accompanied by the QC for block N-1.
Validators then verified block N and sent their votes to Leader N+1.
Leader N+1 shared a proposal for block N+1, along with the QC for block N.
However, even with QC N, validators could not finalize block N instantly, as the nature of the blockchain could not ensure that all participants were online synchronously.
To fully secure block N, validators had to send their “yes” votes for block N+1, containing QC N, to Leader N+2. When Leader N+2 generated QC N+1, it confirmed the successful completion of round N+1, which in turn retroactively finalized block N.
Thus, with deft wizardry and foresight, the purple Pepe wizard guided Monad village into a new era, where each block was created and secured not only swiftly but with an elegance befitting the vision of a truly scalable and cooperative village.
In the realm of Monad, to handle a vast influx of villager transactions, the purple Pepe wizard devised a new spell that allowed transactions to be processed not in the serial manner of Ethereum village, but in powerful, parallel flows.
With the spell of Deferred Execution, execution would commence only after a block’s transaction order had reached consensus. The Monad village, populated by a host of skilled executors, each took on transactions, calculating their inputs and outputs independently and creating pending lists.
These inputs and outputs didn’t immediately alter the village’s state but instead waited in suspended magic, ready to be committed in the order determined by consensus. This commitment involved merging the outputs one by one into the current state, like magical threads weaving a tapestry of seamless order.
Yet, there was a twist. Parallel processing introduced the possibility of transaction conflicts—a rarity in the orderly Ethereum village but a new challenge here.
For instance, if one transaction (tx b) had villager A gifting 1 ETH to villager B, and another (tx c) showed B spending that ETH at the village inn, their order was crucial. Should tx c attempt to execute before tx b, the transaction would fail. In these cases, conflicting transactions were rescheduled, with tx c awaiting the completion of tx b before executing again.
Thus, in Monad, the heart of parallel execution lay in the sequence: results were calculated in parallel, but state updates were merged in the precise order needed.
The purple Pepe wizard didn’t stop there. He conjured MonadDb, a custom database unique to the village of Monad, tailored to store the blockchain’s state. Where Ethereum relied on the intricate Merkle Patricia Trie, a structure known for its resilience but also for its inefficiencies with foreign clients, MonadDb embraced it natively, harnessing its full power and efficiency.
MonadDb was crafted with the village’s parallel execution in mind, supporting multiple simultaneous reads and writes with graceful precision. Unlike traditional databases that required each task to finish before moving to the next, MonadDb wielded asynchronous I/O magic, allowing tasks to overlap seamlessly, opening the gates for true parallel transaction handling.
Through a symphony of wondrous spells and intricate enchantments, the purple Pepe wizard created the village of Monad—a place where Ethereum’s trusted accounts, cryptography, transaction formats, languages, and wallets mingled effortlessly with the incredible scalability of Solana and Sui. Now, Monad flourished with dreams of reaching 10,000 transactions per second and achieving 1-second finality.
Would the village of Monad, born of brilliance and hope, manage to save a world ensnared by the meme virus and perhaps help bring Ethereum’s glory back as a worthy companion? Only time would tell.