Blockchains like Bitcoin and Ethereum perform various functions, such as executing transactions, guaranteeing transactional finality, maintaining consensus, and making transaction data available.
But what if a blockchain was only responsible for performing one function and not all four?
This is where the concept of a modular blockchain comes into play.
What is a Modular Blockchain?
A modular blockchain is a blockchain that specializes in a specific function and outsources the remaining tasks to other blockchains. It may specialize as an execution layer, consensus layer, data availability layer, or settlement layer.
The concept of modular blockchains has gained popularity over the years as layer-one (L1) blockchains look to scale. Monolithic blockchains like Ethereum are scaling in a modular way with the introduction of rollups.
Rollups are execution layers where transactions are processed away from the main L1 chain. The L1 chain is used as a data availability layer by the rollup to submit transaction data, which can be used by anyone to verify the validity of transactions executed on the rollup chain.
Monolithic Blockchain Explained
A monolithic blockchain is a one-piece blockchain that carries out all the primary functions (consensus, data availability, execution, and settlement) required of a blockchain. The first generation of public cryptocurrency blockchains, including Bitcoin and Ethereum, are monolithic blockchains.
Here is an example of how a monolithic L1 blockchain functions.
A block producer called “miner” in proof-of-work (PoW) blockchains or “validator” in proof-of-stake (PoS) blockchains takes transactions from a mempool to create a new block. The new block is broadcast to the entire network to be approved.
Nodes download the transaction data from the proposed block and check the validity until consensus is met. Once the block is approved, transactions in the block are declared final.
In the above-mentioned example, block creators and nodes of the L1 blockchain did all the work required to execute, validate, finalize, and secure transactions.
Types of Modular Blockchains
Modular blockchains differ from each other based on their function. Here are the four types of modular blockchains:
- Execution: These blockchains are designed to process and execute transactions. Users can deploy and interact with smart contracts.
- Data availability: The primary function of these modular blockchains is to store transactional data for other blockchains and guarantee the availability of historical data when called upon.
- Consensus: The consensus layer consists of a network of full nodes that download and validate transactional data from blocks to reach a consensus on the validity of the state of the block.
- Settlement: A modular blockchain that specializes in settlement will verify transactions, order the blocks, verify transactions, and settle disputes.
Advantages of Modular Blockchains
The rationale behind using modular blockchains is to sidestep the problems of rising hardware expenses, centralization risks, and limited growth that blockchain networks encounter while scaling. Modular blockchains also provide other benefits, such as flexibility and sovereignty.
Let’s go through them in detail.
Scalability
Blockchain scalability is limited by the “blockchain trilemma,” which states that a blockchain can achieve only two of three qualities: decentralization, security, and scalability. In most cases, decentralization and security are given priority, leaving the blockchain network with low throughput and high transaction fees (e.g., Ethereum).
A blockchain can gain higher throughput by increasing its block size, which allows more transactions to be included in a single block. However, increasing block size results in nodes having to upgrade their storage hardware to accommodate the increase in data. The rise in hardware data leads to higher barriers for node operators, ultimately leading to centralization risks.
Today, L1 blockchains like Ethereum are scaling using a modular execution layer where transactions are processed and executed off-chain. This process lowers the computation burden from the L1 nodes. Modern blockchains may also rely on other chains for data availability, just like rollups depend on the Ethereum L1 to store transaction data.
Sovereignty
Modularity allows developers to easily create blockchains with their own set of rules. For example, if you create a layer-two (L2) chain on Ethereum, there will be several rules that you will have to adhere to, like writing your code in the Solidity programming language.
Flexibility
Using a modular blockchain stack, developers can leverage other chains to take care of functions that the developer does not want to focus on. With modular blockchains, developers will get higher control over what they want their blockchain to prioritize (scalability, decentralization, or security).
For example, if a developer wants to build an app chain for a decentralized exchange (DEX), they can focus on building the execution layer that handles transaction and smart contract execution. This chain will not have to bootstrap to build a network of nodes and validators to protect the chain.
They can simply plug into a mature data availability and consensus blockchain to share security.
Shared Security
As mentioned above, bootstrapping a validator set is one of the biggest challenges for a new blockchain. However, with a modular blockchain stack, a chain can leverage the security of a mature consensus and data availability blockchain.
An advantage of shared security is that blockchains that are connected to a common data availability layer can interact with each other easily via bridges.
Disadvantages of Modular Blockchains
Modular blockchains are not perfect. Some trade-offs come into play when choosing a modular setup over a monolithic one.
Security
Security is the biggest concern for modular chains. If a highly secure consensus and data availability layer (preferably with a large set of validators) is not available, the modular chain has a high chance of failure.
Moreover, modular blockchains are not as tried-and-tested as monolithic blockchains like Bitcoin and Ethereum.
System complexity
Modular blockchain setups are complicated due to the need for advanced mechanisms such as data availability sampling. Furthermore, execution layers on modular setups use complex mechanisms like fraud proofs and validity proofs to secure transactions.
In contrast, monolithic blockchains are less complex due to their single-system architecture.
Application composability
Decentralized applications (dApps) built on top of modular blockchains may face inefficiencies and security vulnerabilities as transactions on such blockchains pass through various systems.
Developer ease
Developers may find modular blockchains difficult to work on compared to monolithic crypto blockchains, which have existed for over a decade.
Modular blockchains are new, therefore, developers may be required to learn a new language to build such a setup.
Examples of Modular Blockchains
Rollups
Rollups are blockchains that process and execute transactions off-chain before submitting the transaction data with fraud/validity proofs to the parent chain. Ethereum is undergoing a rollup-centric roadmap, where it will use rollups to achieve higher scalability. Ethereum will become a semi-modular blockchain in the future.
E.g., Optimism and Arbitirum.
Validium
Validiums are similar to rollups. They process transactions off-chain, but they only submit the validity proof to the parent chain. Unlike rollups, validiums do not store transaction data on the parent chain. Instead, validiums employ a network of proof-of-stake validators to store the data off-chain. As the data is not stored on the parent chain, gas fees on valiums are lower than those on rollups.
E.g., StarkEx.
Sovereign Rollups
A sovereign rollup is a rollup that does not depend on the parent L1 chain to settle transactions. This blockchain will publish its transactions to another chain for ordering and data availability but will depend on its nodes to determine whether the transactions are correct. Sovereign rollups can upgrade through forks like L1 blockchains. A disagreement between nodes could result in the split of the chain.
E.g., Celestia.