Understanding Modularity in One Article: Plug-and-Play Lego Solutions for Blockchain Performance Bottlenecks

Gryphsis Academy
2024-06-14 17:45:17
Collection
The rise of modular blockchain represents a more "soulful" approach to pluggable products. In this approach, blockchain is no longer seen as a closed system, but as an open, scalable platform where various services and functions can be easily plugged in and unplugged like Lego blocks.

Written by: @twilight_momo

Mentor: @CryptoScott_ETH

TL; DR

  1. Monolithic Blockchains are known for their comprehensiveness, independently handling various aspects of the network, from data storage to transaction validation, and more. In contrast, Modular Blockchains separate different functions of the blockchain into independent modules, providing performance support and a smooth user experience for specific functions, thus addressing the "impossible triangle" problem to some extent.

  2. Ethereum, as the first blockchain platform to support smart contracts, provides fertile ground for modular design. With the development of blockchain technology, the Bitcoin ecosystem has also begun to explore modular possibilities, adding new modules to achieve more advanced functionalities, such as improved privacy protection, more efficient transaction processing, or enhanced smart contract capabilities.

  3. Modular technology represents a more "soulful" pluggable product approach, leading to the emergence of more flexible and customizable blockchain solutions in the future, where various services and functions can be easily inserted and removed like Lego blocks. This flexibility allows developers to quickly build and deploy blockchain solutions based on the specific needs of application scenarios.

1. What is a Modular Blockchain

Source: Celestia.org

When discussing modular blockchains, it is essential to first understand the concept of Monolithic Blockchains. Monolithic chains, such as Bitcoin and Ethereum, are known for their comprehensiveness, independently handling all aspects of the network, from data storage to transaction validation to smart contract execution. In this process, monolithic chains play the role of a generalist, engaging in all aspects.

Taking Ethereum as an example, a mature monolithic blockchain can generally be divided into four architectures:

  • Execution Layer
  • Settlement Layer
  • Data Availability Layer / DA Layer
  • Consensus Layer

The diagram below uses the analogy of a sports game to explain the role of each architectural layer in detail:

Through this analogy, we can better understand how the various architectures of the blockchain work together. A monolithic blockchain executes all functions on the same chain, while a Modular Blockchain is a new type of blockchain architecture that decomposes the blockchain system into multiple specialized components or layers, each responsible for handling specific tasks such as consensus, data availability, execution, and settlement. Modular blockchains resemble a group of specialists, focusing on deep exploration and technological innovation in their respective fields. This focus allows modular blockchains to provide excellent performance and user experience for specific functions, such as offering faster transaction processing speeds at lower costs.

In terms of node architecture, monolithic chains rely on full nodes, which must download and process a complete copy of the blockchain data. This not only places high demands on storage and computational resources but also limits the network's scalability. In contrast, modular blockchains adopt a light node design that only needs to process block header information, significantly improving transaction speed and network efficiency.

A notable advantage of modular blockchains is their flexibility and collaboration. They can outsource non-core functions to other specialists, creating a synergy that significantly enhances overall performance. This design philosophy is similar to Lego blocks, allowing developers to freely combine different modules based on project needs, creating diverse solutions. While monolithic chains have advantages in global control, security, and stability, they also face challenges in scalability, upgrade difficulty, and adapting to new demands. Modular blockchains stand out with their high flexibility and customizability, simplifying the creation and optimization processes of new blockchains.

However, modular blockchains also face their unique challenges. Their complex architecture increases the workload for developers in design, development, and maintenance. As an emerging technology, modular blockchains have not yet undergone comprehensive security testing and market volatility assessments, and their long-term stability and security still need further validation.

2. Why Do We Need Modular Blockchains

Why is modular blockchain technology receiving widespread attention and predicted to be a "future trend"? This is closely related to the well-known "impossible triangle" theory in the blockchain field.

