Unpeeling the layers of blockchain

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.

We can consider the Lightning Network the first layer 2 solution for any blockchain network. It also inspired the use of different layers to address the challenges of blockchain technology. By architecting and layering blockchain networks, one can create different implementation options for different use cases. Today, we have 4 generally accepted types of blockchain layers.

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

Blockchain layers for cross-chain token exchange

An example of how layers can work together is the exchange of tokens across blockchains using Ripple’s ILP as layer 3. Tokens can be moved from one blockchain network to another using smart contracts that lock up the token within the network and then release it to another party on another network. This can be connected directly to layer 1s or layer 2s. However, intermediaries need to exist on both networks to facilitate this.


Use Case: Polkadot Ecosystem

Blockchain layers for the polkadot ecosystem

Another example is Polkadot’s ecosystem. Polkadot’s Central Relay Chain acts as a meta-layer or Layer 0, allowing parachains to send messages to each other. Parachains can be custom-built for different purposes and may use rollups for additional scaling. This allows for different use cases built using Polkadot to communicate with each other.


Use Case: Trade Ecosystem

We can also imagine how we can use the layers to create enterprise use cases such as an ecosystem for trade between companies. Groups of companies within the ecosystem can use a private blockchain and state channels to track trade and finance-related activities such as letters of credit. However, other companies may have different requirements and want to use public blockchains like Ethereum with a rollup to track their activities and retain privacy of information. If we can create a Layer 3 solution for cross-chain communications, it can be used to share and update information across blockchain networks. However, for this to work, standards for trade documents are required.


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!

Previous
Previous

What is Purpose Bound Money?