squares with blue background

What are blockchain layers?

Share this

Learning outcomes:

By the end of this article, you will understand:

  1. The difference between L0, L1, L2 and L3 concepts 
  2. The problems blockchains face 
  3. How scaling solutions work 
  4. How bridging solutions work 

What are blockchain layers?

Blockchains like Bitcoin and Ethereum are described as settlement layers because they settle and store the transactions of digital currencies. They are alternatively described as layer 1 chains sitting within a hierarchy of other layers from 0-3. 

The questions that follow are why is there a need for more than one blockchain layer, and what do each of these layers do? 

The concept of blockchain layers 

It is commonplace to describe tech systems using the concept of a stack or layers. How the internet works is a good example, described in the four-layer TCP/IP model: Network Access Layer (1) > Internet Layer (2) > Transport Layer (3) > Application layer (4). 

Blockchains are the same. On a technical level blockchains can be broken down into five layers: 

  • The Infrastructure or Hardware Layer – The network of physical computers that connect to each other over the internet on a peer-to-peer basis. 

  • The Data Layer – The information that blockchains store and update.  

  • The Network Layer – The software that enables network Nodes to listen for, propose and add new blocks to the Network. 

  • The Consensus Layer – The systems that maintain the integrity and authenticity of the data stored within blockchains, the most known being Proof of Work and Proof of Stake

  • Application and Presentation Layer – APIs, Smart Contracts and the dApps that provide a User Interface. 

But, rather confusingly, the language of crypto more commonly uses numbered layers as a shorthand way to describe solutions to two of the biggest challenges blockchains face: interoperability and scaling. Layers 0, 1 and 2, will be the focus of this article. 

Layers 0-2: An overview 

Layer 0 – Blockchain creation and security: A blockchain system that provides settlement and security for unlimited interoperable blockchains. 

Layer 1 – Foundation layer: Single instance blockchains providing settlement and security.

Layer 2 – Abstraction layer: Batch processing transactions off chain. 

Layer 2: Scalability & the Blockchain Trilemma 

The Skrill Crypto Academy article decoding the Bitcoin White Paper provides a complete analysis of how Bitcoin functions as a layer 1 chain for settling a new form of internet money on a peer-to-peer basis.

The White Paper may not mention the word layer, but its pseudonymous author, Satoshi Nakamoto, referred elsewhere online to shortcomings that hinted at the need for a second layer.

“Bitcoin isn't currently practical for very small micropayments. Small enough to include what you might call the top of the micropayment range. But it doesn't claim to be practical for arbitrarily small micropayments”. Satoshi Nakamoto, Reference 

The simplest way to illustrate Bitcoin’s impracticality for micropayments is by using an example of a low-cost but time-sensitive purchase, such as buying a coffee to-go.  

Bitcoin’s coffee shop problem 

Bitcoin is designed to confirm new blocks of transactions every 10 minutes, so buying a coffee with Bitcoin and waiting for your purchase to be confirmed on-chain would take at least that long, because the network can only support roughly seven transactions per second.  

In fact, best practice suggests that retailers wait for up to six confirmations to ensure finality of a Bitcoin payment. 

No one will wait up to an hour to buy coffee, so either Bitcoin only serves as a store of value, or a solution is needed to enable it to accept micropayments without long block confirmations. 

This problem is known as the blockchain trilemma because the only way Bitcoin could scale transactions in terms of confirmation time or number of transactions per block would be to either confirm blocks faster or make blocks bigger to hold more transactions; each of those options involves an unacceptable compromise. 

  • Faster blocks would compromise security by increasing the chances of successful attacks 

  • Bigger blocks would compromise decentralisation because increasing disk space requirements would make it harder to run a node.  

The block wars 

The scaling debate resulted in what is known as the block wars. The block wars reached a climax in late 2017, when an alternative version of Bitcoin called Bitcoin Cash was created that offered larger blocks.  

Most Miners voted to maintain the existing block size, but this didn’t stop Bitcoin Cash existing independently. It was subsequently forked to create Bitcoin SV (in November 2018) offering unlimited block space. 

Bitcoin has actually been forked over 100 times, but the dominance of the original implementation illustrates that a solution to scalability needs to come from building on top of Bitcoin rather than trying to fundamentally change it. 

The Lightning Network 

Back in 2015, two developers called Joseph Poon and Thaddeus Dryja published a proposed layer 2 scaling solution building on top of Bitcoin’s existing settlement layer; it was called the Lightning Network.