The "impossible triangle" of blockchain refers to the difficulty of achieving optimal states in security, decentralization, and scalability simultaneously in a blockchain network.

  • Scalability focuses on the network's ability to handle a large number of transactions and maintain efficient, low-cost operations as users and transaction volumes grow. It is typically measured by TPS (transactions per second) and latency (the time required for transaction confirmation).

  • Security involves the cost and difficulty of protecting the blockchain network from attacks. For example, Bitcoin's POW mechanism requires an attacker to control more than 51% of the network's computing power, while Ethereum's POS mechanism requires collusion from more than ⅓ of the nodes.

  • Decentralization describes the operation of the network not relying on a single central node but distributed across many nodes. The more nodes there are and the wider the geographical distribution, the higher the degree of decentralization of the network.

The core idea of the "impossible triangle" is that it is challenging for a blockchain system to optimize all three characteristics. For instance, among many public chains, Bitcoin and Ethereum stand out in decentralization and security due to their widespread node distribution and sufficient node numbers. However, they sacrifice some scalability, leading to slower transaction speeds and higher transaction costs: Bitcoin's block time is about 10 minutes, and Ethereum's TPS is around 13, with transaction fees potentially reaching hundreds of dollars during spikes in transaction volume.

It is against this backdrop that modular blockchain technology has emerged, addressing the challenges of traditional public chains in scalability and transaction costs by allocating different functions to specialized modules. For example, Bitcoin's Lightning Network and Ethereum's Rollup technology are both embodiments of modular thinking.

The advantage of modular blockchains lies in their layered architecture, allowing each layer to be optimized for specific needs. The data layer can focus on data storage and validation, while the execution layer can handle smart contract logic. This separation not only enhances performance and efficiency but also promotes interoperability between different blockchains, providing a foundation for building an open and interconnected ecosystem.

In summary, modular blockchain technology offers a new way to address the limitations of traditional public chains. It achieves higher scalability and lower transaction costs while maintaining decentralization and security, which has profound implications for the widespread application and long-term development of blockchain technology.

3. Modular Blockchain Track - Project Analysis

Modular blockchains can be categorized into different types based on their architectural characteristics. Among these types, the data availability layer and consensus layer are often designed as a unified whole due to their close interdependence. This is because when nodes receive transaction data, they typically also determine the order of transactions, which is core to the security and immutability of the blockchain.

Based on this design principle, we can understand the different projects of modular blockchains from three aspects: execution layer, data availability layer and consensus layer, and settlement layer.

3.1 Execution Layer

Layer 2 technology, as an extension of the execution layer in blockchain architecture, embodies the concept of modular blockchains. It aims to enhance the scalability of the main chain by building off-chain networks, systems, or technologies on top of the underlying blockchain.

Layer 2 solutions allow for faster and more cost-effective transaction processing while maintaining the security and decentralization characteristics of the underlying blockchain. According to a Dune dashboard created by @0xning, the gas consumption for Layer 2 verification and settlement on the Ethereum ecosystem averages below 10%, significantly saving users' transaction costs.

Source: https://dune.com/0xning/ethereum-gas-war

Rollup technology is currently the most mainstream solution for Layer 2, with its core idea being "off-chain execution, on-chain verification," where computations and other tasks are executed off-chain, and then the calldata is uploaded back to the main network.

Off-chain Execution

In the Rollup model, transactions are executed off-chain, while the underlying blockchain is only responsible for verifying transaction proofs in smart contracts and storing the original transaction data. This design significantly reduces the computational burden on the main chain and decreases storage requirements, allowing for more efficient transaction processing.

To further reduce costs, Rollup employs transaction bundling technology. This can be likened to cargo consolidation in logistics; sending each piece of cargo separately incurs high shipping costs. Rollup technology reduces the cost of each transaction by bundling multiple transactions together, requiring only one "shipment."

On-chain Verification

On-chain verification is crucial for the security of Layer 2 networks. Layer 2 networks must provide cryptographic proofs to resolve potential discrepancies on the underlying blockchain. Currently, two mainstream proof mechanisms are fraud proofs and validity proofs, which support Optimistic Rollups and ZK Rollups, respectively.

Fraud Proofs of Optimistic Rollups

Optimistic Rollups adopt an optimistic assumption that all transactions are valid by default unless there is clear evidence of an error. This model relies on fraud proofs during a challenge period, where any network participant can submit proof to challenge the state of the smart contract, ensuring fairness and transparency in the network.

According to data from L2BEAT, there are currently 16 Layer 2s using the Optimistic Rollups mechanism, such as Arbitrum, OP, Base, Blast, etc.

