Block_chainMga Pananaw sa MerkadoGabay para sa mga baguhan

Layers of Blockchain: L0, L1 and L2 Explained

Layers of blockchain split settlement, execution and data. Here is what layer 0, layer 1 and layer 2 each handle and why that split exists.

Quick Answer

The layers of blockchain describe how blockchain networks divide infrastructure, transaction execution and settlement to handle different technical demands. Layer 0 provides foundational infrastructure, Layer 1 maintains the core blockchain and Layer 2 processes transactions using systems built on top of a main chain. Each layer serves a different purpose and they often work together.

Blockchain layers are different levels of technology that work together to support decentralized networks. Layer 0 provides foundational infrastructure, Layer 1 handles core consensus and settlement and Layer 2 helps scale transaction execution.

Major Takeaways

  • Layer 0 provides infrastructure that can support the creation and connection of blockchain networks.

  • Layer 1 secures the main chain through consensus and records transactions on its ledger.

  • Layer 2 processes transactions separately while relying on a Layer 1 for important security functions.

  • Data availability affects whether network participants can access the information needed to verify transactions.

Why Chains Split Into Layers

4. Layers of Blockchain L0, L1 and L2 Explained.jpgCaption: L0, L1 & and L2 Blockchain Illustration

Alt text: Blockchain layers infographic showing Layer 0 infrastructure, Layer 1 settlement and consensus, and Layer 2 transaction execution. 

A blockchain has to do a number of things: it has to process transactions, agree on what the transactions are (i.e. validate them), store the data and it has to be secure. If you have one network trying to do all of those things then you are going to have to make trade-offs between speed, cost, decentralization and security.

The layers of blockchain go some way to separating out those responsibilities. Rather than have to rearchitect the entire network as demand increases you can simply improve the individual layers. That brings with it a degree of flexibility but also a greater number of technical components and dependencies.

Layer 1: Settlement and Consensus

Layer 1 is the main blockchain. It's the one that maintains the ledger, enforces the protocol rules and uses a consensus mechanism to decide which transactions get included.

In this architecture, the settlement layer is responsible for establishing the authoritative record of transactions and resolving disagreements about the chain's state. The execution layer determines how transactions or smart contracts are processed. These functions may operate together on a Layer 1, but some architectures distribute them across different layers.

Layer 1 security is all down to its consensus design, the level of validator participation and the incentives. It's not infinite in capacity so under heavy demand you can end up with higher fees and/or longer waiting times.

Layer 2: Execution Off the Main Chain

Layer 2 systems are built on top of a Layer 1 and are designed to process transactions without having every single transaction go through the main chain. The various designs will have different approaches to this, some will bundle transactions, some will process the activity in a separate manner and then send the transaction data or proofs back to the Layer 1.

This can lead to increased capacity and reduced cost, but the security model is very much system dependent. Some systems will use cryptographic proofs, others will use a completely different model and set of assumptions. The key difference in layer 1 vs layer 2 is where transactions are processed and how they rely on the main blockchain for security, verification, and settlement.

Layer 0: The Base Infrastructure

Layer 0 refers to the underlying infrastructure used to build or interconnect blockchain networks. This can vary according to the architecture in question and may include networking protocols, shared security, development frameworks and the like that enable various chains to talk to each other. It's not a universal technical category with one single definition. Some projects use it to describe the infrastructure that underpins multiple Layer 1 networks, others use it in a much broader sense.

The key point is that Layer 0 provides the environment in which blockchains can operate rather than just processing transactions on one particular chain.

Data Availability: The Hidden Constraint

A data availability layer helps to ensure that the transaction data is published and available so that the various participants on the network can verify the activity and reconstitute the relevant state.

This is important because fast transaction processing isn't sufficient if users can't get access to the data they need to verify the results. Some scaling solutions publish the data directly on Layer 1, others use a separate data availability layer. The design has an impact on cost, on verification and on the trust assumptions that the user has to make.

How to Read a Scaling Claim

When a project claim better blockchain performance, ask what its figures actually measure. Does the claim refer to transactions processed off-chain, transactions settled on the main chain or activity across several connected networks?

Also look at the transaction costs, confirmation times, degree of decentralisation, data availability and how the system deals with failure. A higher throughput figure in no way necessarily equates to better security or a better end user experience.

If you are exploring crypto markets, you can review XXKK Markets. For context on different trading methods, read our guides to cryptocurrency spot trading and perpetual contracts.

Conclusion

Layer 0, Layer 1 and Layer 2 describe different roles in the blockchain infrastructure. Layer 0 is the underlying environment, Layer 1 is the core consensus and settlement layer and Layer 2 is the layer that helps with scaling the execution of transactions.

Layering is a design compromise rather than a hierarchy of quality. The appropriate architecture is one that is suited to what the network is trying to achieve and the level of trade-off it is willing to make in terms of security, cost and decentralisation. You can create an XXKK account to explore crypto markets and continue learning about blockchain-based trading.

FAQs

What are the layers of blockchain?

The 'layers' of blockchain generally refer to Layer 0, Layer 1 and Layer 2. Layer 0 provides the foundational infrastructure. Layer 1 is the main blockchain and contains the consensus rules. Layer 2 is used to scale the network by processing transactions off the main chain. The precise definitions of these layers will of course vary from project to project.

What does Layer 1 do?

Layer 1 runs the core blockchain, maintains the ledger and uses the consensus rules to agree on what transactions are valid and what the state of the network is. Depending on the design of the chain it can also be the layer that executes smart contracts. It provides the primary security and settlement layer that the various applications and scaling solutions connected to it can build upon.

What does Layer 2 do?

Layer 2 helps a blockchain to deal with more transaction volume by offloading some of the processing from the main chain. It can do this by batching transactions, processing them separately and then submitting the results (or proofs) back to Layer 1.

What is a Layer 0?

Layer 0 is the underlying infrastructure that enables the building, operation or interconnection of blockchain networks. This can encompass networking protocols, development frameworks and shared security or interoperability layers. The use of the term varies across the industry so it's important to check what a given project means when it refers to itself as being Layer 0.

Why not just make one chain faster?

Making one chain faster will invariably increase the hardware requirements and make it harder for the average participant to verify the network for themselves. Layered designs spread the work out across a number of different systems, creating a number of different paths to scale. They can of course add complexity and introduce new trust assumptions. Neither of those approaches is in any way automatically superior to the other for every blockchain.



FAQ

Tingnan ang Lahat ng FAQ — FAQ

Handa ka na bang Magsimula?

Gawin ang susunod na hakbang at simulan ang iyong paglalakbay. Sumali sa libu-libong user na nakinabang na sa aming platform.