Unpeeling the layers of blockchain
While the idea of blockchain was first conceptualized in 2008 by Satoshi Nakamoto, one would not have anticipated the amount of interest that it would garner and the number of use cases that are being implemented in blockchain networks. However, the initial iteration of blockchain on the Bitcoin network is not without its operational issues. As more adopted the technology, we started to discover these key challenges of early blockchain implementations:
High Fees - congestion on blockchain networks resulted in high transaction fees being offered by users to get their transactions processed, this crowds out other
Scalability - the number of transactions that can be handled by the network is limited due to proof of work or other consensus protocols
Interoperability - tokens or information cannot be easily shared across different blockchain networks and use cases
Privacy - data is transparent on the blockchain and may not fit certain use cases
One of the first solutions that addresses these issues was the Lightning Network, The Lightning Network was first conceptualized in 2015 and implemented in Jan 2017. Pairs of users create payment channels by committing funding transactions to the Bitcoin blockchain, this also creates a balance sheet. Any number of transactions can then be made on this balance sheet. The channel can then be closed with a settlement transaction sent to the Bitcoin blockchain. Users can route their transactions through payment channels connected via a network of nodes. You can thus pay anyone on the Lightning Network. For example, if Bob and Alice have a payment channel and Bob and Carol also have a payment channel, Alice can transact with Carol. The Lightning Network addresses the problems of high fees and scalability, it keeps most transactions off the Bitcoin blockchain which reduces the transaction fees paid and allows for more transactions to be processed at any time.
Layer 1: The Base Layer
Layer 1 blockchains form the base layer and consist of:
Consensus protocol
State transitions
Transaction validation
Block creation and storage
Bitcoin is the original Layer 1 blockchain. Ethereum is a popular Layer 1 that supports smart contracts. Other well-known Layer 1 chains include:
Solana
Cosmos
Polkadot (Parachains)
Binance Blockchain
Layer 2: The Scalability Layer
Layer 2 is the scalability layer, computation and storage are offloaded from Layer 1 by processing transactions off-chain and periodically settling them on the main chain. By syncing with the Layer 1 chain, the Layer 2 chain benefits from its security and decentralization. Various techniques are used to “sync up” with the Layer 1 main chain.
State Channels: Channel peers can conduct an arbitrary number of off-chain transactions while only submitting two on-chain transactions to open and close the channel. Examples are the Lightning Network and Stellar’s Starlight protocol.
Plasma: Creates child chains that are anchored to the main chain (Ethereum) to run DApps
Rollups: Allows users to bundle multiple transactions into a single rollup block that is submitted to the main chain. ZK-Rollups post transactions with zero-knowledge proof mechanism but have high computation costs. Optimistic Rollups post transactions without proof but allow disputes within a period. Rollups are used in Ethereum and Polkadot.
It is also possible to “stack up” layer 2s on top of each other to achieve further scaling. However, there are challenges and limitations.
Other Scaling Solutions
Shards
Shards are partitions of the main chain that run in parallel and process a subset of transactions or data. They can increase the throughput and capacity of the main chain by distributing the workload among multiple nodes. Shards are part of the main chain (layer 1) and have the same security guarantees as the main chain. Layer 2 are separate from the main chain and process transactions off-chain. To transfer assets or data between the main chain and a layer 2 protocol, a deposit or a withdrawal is required, which may introduce additional complexity, cost, or risk.
Side Chains
Side chains are separate blockchain networks that run parallel to the main chain. They have their own consensus mechanism, rules, and features. The main difference between layer 2 chains and side chains lies in their security mechanisms and their relationship with the main chain. While layer 2 chains rely on the security of the main chain and are dependent on it, side chains have their own security properties and are independent of the main chain. To transfer assets or data between the main chain and a side chain, a bridge or a two-way peg is required.
Layer 0: Meta-protocol
Layer 0 is the meta-protocol that connects different blockchains and enables them to exchange data and value. Polkadot and Cosmos are examples of Layer 0 implementations.
Polkadot’s Central Relay Chain. Polkadot is a network of heterogeneous blockchains called parachains (layer 1) that can have different features and functionalities. The Central Relay Chain (Layer 0) is responsible for relaying messages between parachains.
Cosmos. Cosmos is a network of independent parallel blockchains that can communicate with each other using a standard protocol called Inter-Blockchain Communication (IBC). Cosmos uses a modular framework called Tendermint that allows developers to create custom blockchains with different features and applications.
Layer 3: Interoperability
Layer 3 is the interoperability layer. They enable seamless and secure communication and value transfer across blockchains. Ripple’s Interledger Protocol (ILP) aims to create a global payment network that can connect any ledger, blockchain, or payment system. Ripple’s Interledger uses a connector-based routing protocol that allows packets of money to be transferred across different ledgers with minimal trust and fees. Some of the blockchains that support the Interledger Protocol include XRP Ledger, Ethereum, Bitcoin, Stellar, and Hyperledger.
Use Case: Cross-Chain Exchange
Use Case: Polkadot Ecosystem
Use Case: Trade Ecosystem
Conclusion: Layering the Layers
The need for interoperability between projects and different jurisdictions is becoming a reality. By innovatively combining different layers, we can address real-world operational issues. Problems with high fees and scale can be addressed on congested Layer 1 networks with Layer 2 solutions. With Layer 0s or Layer 3s, we can allow blockchain networks to interoperate and more efficient sharing of data. Advancements in solutions like ZK-rollups can address privacy concerns with sharing data. As the technology matures, more use cases are waiting to be discovered, especially by more traditional industries that are still facing legacy inefficiencies. It will be interesting to see what comes in the future of blockchain adoption!