Source: l2beat.com

Validity Proofs of ZK Rollups

In contrast to Optimistic Rollups, ZK Rollups take a more cautious approach, requiring all transactions to undergo validity proofs before being accepted. This proof mechanism is akin to a verification process, ensuring that every transaction and computation within the Layer 2 network is accurate. In short, validity proofs are the cornerstone of ZK-Rollups, requiring each batch of transactions to be accompanied by corresponding proofs, ensuring that the smart contracts on the underlying blockchain can verify and approve state changes. For validating nodes, ZK Rollups provide a zero-error settlement mechanism, as every transaction must pass rigorous validity verification.

According to data from L2BEAT, there are currently 11 Layer 2s using the ZK Rollups mechanism, such as Linea, Starknet, zkSync, etc.

Source: l2beat.com

3.2 Data Availability Layer and Consensus Layer

3.2.1 Celestia

Celestia, as a pioneer in the modular blockchain field, is essentially a data availability layer that provides a solid foundation for the development of dApps and Rollups. By deploying on Celestia's data availability and consensus layers, application developers can focus on optimizing execution logic while leaving the complexities of data availability and consensus mechanisms to Celestia.

Celestia's architectural design offers diverse solutions for modular scaling, primarily consisting of the following three types:

  1. Sovereign Rollup: Celestia provides the data availability and consensus layers, while the settlement and execution layers are independently implemented by their respective sovereign chains.

  2. Settlement Rollup (e.g., Cevmos project): On the basis of the DA and consensus layers provided by Celestia, Cevmos offers settlement layer services, while the application chain takes on the role of the execution layer.

  3. Celestium: The data availability layer is managed by Celestia, while the consensus and settlement layers rely on Ethereum's robust network, allowing the application chain to continue focusing on the execution layer.

Celestia employs several innovative technologies that significantly reduce data storage costs and optimize storage efficiency.

Erasure Coding Technology

One of Celestia's innovations is the application of Erasure Codes. In a paper co-authored by Mustafa Albasan (one of Celestia's founders) and Vitalik Buterin titled "Data Availability Sampling and Fraud Proofs," a new architectural idea is proposed where full nodes are responsible for block production, while light nodes handle block verification. The erasure coding technology introduces redundancy during data transmission, ensuring that even with up to 50% data loss, the original data block can be fully recovered.

This mechanism means that to ensure 100% availability of block data, block producers only need to publish 50% of the block data to the network. If there are malicious producers attempting to tamper with 1% of the block data, they would actually need to tamper with the entire 50% of the data, significantly increasing the cost of wrongdoing.

Data Availability Sampling

Celestia addresses the scalability issue of blockchains by introducing Data Availability Sampling (DAS) technology. The workflow of DAS includes the following key steps:

  1. Random Sampling: Light nodes perform multiple rounds of random sampling on block data, requesting only a small portion of the block data each time.

  2. Gradually Increasing Confidence: As light nodes complete more rounds of sampling, their confidence in data availability gradually increases.

  3. Reaching Confidence Threshold: Once light nodes achieve a preset confidence level (e.g., 99%) through sampling, they consider the data of that block to be available.

This mechanism allows light nodes to verify the availability of block data without downloading the entire block data, ensuring the integrity and availability of blockchain data. Celestia focuses on providing data availability rather than executing states, which enhances block production rates, allowing each block to have more space for additional sampling data, thus significantly increasing TPS (transactions per second).

3.2.2 EigenLayer

EigenDA is a secure, high-throughput, and decentralized data availability service, and it is the first active verification service (AVS) launched on EigenLayer. AVS can be understood as node operators, selected from thousands of node operators on Ethereum, who take on additional work (serving networks like rollups that require consensus verification) on top of their primary responsibilities (responsible for Ethereum consensus verification) to earn extra income. With the increasing amount of staked Ethereum and more AVS joining the EigenLayer ecosystem in the future, Rollups can achieve lower transaction costs and higher security composability within the EigenLayer ecosystem.

EigenLayer is a restaking protocol based on Ethereum that utilizes stakers from the Ethereum consensus layer as validators, leveraging part of Ethereum's security to avoid the trust risks of centralized service providers or proprietary tokens, thereby lowering the development threshold for other projects. It also enhances Ethereum's trust network, increasing Ethereum's value and influence.

