Exploring Blockchain Layers and Scaling Issues
In my previous post covering blockchain architecture, we gained insight into the various layers that constitute a blockchain. These layers include the hardware infrastructure, data management, network connectivity, consensus protocols, and the application layer. Each layer possesses a distinct function, ranging from data storage and network maintenance to ensuring consensus within the system. It is these layers that form a complete blockchain.
Towards the conclusion of my previous post, we talked about the challenges of scalability faced by blockchain technology itself. This challenge is commonly referred to as the "Blockchain Trilemma," a concept that examines the balance among decentralization, security, and scalability within a blockchain network. The idea is that achieving all three of these attributes simultaneously is extremely difficult, as attaining one often comes at the expense of the others.
Current strategies to address this “Blockchain Trilemma” involve optimizing the architectural layers mentioned thus far, with the objective of establishing a more efficient and more cost-efficient network.
The solutions aimed at addressing scalability are categorized into four layers: layer 0 through layer 3. These solutions exist to overcome the challenges posed by the “Blockchain Trilemma” as different types of layers play a role in enhancing the overall functionality and scalability of Blockchain technology.
In this post, I’d like to explore these layers in detail. Lets dive in…
Layer 0: The Foundational Layer
At the heart of any blockchain ecosystem lies Layer 0, a fundamental pillar that provides the bedrock for the entire architecture. It is this Layer 0 foundation that empowers the operation of well-known platforms like Bitcoin and Ethereum. This foundational layer facilitates inter-chain operability, enabling seamless communication between various layers while furnishing the essential groundwork for the blockchain's functionality. Layer 0 can be thought of as the operating system of your computer, in simple terms. Just as an OS manages the hardware components and enables application execution, Layer-0 governs the transmission, validation, and storage of data across blockchains. Similar to software applications sitting on top of an OS, Layer-1 protocols offer specific functionalities, which we'll cover in the following section.
Layer-0 blockchains tackle issues surrounding cross-chain interoperability. For example, if a user wants to transition from the Bitcoin network to the Ethereum ecosystem, they must sell off their bitcoin to obtain a network-capable token in order to enter the ETH ecosystem.
How does Layer 0 work?
Layer 0 aims to resolve the "Blockchain Trilemma" by assigning primary responsibilities for three functions to different side-chains within the Layer-0 protocol. While various Layer-0 solutions have distinct designs, they generally consist of three main components:
Mainnet: The mainnet serves as the primary location for storing data from different Layer-1s built upon it.
Sidechains: This layer encompasses independent Layer-1 blockchains featuring their own consensus mechanisms and validator nodes. More on this can be read here.
Cross-chain Protocol: This allows for different blockchains to securely and trustlessly communicate and exchange assets and information.
Examples of Layer 0:
Polkadot: Polkadot is built to connect private and consortium chains, public and permissionless networks, oracles, and future technologies that are yet to be created. Polkadot facilitates an internet where independent blockchains can exchange information and transactions in a trustless way via the Polkadot relay chain.
Avalanche: Avalanche is an open-source platform for building decentralized applications in one interoperable, decentralized, and highly scalable ecosystem. Powered by a uniquely powerful consensus mechanism, Avalanche is the first ecosystem designed to accommodate the scale of global finance, with near-instant transaction finality.
Cosmos: Cosmos is an inter-chain ecosystem where blockchains can scale and interoperate with each other instead of the one-chain rule them all strategy adopted by many protocols. More than a simple product or blockchain, Cosmos is a whole ecosystem of tools to build inter-operable application-specific chains, among which the Cosmos Software Development Kit (SDK), Tendermint, the Inter-Blockchain Communication protocol (IBC), and Cosmos Hub are the main components.
Layer 1: The Application Layer
Layer 1 blockchains are the most recognizable type, familiar to many. Essentially, they form the foundation for dApps, protocols, and networks to be built upon. These networks represent the primary source of truth and are responsible for finalizing transactions. For most networks, this involves managing user accounts or wallets through private keys and their associated cryptocurrency or token balances. This management is carried out via the network's consensus mechanism, with various mechanisms, such as proof of work (PoW) and proof of stake (PoS), offering different levels of speed, security, and throughput. Choosing the right consensus mechanism depends on the balance between security, scalability, and decentralization.
How does Layer 1 work?
Layer 1 networks oversee the settlement of transactions and the oversight of user wallets using distinctive key pairs. They monitor balances of cryptocurrencies or tokens. Typically, a native token is tied to layer 1 networks, granting access to network resources and enabling services like cryptocurrency transfers, token creation, and execution of smart contracts. While all layer 1 networks handle transactions, the specific range of services they provide can vary.
Examples of Layer 1:
Bitcoin: This is the largest and most renowned layer 1 network, currently boasting a market capitalization of $567Bn, relies on a proof-of-work consensus mechanism. This mechanism validates new blocks by solving cryptographic puzzles.
Ethereum: This stands as the second-largest layer 1 network. It introduced the concept of smart contracts, making it more versatile than a mere cryptocurrency platform. Smart contracts are self-executing programs that verify transactions based on predefined conditions. Originally employing proof of work, Ethereum has recently shifted to a proof-of-stake validation method in an effort to reduce its energy consumption.
Layer 2: Scaling Solutions
Layer 2 is a collective term for solutions designed to help scale an application by handling transactions off the Ethereum Mainnet (Layer 1), all while leveraging the security model of the Mainnet. The role of this layer is to enhance the scalability of the Layer 1 while preserving its security. For example, on Ethereum, where gas fees can vary greatly and transaction times can be slow, it's becoming increasingly common for application developers to offer their users the ability to interact with a Layer 2 network, such as Polygon. This interaction allows users to reduce their fees and transaction latency.
How does Layer 2 work?
Generally speaking, transactions are submitted to these layer 2 nodes instead of being submitted directly to layer 1 (Mainnet). For some solutions the layer 2 instance then batches them into groups before anchoring them to layer 1, after which they are secured by layer 1 and cannot be altered. The details of how this is done vary significantly between different layer 2 technologies and implementations.
Types of Layer 2 Solutions?
Rollups, at a high level, combine off-chain transactions into groups and then publish these groups onto the main blockchain. A single rollup could encompass thousands of transactions grouped together, thereby reducing the processing burden on the main blockchain. Consequently, the main blockchain experiences significantly improved throughput, leading to enhanced scalability. Additionally, rollups capitalize on the security of the main blockchain, like Ethereum in this case, ensuring transaction finality.
Side-chains, on the other hand, are separate blockchain networks that connect to another blockchain through a two-way bridge. They essentially function as secondary blockchains operating in parallel to a main chain, such as Bitcoin or Ethereum in this context.
Examples of Layer 2 Solutions:
Arbitrum: Arbitrum is a layer 2 solution that improves Ethereum smart contracts by boosting speed, scalability, and privacy. It allows unmodified Ethereum contracts and transactions to run on a second layer, benefiting from Ethereum's security. It addresses current smart contract issues like inefficiency and high costs. Arbitrum employs transaction rollups, batching transactions on Ethereum's main chain, executing them on a cost-effective layer 2 sidechain. This eases Ethereum's computational burden and enables advanced layer 2-based dApps.
zkSync: ZkSync is a widely adopted scaling technology for Ethereum that employs innovative methods. It combines zero-knowledge proofs (zk-Proofs) and smart contracts (rollups) to enhance scalability. Smart contracts bundle transactions into single transactions off the main layer. Zk-Proofs offer strong security, validating transactions without exposing detailed information.
Layer 3: Hyper Scaling
So far, we have uncovered that Layer 1s represent the foundational blockchains, such as Bitcoin and Ethereum. On the other hand, Layer 2s are constructed on top of Layer 1s with the intention of enhancing transaction speed and addressing the scaling challenges faced by Layer 1s. This is achieved while capitalizing on the security features of the underlying blockchain.
Arbitrum, serving as a prime example, was developed to enhance Ethereum's transaction processing speed, overall flexibility, and scalability. It achieves this by collecting transaction data, resolving it on the Arbitrum rollup chain, and subsequently reintegrating the transaction data into the Ethereum blockchain.
Moving on to Layer 3s, they provide even greater levels of customizability. Within this layer, developers can execute tailored designs that are not easily attainable through L2s. This is particularly advantageous for executing lower-cost operations and incorporating privacy-preserving functionalities. The evolution of Layer 3 solutions is a work in progress, with the blockchain industry enthusiastically exploring the potential benefits and applications of this innovative concept.
However, a primary challenge lies in the absence of standardization. Given that L3s are built upon L2s, they necessitate standardized infrastructure for optimal functioning. The absence of this may very well impede L3s from realizing their full potential.
Closing Remarks
Scalability has consistently been a pain point for blockchain users. While some progress has been made in expanding blockchain protocols, the demand for cryptocurrencies continues to rise.
A solid understanding of the layers of blockchain and how each layer impacts the "Blockchain Trilemma" is crucial for the future development of blockchain technology.
I look forward to sharing further insights into proposed solutions for the “Blockchain Trilemma”, whether through layer 3s or other means, as they continue to evolve and improve.
If you are an investor or builder in this space and would like to connect, please feel free to reach out to me at Ernest@Boldstart.vc or on Twitter @ErnestAddison21.