Ethereum, Solana, Avalanche, Cardano — many of us are well aware of the prominent Layer 1 blockchains currently in existence. Most of us are also familiar with the concept of Layer 2 scaling solutions such as Arbitrum and Optimism. However, when it comes to describing the core functions that each blockchain performs, maybe not so much.
This article has two purposes. First, it will break down in simple terms the core functions of a blockchain. By the end of this section, you will understand the distinction between a monolithic and modular blockchain, and it will be clear what role familiar terms such as Layer 2s perform in this context. Second, it will expand upon the concept of modular blockchains, which are rapidly gaining in popularity and application. By the end of this article, you will have the building blocks to effectively analyze and understand the purpose and structure of nearly any blockchain that you come across.
The Core Functions of a Blockchain
There are various ways to compartmentalize the working parts of a blockchain (called layers or modules). The following is a common way to break down the layers:
- Execution: Transactions are executed and processed on this layer. Users typically interact here by signing transactions, deploying smart contracts, and transferring assets. Layer 2s (such as rollups) are examples of blockchains specializing in the “execution” layer.
- Settlement: Serves multiple purposes for rollups (or any rollup-type construction), including as a place for rollups to publish their transactions for external verification. Additionally serves as a hub to facilitate bridging between other execution layers (instead of needing all rollups to have a bridge between each other). However, this layer is technically optional as it is not necessary for an execution layer to deploy onto a settlement layer — it could instead deploy directly onto a consensus and data availability layer.
- Consensus: Responsible for providing the order and finality of transactions via consensus mechanisms such as proof-of-work (PoW) and proof-of-stake (PoS).
- Data Availability: Ensures that transaction data is available to users on demand.
If it is not immediately clear on first read what each function / layer actually does in practice, do not worry. The important point at this stage is to realize that when thinking about a blockchain, there are various working parts to consider. Each can be viewed separately and plays a role in facilitating the overarching objective of the combined whole.
Understanding Blockchain Design Through Layer 2s
By now, many within the crypto community are familiar with the topic of Layer 2s, sidechains, or other off-chain scaling solutions, in particular with respect to Ethereum (for simplicity, the term “Layer 2” will be used to refer to all such off-chain scaling solutions in this article). These solutions are built on top of or alongside an existing Layer 1, like Ethereum, and serve as a place where transactions and processes can occur independently of the main network. For example, consider Immutable X, which is a popular Layer 2 (utilizing ZK-rollups) focused on scaling NFT transactions on the Ethereum network. Gaming projects such as Gods Unchained and Illuvium that are building on the Immutable X engine are able to take advantage of a much higher throughput (~9,000 transactions per second) than they otherwise would if built on the Layer 1. For popular games that are expected to require thousands of daily transactions, this increased scale is a must, or else face congestion and higher gas fees on the main network.
A Layer 2 like Immutable X specializes in the “execution” layer that was described in the previous section, and is off-loading the settlement, consensus, and data availability functions to others (e.g., the main Ethereum network).
Monolithic v. Modular Blockchains
Let’s now bring the Layer 1 / Layer 2 discussion together as it concerns monolithic and modular blockchains.
A monolithic blockchain is a chain that handles all of the core functions of a blockchain itself within a single, giant architecture. Ethereum (pre-upgrade), Bitcoin, and Solana are some of the current blockchain networks that have a monolithic architecture. While a structure such as this has its benefits (such as being able to enforce its own security), there are also drawbacks, chief among them being scalability. This relationship gives rise to what is more commonly known as the “Scalability Trilemma” — which was coined by Vitalik Buterin and refers to a widely held belief that decentralized networks can only provide two of three benefits at any given time with respect to decentralization, security, and scalability. In other words, there are so many responsibilities and moving parts in a full-featured blockchain that improving one particular aspect could produce counterproductive results in other areas.
In contrast, a modular blockchain is a type of blockchain that specializes in only a few of the core functions rather than all of them. For example, Immutable X focuses on the execution layer and outsources the other functions to others, therefore representing its own modular blockchain. When combined together (i.e., in a stack), modular blockchains perform the same overall functions as a monolithic chain.
The concept of a modular stack was first introduced with Layer 2 solutions such as rollups. However, we are now starting to see the idea being taken even further. Rather than being used to scale existing monolithic chains (e.g., Immutable X scaling Ethereum), what if an entirely new stack of purpose-built modular blockchains can be used to side step monolithic chains altogether? Could a divide-and-conquer approach such as this make the system even more efficient and decentralized than before? Various complexities come into play, but if specialization allows each layer to become more efficient in performing its duties, this idea is obviously something to consider.
Understanding Modular Blockchains
We are still in the very early innings of seeing true modular blockchain stacks go mainstream. However, a lot of innovation is occurring and we may not be as far off as many realize. For an overview of some of the protocols leading the way in terms of innovation in this field, see the image below.
This image is great for understanding what people mean at a high level when they refer to various blockchains performing different functions in a modular stack. For example, although Ethereum is monolithic and capable of performing each of the core functions, it can also be used as just one component in a broader stack. Arbitrum might be used for execution, Celestia for data availability, and Ethereum for settlement/consensus. Since there are always tradeoffs as well as technical complications, it is not as simple as what we are doing here in just stacking the most efficient blockchains and having the best of all worlds, but understanding the potential to layer blockchains is the important part.
Examples of Modular Architecture
At this point, we know that blockchains can be broken down into application-specific chains. For a better understanding of what these stacks can look like in practice, this section will now explore specific examples of modular stacks that exist.
Validiums
Immutable X was mentioned previously in this article as an example of a popular Layer 2 that specializes in execution while off-loading the settlement, consensus, and data availability functions to others. Whereas many Layers 2s (e.g., ZK-rollups) specialize in execution and then utilize the main Ethereum network for the remaining functions, Immutable X is a touch different. Immutable X is technically considered a validium, which is identical to a ZK-rollup except for how data is stored. Unlike ZK-rollups, validiums do not store transaction data on the main Ethereum network and instead use off-chain data availability solutions. Immutable X in particular uses Starkware’s StarkEx to host its transaction data.
So, in this particular modular stack, Immutable X is used for execution, Ethereum for settlement / consensus, and StarkEx for data availability.
This image is great for understanding what people mean at a high level when they refer to various blockchains performing different functions in a modular stack. For example, although Ethereum is monolithic and capable of performing each of the core functions, it can also be used as just one component in a broader stack. Arbitrum might be used for execution, Celestia for data availability, and Ethereum for settlement/consensus. Since there are always tradeoffs as well as technical complications, it is not as simple as what we are doing here in just stacking the most efficient blockchains and having the best of all worlds, but understanding the potential to layer blockchains is the important part.
Celestia
Whereas a validium is a broad term used to classify scaling solutions that move data availability off the Ethereum chain, we will now look at one modular blockchain in particular that is unlocking news ways for developers to stack. This blockchain is Celestia, which specializes in consensus and data availability — i.e., it only orders and publishes transactions without executing them.
At its simplest, if we consider once again how validiums are stacked, Celestia is an example of a modular blockchain that can plug in and serve as the off-chain data availability layer (similar to the role StarkEx plays). Such a stack is aptly called a Celestium (working off the validium namesake).
However, Celestia can additionally serve as a layer for consensus. This potential is noteworthy because blockchains typically bundle the execution and consensus layers, which Celestia decouples.
To better wrap our heads around how execution and consensus are typically intertwined, recall how rollups on Ethereum typically operate. Although rollup transactions are executed outside of the main network, the transaction data still gets posted on Ethereum. In doing so, rollups inherit the consensus and data availability of the main network. Even with validiums where data availability is moved off-chain, Ethereum remains as the base settlement layer — i.e., validiums still post state commitments (and validity proofs) when relaying state updates to the main Ethereum chain.
Why do these execution layers post and settle on Ethereum? There are clear benefits to using Ethereum for consensus / settlement, primarily as it concerns adopting the full security of the network. However, there is a deeper connection going on here. Current rollups on Ethereum post directly to an EVM-based smart contract, also known as a bridge contract. By having an enshrined bridge between rollups and the Ethereum settlement layer, Ethereum rollups are effectively ‘baby chains’ to Ethereum, where each rollup chain is defined by a smart contract on Ethereum. This explanation is a bit of an oversimplification, but the hardcoded connection between rollups and Ethereum’s consensus / settlement layers is the thing to note.
In the full Celestia model where Celestia serves as both the consensus and data availability layers for a stack, there would be no such enshrined bridge between the base Celestia layer and any rollup. Instead, rollups would post their blocks directly onto Celestia as raw data and settlement would occur at the rollup level (eliminating the need for a separate settlement layer like Ethereum). Although a separate settlement layer would be required with trust-minimized bridging between layers (relevant to Ethereum Layer 2s given the enshrined bridge described previously), this is not the case with independent chains or rollups, which can do fraud or validity proving internally (essentially like Layer 1s). Celestia calls these types of rollups “sovereign rollups” since they are independent and do not rely on smart contracts.
As a recap, in this stack, Celestia serves as the consensus and data availability layers, and a separate sovereign rollup conducts execution and settlement. It should be noted that sovereign rollups can also use Ethereum as a data availability layer, but compared to using a “pure” data availability layer like Celestia, there is more overhead to consider (e.g., the sovereign rollups on Ethereum would have to take interest in the state validity of Ethereum’s enshrined settlement environment).
And More…
While we are on the topic of Celestia, it makes sense to round out the discussion on modular architecture with a brief highlight of one more creative example of a modular stack offered by their team (for reference, the CEO / co-founder of Celestia is Mustafa Al-Bassam).
In this stack, Celestia is once again used for consensus and data availability, and Ethereum rollups are used for execution. The difference here lies in there being a separate “settlement” layer. As noted previously, rollups on Ethereum currently use the Ethereum main chain for settlement. However, because the main Ethereum network is shared with non-rollup applications that use the chain directly, it is not an ideal settlement layer for rollups since this added activity creates congestion. What is therefore proposed by Celestia is a specialized settlement layer just for EVM (Ethereum)-based applications to use, which should theoretically increase scale.
This unique modular stack is called Cevmos, named after the interaction and use of the various chains involved (Celestia/Evmos/Cosmos). We will not get into the details of the Evmos and Cosmos chains in this article, but in short, in this new stack Celestia would serve as the data availability and consensus layers, an Evmos-based chain built on the Cosmos SDK would perform settlement, and various Ethereum-based rollups would perform execution. For a more detailed overview of this particular structure, see here. I would recommend the read for those interested in getting into the weeds — there are some interesting details, including the realization that Cevmos itself is a Celestia rollup (i.e., a settlement rollup).
In this section, we introduced various ways that modular blockchains can be stacked — see below which may be helpful in visualizing what was discussed. The list is by no means all-encompassing and in the not-too-distant future we will surely see new and innovative stacks continue to emerge.
Drawbacks of a Modular Blockchain
Although an effective modular blockchain stack may lead to increased scalability for a network, it was noted earlier that there are various tradeoffs to consider. If it were as easy as just plugging in and connecting the most efficient and attractive modular blockchains like LEGO sets, we probably would. But it is not that simple.
For example, consider security. Rollups that post their transaction data on Ethereum inherit the consensus and data availability of the main network, and with it the Ethereum network’s security. There are hundreds of thousands of validators and millions of ETH staked on the Ethereum base layer, making the network extremely safe from potential bad actors. However, this may not be the case for other blockchains providing security in a modular blockchain stack. Consider the recent hack to Ronin, which is an Ethereum-linked sidechain made specifically for the popular play-to-earn game Axie Infinity. Unlike rollups, Ethereum sidechains are independent blockchains with their own means of consensus to secure their network, and therefore do not benefit from Ethereum’s security guarantees.
In the case of the Ronin hack, in total about $622 million worth of Ethereum and USDC was drained from the bridge that connects Ronin to Ethereum’s main network. While the Ronin sidechain has nine validators requiring five signatures for withdrawals and is meant to protect against these types of attacks, an attacker somehow found a backdoor exploit and was able to sign transactions from five of the validators. Although the sidechain has since made an effort to boost security, the tradeoff between security and scalability is made clear in this instance, this time in the context of cross-chain applications. Once again, the “Scalability Trilemma” rears its head, even in the context of modular chains.
Conclusion
The thesis behind a modular blockchain is relatively simple — by separating a blockchain into its core components, we can improve each individual layer and make a more efficient and decentralized system in the aggregate.
It is clear we are currently evolving away from monolithic models and toward modular, application-specific chains. However, the verdict is still out on which particular solutions and structures end up catching on long-term, and whether those solutions can be implemented in a way that does not compromise security and/or other tradeoffs. Even Vitalik Buterin, co-founder of Ethereum, has pondered the question in Endgame. While recognizing there are many paths that can lead to a scalable and secure long-term blockchain ecosystem, Vitalik posits that all paths seem to be building toward similar futures where block production is centralized, block validation is trustless and highly decentralized, and censorship is still prevented. If you have not already, I would recommend checking the article out.
No matter the ultimate path, modular blockchains will surely play a pivotal role, and I hope this article has provided a solid introduction to the world of possibilities that are out there.
All Comments