In terms of architecture, EigenDA uses ZK technology to verify state data submitted by Layer 2, with the EigenDA network, secured by Restaking ETH, responsible for final determinism. Ultimately, the state data submitted by Layer 2 is recorded on the Ethereum mainnet. Therefore, EigenDA acts as a subcontractor for the verification and final determinism segments of Ethereum's DA service, rather than a competitor like Celestia.

3.2.3 Avail

Avail is a modular blockchain project announced by the Polygon team in June 2023, having split from Polygon in March of this year to operate as an independent entity. Currently, Avail is running on a testnet and has recently completed a $43 million Series A funding round, co-led by Dragonfly and Cyber Fund.

The core architecture of Avail consists of three main components: Avail DA, Avail Nexus, and Avail Fusion. Avail DA is a modular data availability layer that, like Celestia, provides DA services for various blockchains. Avail Nexus is a standardized cross-chain messaging protocol, similar to Cosmos's IBC protocol, providing interoperability between different chains. Avail Fusion introduces multi-asset staking POS consensus, aiming to provide secure consensus assurance for the entire Avail network.

In terms of technology, Avail DA uses Kate polynomial commitments to avoid fraud proofs and does not require the assumption that most nodes are honest, nor does it rely on full nodes to obtain data availability. This differs fundamentally from Celestia's architecture, which is based on fraud proofs.

With the emergence of modular data availability blockchain projects like Celestia and Avail, the modular DA War is expected to intensify, and Ethereum's functionality as a DA layer may be diverted, likely leading to a competitive landscape characterized by "one strong and many strong."

3.3 Settlement Layer

3.3.1 Dymension

Dymension is a modular blockchain platform based on Cosmos that provides a streamlined framework for developing RollApps through built-in scalability aggregation technology. In Dymension's architecture, developers can focus on implementing business logic, quickly deploying Rollups tailored to specific applications using the Rollup Development Kit (RDK) and dedicated settlement layers.

Dymension's architecture consists of two core components: RollApp and Dymension Hub.

RollApp is a fusion of Rollup and App, serving as a high-performance modular blockchain dedicated to specific applications on Dymension. RollApp can take various forms, including but not limited to DeFi platforms, Web3 games, and NFT marketplaces as dedicated Layer 2 solutions for decentralized applications.

In RollApp, the sequencer plays a key role, responsible for validating, ordering, and processing local transactions. After packaging the block, this data is passed to peer full nodes and published on the RollApp's chosen data availability network, such as Celestia. Upon receiving a response from Celestia, the sequencer sends its state root to Dymension Hub for consensus formation and settlement.

Dymension Hub serves as the center of the entire ecosystem, fulfilling the functions of the consensus layer and settlement layer. It receives state roots from RollApp, providing final transaction confirmation and settlement services for RollApps.

Through this design, Rollups can delegate consensus and settlement tasks to Dymension Hub while entrusting data storage and verification tasks to DA networks like Celestia. This way, Rollups can share the economic security guarantees of both networks while focusing on enhancing the execution efficiency and user experience of the applications themselves.

3.3.2 Cevmos

Cevmos combines the names Celestia, EVMos, and CosmOS, aiming to provide a settlement layer for EVM-compatible rollups.

Since Cevmos itself is a rollup, all rollups built on it are collectively referred to as settlement rollups. Each rollup achieves the redeployment of existing rollup contracts and applications on Ethereum through a minimized bidirectional trust bridge with the Cevmos rollup, reducing migration workload. Rollups on Cevmos will publish data to Cevmos, which then processes the data in batches before publishing it to Celestia. Like Ethereum, Cevmos will execute rollup proofs as a settlement layer.

4. Modular Blockchains in the Bitcoin Ecosystem

With the wealth effect brought by the Ordinals protocol and the approval of Bitcoin ETFs, multiple favorable factors have converged to inject new vitality into the Bitcoin ecosystem. Market attention has quickly shifted to the Bitcoin ecosystem, with institutional investors pouring funds into this area, demonstrating confidence and expectations for the future development of the Bitcoin ecosystem.

