Table of Contents
Detailed explanation of how Monad works
Parallel execution
MonadDb
Home web3.0 Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement

Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement

May 06, 2024 am 09:40 AM
Ethereum High scalability evm

Transaction scalability has always been a hot topic. Over the past few weeks, we’ve been exploring how monads can help scale TPS.

The following is a detailed explanation of how Monads work, written by Saurabh Deshpande.

Detailed explanation of how Monad works

TPS is an indicator that we are very concerned about. We want our chains to be able to support higher TPS because they can support more users and applications. The chart below shows the TPS numbers for Ethereum and L2. No chain has ever breached the 100 TPS mark. Note that TPS is a general term used to measure scale. TPS is inaccurate because not all transactions are the same, they vary in complexity. But for simplicity, we use TPS as a measure of scale.

Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement

What should we do if we want to increase TPS?

  • The first approach is to build a completely new system, like Solana did. It sacrifices EVM compatibility compared to speed. It uses multi-threaded execution instead of single-threaded execution (think multi-core CPU vs single-core CPU), parallelizes transactions and uses a different consensus mechanism.

  • The second approach is to use off-chain execution and scale Ethereum with a centralized sequencer.

  • The third approach is to decompose the EVM into separate components and optimize them for scalability.

Monad is a new EVM-compatible L1 that recently raised $225 million that is building EVM from the ground up, rather than using it directly. It chose this third approach to increase scalability.

We discussed several major changes brought by Monads.

Parallel execution

The Ethereum Virtual Machine (EVM) executes transactions sequentially. Before one transaction is executed, the next transaction must wait. Think of it this way. Consider a platform in a motorcycle assembly shop. Multiple trucks deliver motorcycle parts (each truck has all the parts needed to assemble 50 motorcycles). The assembly shop performs four different functions: unloading, sorting, assembly and loading.

Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement

In the current EVM setup, there is only one platform, and the same location is used for loading and unloading. So while the truck is parked, motorcycle parts are unloaded, sorted, assembled and loaded on the same truck. While the classification team is working, other teams are waiting. Therefore, if you think of their work as separate slots, each team only works once in four slots. This results in significant inefficiencies, highlighting the need for a more streamlined approach.

Now, imagine a platform with four different loading and unloading areas. Even if the unloading team can only work with one truck at a time, they don't need to wait for the next three slots. They can be transferred directly to the next truck.

The same goes for the sorting, assembly and loading teams. Once unloading is complete, the truck moves to the loading bay to wait for the loading team to load the assembled motorcycles. Therefore, a warehouse with only one platform and load/unload areas performs all operations sequentially, while a warehouse with 4 platforms and different load/unload areas performs parallelization.

Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement

Think of Monads as infrastructure, equivalent to a warehouse with multiple truck platforms. But it's not simple. The complexity increases when trucks are relied upon. For example, what happens if one truck doesn't have all the parts to assemble 50 motorcycles? Transactions may not always be independent. Therefore, the Monad must handle transactions that depend on each other when it executes them in parallel.

How to deal with it? It implements a method called optimistic parallel execution. The protocol can only execute independent transactions in parallel. For example, consider 4 transactions where Joel's balance is 1 ETH:

  • Joel sends 0.2 Ether to Saurabh

  • Sid Minting An NFT

  • Joel sends 0.1 ether to Sid

  • Shlok Purchase PEPE

All These transactions are executed in parallel, and pending results are submitted one by one. If the output of the pending result conflicts with the original input of any transaction, the transaction is re-executed. Transactions 2 and 4 have no pending results that conflict with inputs from other transactions because they are independent of each other. But transactions 1 and 4 are not independent.

Please note that since all 4 transactions start from the same state, the focus is on Joel's balance of 1 ETH. After Joel sent 0.2 ETH, the balance was 0.8 ETH. After Joel sends 0.1 ETH to Sid, his balance is 0.9 ETH. The results are submitted one by one, ensuring that the output does not conflict with any input. After submitting the pending result of 1, Joel's new balance is 0.8 ETH.

This output conflicts with the input of the 3rd transaction. So now 3 is re-executed with an input of 0.8 ETH. After executing 3, Joel's balance is 0.7 ETH.

MonadDb

Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement

At this point, the obvious question is how do we know that we don't have to re-execute most of the transactions. The answer is that re-execution is not the bottleneck. The bottleneck is accessing Ethereum’s memory. It turns out that the way Ethereum stores state in a database makes accessing state difficult (time consuming and therefore expensive). This is another improvement of Monad: MonadDb. The way Monads structure databases reduces the overhead associated with read operations.

When the transaction must be re-executed, all inputs are already in cache memory, which is easier to access than the overall state.

Solana had 50k TPS on its testnet, but now only has about 1k TPS on the mainnet. Monad claims to have achieved 10k real-world TPS on its internal testnet. While this doesn't always represent real-world performance, we can't wait to see how Monad performs in real-world applications.

The above is the detailed content of Monad Getting Started Guide: Quickly Understand Parallel EVM and Performance Improvement. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
What currency does Ripple (XRP currency) belong to? Detailed tutorial for beginners What currency does Ripple (XRP currency) belong to? Detailed tutorial for beginners Apr 28, 2025 pm 07:57 PM

Created by Ripple, Ripple is used for cross-border payments, which are fast and low-cost and suitable for small transaction payments. After registering a wallet and exchange, purchase and storage can be made.

Sesame Open Door Official Website Entrance Sesame Open Door Official Latest Entrance 2025 Sesame Open Door Official Website Entrance Sesame Open Door Official Latest Entrance 2025 Apr 28, 2025 pm 07:51 PM

Sesame Open Door is a platform that focuses on cryptocurrency trading. Users can obtain portals through official websites or social media to ensure that the authenticity of SSL certificates and website content is verified during access.

What are the top ten virtual currency trading apps? The latest digital currency exchange rankings What are the top ten virtual currency trading apps? The latest digital currency exchange rankings Apr 28, 2025 pm 08:03 PM

The top ten digital currency exchanges such as Binance, OKX, gate.io have improved their systems, efficient diversified transactions and strict security measures.

What kind of software is a digital currency app? Top 10 Apps for Digital Currencies in the World What kind of software is a digital currency app? Top 10 Apps for Digital Currencies in the World Apr 30, 2025 pm 07:06 PM

With the popularization and development of digital currency, more and more people are beginning to pay attention to and use digital currency apps. These applications provide users with a convenient way to manage and trade digital assets. So, what kind of software is a digital currency app? Let us have an in-depth understanding and take stock of the top ten digital currency apps in the world.

Top 10 virtual currency app rankings Recommended by the top ten virtual currency app trading platforms in 2025 Top 10 virtual currency app rankings Recommended by the top ten virtual currency app trading platforms in 2025 Apr 28, 2025 pm 04:12 PM

Top 10 virtual currency app rankings: 1. OKX, 2. Binance, 3. gate.io, 4. Coinbase, 5. Kraken, 6. Huobi, 7. Bitfinex, 8. KuCoin, 9. Bitstamp, 10. Gemini, these exchanges are known for their efficient trading systems, rich trading pairs and multiple security measures to meet the needs of different users.

Easeprotocol.com directly implements ISO 20022 message standard as a blockchain smart contract Easeprotocol.com directly implements ISO 20022 message standard as a blockchain smart contract Apr 30, 2025 pm 05:06 PM

This groundbreaking development will enable financial institutions to leverage the globally recognized ISO20022 standard to automate banking processes across different blockchain ecosystems. The Ease protocol is an enterprise-level blockchain platform designed to promote widespread adoption through easy-to-use methods. It announced today that it has successfully integrated the ISO20022 messaging standard and directly incorporated it into blockchain smart contracts. This development will enable financial institutions to easily automate banking processes in different blockchain ecosystems using the globally recognized ISO20022 standard, which is replacing the Swift messaging system. These features will be tried soon on "EaseTestnet". EaseProtocolArchitectDou

Are these C2C transactions in Binance risky? Are these C2C transactions in Binance risky? Apr 30, 2025 pm 06:54 PM

Binance C2C transactions allow users to buy and sell cryptocurrencies directly, and pay attention to the risks of counterparty, payment and price fluctuations. Choosing high-credit users and secure payment methods can reduce risks.

uniswap on-chain withdrawal uniswap on-chain withdrawal Apr 30, 2025 pm 07:03 PM

Uniswap users can withdraw tokens from liquidity pools to their wallets to ensure asset security and liquidity. The process requires gas fees and is affected by network congestion.