The Lightning Network allows the creation of off-chain peer-to-peer payment channels (aka state channels) where two people (we’ll refer to them as Alice and Bob) can send micropayments back and forth instantaneously and with minimal cost.

An on-chain transaction with a 10-minute confirmation time is only needed when Alice or Bob wants to open or close the channel, adding or removing funds.

The beauty of the Lightning Network is the way payments are routed. Alice doesn’t necessarily need a direct channel connection with Bob. Funds can be routed by Lightning hubs that hold enough liquidity to service payments (including buying a coffee) as a proxy connection for thousands of users and profit from the transaction fees. 

Ethereum & Layer 2 

The block wars and layer 2 applications like Lightning Network offer solutions to scaling Bitcoin while retaining its existing Proof of Work consensus method, but alternative consensus methods frame scalability in a completely different way.

Ethereum, launched in July 2015, adapted Proof of Work to enable a confirmation time of around 13 seconds and double the throughput of Bitcoin. 

However, as the popularity of DeFi took off in the summer of 2020 the limit of throughput was reached, creating a bidding war for block space counter to Ethereum’s open aspirations, which continues to be a problem.

Just as Lightning provided a layer 2 solution, Ethereum developers introduced ways to batch transactions before submitting them via the standard block confirmation process. 

The technology is collectively known as rollups. Everyone who submits a transaction within a rollup enjoys dramatically higher throughput and significantly cheaper fees.

  • Optimistic rollups 

Transactions are ‘optimistically’ assumed to be valid, but can be challenged.

  • Zero knowledge rollups 

Transactions are computed off-chain. Then, compressed data is supplied to Ethereum Mainnet with validity proofs to demonstrate its legitimacy. 

Layer 0: Bridging between blockchains 

While blockchain scalability is being solved by building on top of the base layer, the inability of blockchains to communicate with each other – interoperability – also challenges adoption. 

The democratic nature of blockchain development means there are now many layer 1 chains, each offering its own use cases and solutions to the blockchain trilemma. But to ensure security, blockchains are built as silos, unable to share data with blockchains that operate different consensus methods.

Verifying transactions between distinct blockchains needs to tick three boxes, known as the Interoperability Trilemma.

  • Trustlessness: equivalent security in both chains 

  • Extensibility: support on any domain 

  • Generalisability: able to handle arbitrary cross-domain data 

This makes life difficult for the average crypto user who might want, for example, to earn interest on their Bitcoin using an Ethereum-based dApp. Solutions to this problem include:

  • Wrapping tokens – Creating synthetic versions of assets on a 1:1 basis e.g. wBTC 

  • Bridging – centralised/trust-based solutions and decentralised-trustless options 

Wrapping and bridging mitigate the incompatibility of different layer 1 blockchains. However, decentralised options are fraught with security risks, while the centralised approaches compromise on the fundamental objectives of censorship-resistant payment systems.

An alternative solution is developing a deeper foundational layer to the blockchain stack, a blockchain-of-blockchains (aka layer 0). Or, building chains that work in parallel. 

Polkadot & Cosmos 

Polkadot and Cosmos are two examples of layer 0 blockchains. Both support the creation of independent but interoperable blockchains that are secured by the foundational layer, sometimes described as nested blockchains.  

Sidechains 

Somewhere in between layer 0-1 are sidechains, which operate in parallel to the main chain with their own consensus mechanism. Sidechains rely on the main chain for security as well as for processing large batches of transactions. Polygon is an example of a sidechain network.

Layer 0 blockchains and sidechain networks offer a potential solution for blockchain interoperability going forward, but they aren’t backwards compatible. 

So, unless Polkadot, Cosmos or other foundational blockchains win over the entire ecosystem, which seems unlikely given the dominance of Bitcoin and Ethereum, the problem of interoperability will persist until new ideas or technologies come along.

What are blockchain layers? A recap 

Blockchains can be described in technical terms by five layers: 

  • The infrastructure or hardware layer 

  • The data layer 

  • The network layer 

  • The consensus layer 

  • Application and presentation layer 

Layers 0 – 2 are often discussed in blockchain layers. These layers fulfil the following functions:: 

  • Layer 0 – Blockchain creation and security 

  • Layer 1 – Foundation layer 

  • Layer 2 – Abstraction layer 

Numbered blockchain layers are used to reference solutions to the problems of scaling and interoperability.

Layer 2 offers scaling solutions that include: 

  • The Lightning Network (Bitcoin) 

  • Rollups (Ethereum) 

Layer 0 offers interoperability solutions: 

  • Blockchain networks (Polkadot & Cosmos) 

  • Sidechains (Polygon)