In this context, Bitcoin Layer 2 technology is flourishing, with numerous technical solutions emerging, forming a diverse and vibrant technological ecosystem. Various innovative solutions are coming to the fore, collectively driving the expansion and optimization of the Bitcoin network.

Although there is currently no unified consensus on the precise definition of Bitcoin Layer 2 in the industry, this article will draw on the modular blockchain concepts of Ethereum to explore the possibilities and methods of building Bitcoin Layer 2 from a modular perspective.

4.1 Why Does Bitcoin Need Modularity?

The Ethereum network is renowned for its Turing-complete smart contract capabilities, which can store and verify historical states, thus supporting complex decentralized applications (DApps). In contrast, the Bitcoin network is a stateless non-smart contract network, and its system design imperfections stem mainly from two aspects:

1. Limitations of the UTXO Account System

In the blockchain world, there are primarily two ways to record and store data: account/balance models and UTXO models. Bitcoin adopts the UTXO model, which sharply contrasts with the account/balance model used by Ethereum.

In the Bitcoin system, although users see account balances in their wallets, the Bitcoin system designed by Satoshi Nakamoto does not actually include the concept of balance. The so-called "Bitcoin balance" is actually a concept derived by wallet applications based on UTXO. UTXO stands for Unspent Transaction Output, which is central to the generation and validation of Bitcoin transactions. Each Bitcoin transaction consists of inputs and outputs, where each transaction consumes one or more inputs and generates new outputs. These newly generated outputs then become new UTXOs, waiting to be consumed in future transactions.

As a minimalist asset transfer and settlement technology architecture, the UTXO model is difficult to scale to support complex functions like smart contracts.

2. Non-Turing Complete Script Language

Bitcoin's script language does not support all types of computation, as it lacks loops and conditional control statements, making it non-Turing complete. While this feature helps reduce hacking attacks and enhances network security, it also limits Bitcoin's ability to execute complex smart contracts.

Due to the imperfections in Bitcoin's system design, it needs to rely on external modular extensions for more complex functions, making Bitcoin's need for modularity undoubtedly more urgent than Ethereum's. The functions of execution layer, data availability layer, consensus layer, and cross-chain interoperability layer in its ecosystem all require modular encapsulation and expansion.

4.2 Modular Project Analysis in the Bitcoin Ecosystem

4.2.1 Execution Layer - Bitcoin Layer 2

Merlin

Currently, in the Bitcoin Layer 2 track, Merlin Chain has the highest TVL, reaching billions of dollars, making it one of the most attention-grabbing projects in the Bitcoin ecosystem. As a Bitcoin Layer 2 network, Merlin Chain supports various native Bitcoin assets while also being EVM compatible, showcasing its dual focus on both the Bitcoin and Ethereum ecosystems.

Source: https://defillama.com/chain/Merlin

Merlin's functionalities revolve around ZK-Rollup networks, decentralized oracle networks, and on-chain anti-fraud mechanisms.

ZK-Rollup Network

The core of ZK-Rollups lies in the use of zero-knowledge proofs. Zero-knowledge proofs, as a cryptographic method, allow one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any information other than the fact that the statement is true.

Merlin Chain processes and computes transactions off-chain, avoiding high transaction fees and network congestion on the Bitcoin network. At the same time, ZK-Rollup can compress multiple transaction proofs into batches, allowing the Bitcoin main chain to only verify a single proof that packages multiple transactions, significantly reducing the workload on the main chain and improving transaction efficiency.

Decentralized Oracle Network

Merlin's decentralized oracle network acts as a DAC (Data Availability Committee) to check and ensure that the sequencer has truthfully published the complete DA data off-chain. The decentralization of the oracle network is achieved through a POS mechanism, where anyone can run an oracle node by staking sufficient assets. This staking mechanism is highly flexible, supporting assets like BTC and MERL, as well as proxy staking similar to Lido.

On-chain Anti-fraud

Merlin introduces the concept of BitVM, similarly adopting an "optimistic ZK-Rollup" mechanism, which can be simply understood as initially assuming that all ZK proofs are trustworthy, and only punishing the operator in case of errors. Since verification occurs on the Bitcoin mainnet, it is technically limited to fully verifying ZK proofs on the Bitcoin chain, only allowing verification of specific computational steps of ZK proofs in special cases. Therefore, users can only point out that a specific computational step in the ZKP off-chain verification process is erroneous and challenge it through fraud proofs.

4.2.2 Data Availability Layer & Consensus Layer

B² Network

B² Network adopts a modular design, with the Rollup layer (ZK-Rollup) responsible for execution, the data availability layer (B² Hub) responsible for data storage, and B² Nodes conducting off-chain verification, with the final settlement layer being the Bitcoin mainnet.

The ZK-Rollup layer of B² Network employs zkEVM solutions, responsible for executing user transactions within the Layer 2 network and outputting related proofs. The Rollup layer is responsible for submitting and processing user transactions, while the DA layer stores copies of aggregated data and verifies related zero-knowledge proofs.

Source: https://docs.bsquared.network

B² Hub is a DA network built off-chain that supports data sampling functionality and is regarded as a pioneer in modular Bitcoin scaling solutions. B² Hub draws on Celestia's design philosophy, introducing data sampling and erasure coding technologies to ensure that new data can be quickly distributed to numerous external nodes while minimizing the risk of data withholding. Additionally, the Committer in B² Hub uploads the storage index and data hash of DA data to the Bitcoin chain for public access.

Source: https://blog.bsquared.network

According to B² Network's future plans, the EVM-compatible B² Hub is expected to become the off-chain verification layer and DA layer for multiple Bitcoin Layer 2s, forming a functional extension layer off-chain for Bitcoin. Given that Bitcoin itself cannot support many application scenarios, building functional extension layers off-chain will become an increasingly common phenomenon in the Layer 2 ecosystem.

As the first third-party DA layer for modular Bitcoin, B² Hub can help other Bitcoin Layer 2s utilize the Bitcoin main chain as the final settlement layer and inherit Bitcoin's security, promoting the expansion of the Bitcoin network and enhancing the diversity of its applications.

5. Conclusion

The slogan "Modular is the future" is gradually transforming from a concept into reality. Modular blockchain technology, with its flexibility and scalability, provides a solid foundation for building the next generation of decentralized applications. This technology allows developers to select and combine different modules based on specific needs, creating more efficient, secure, and maintainable blockchain solutions.

The rise of modular blockchains represents a more "soulful" approach to pluggable products. In this approach, blockchains are no longer seen as closed systems but as open, extensible platforms where various services and functions can be easily inserted and removed like Lego blocks. This flexibility enables developers to quickly build and deploy blockchain solutions based on the specific needs of application scenarios.

Originating from the Ethereum ecosystem and now emerging in the Bitcoin ecosystem, modular technology has already made its mark across various tracks in the cryptocurrency industry. For example, the modular public chain Chromia, which employs "relational database" technology, has collaborated with several games in the gaming sector, such as My Neighbor Alice and Chain of Alliance; in the RWA track, Chromia has created the Ledger Digital Asset Protocol, which has been adopted by several projects. In the AI field, CARV focuses on building a modular data layer for AI and Web3 games, ensuring privacy and security in data processing through technologies like trusted execution environments (TEE) and zero-knowledge proofs.

As modular blockchain technology continues to mature and expand its application areas, we have reason to believe that this technology will bring more innovative possibilities to various industries. From the birth of Bitcoin to the widespread application of modular blockchains today, we have witnessed how blockchain technology has evolved from a single digital currency application to an ecosystem supporting complex and diverse applications. In the future, modular blockchains will continue to drive technological advancement, laying the groundwork for building a more open, flexible, and secure digital world.

References:

【1】https://www.panewslab.com/zh/articledetails/qn9zbgmj.html

【2】https://www.chaincatcher.com/article/2115788

【3】https://celestia.org/what-is-celestia/

【4】https://paragraph.xyz/@tokensightxyz/eigenda-a-cryptoeconomic-analysis

【5】https://research.web3caff.com/zh/archives/14476?ref=1\&ref=852

【6】https://docs.bsquared.network/architecture

【7】https://web3caff.com/zh/archives/89022

【8】https://blog.chain.link/blockchain-scalability-approaches-zh/#post-title

【9】https://web3caff.com/zh/archives/33958

【10】https://web3caff.com/zh/archives/90232

【11】https://www.theblockbeats.info/news/50536

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators