Table of Contents
Blockchain is a database system or digital ledger designed to record data and make it impossible to change or hack the info or cheat the system.
The recorded data is mainly cryptocurrency transactions, and the blockchain is shared among the nodes of a computer network.
The key element that differentiates a typical database and a blockchain is the data structure. A blockchain records data in groups called blocks.
Blocks have specific capacities to store data, and once they are filled, they can no longer be changed or manipulated as they are closed and linked to the previously filled block. This linking creates a chain of data blocks or “blockchains”.
At its core, blockchain includes
The following image depicts the main components of blockchain, i.e., ledger, system integration, smart contract, wallet, peer network, membership, events, and system management.
Blockchains bring immutability, transparency, efficiency, auditability, and security, resulting in lower costs across a wide range of industries, companies and applications. Recently, academics have identified six blockchain layers, including data transfer, network, consensus, incentive, contract and application.
Although others have different categories. Don’t panic! We have simplified all of them in the following sections.
There are several layers in the blockchain simply because each layer provides different usability for different users. Also, each layer solves the problems with the previous layers. We’ll elaborate on each one in the following sections.
Some say there are three layers, others say four, some others call it five layers, and yet others believe there are six layers of blockchain. They are just different categories and names. Let’s explore each one below.
According to many, blockchain layers include
In another categorisation, blockchain layers include
Also, others categorise blockchain layers as follows:
Yet, another categorisation groups blockchain layers as
Layer 0 of the blockchain is a type of protocol that allows developers to launch various layer 1 blockchains for various purposes and partly solve the scalability problem in the blockchain.
Layer 0 (L0) networks access Software Development Toolkits or SDKs that let developers create blockchains, i.e., Layer 1s or L1s or sidechains. While these L1s or sidechains are connected to the L0 mainchain, they have independent performance.
Simply put, blockchain layer 0 is an infrastructure to create and launch new blockchains, like the Bitcoin or Ethereum networks.
Layer 0 networks are necessary as they solve three main issues on the way of developing and adopting Web 3.0, i.e., scalability, flexibility and interoperability.
This base layer includes the hardware equipment, the network, nodes, etc.
Some of the main uses of Layer 0 are
Layer 1 is the base on which other layers are built. It is the ruling layer, which includes the coding languages and consensus mechanisms. Also, this layer is home to creating and adding blocks to the blockchain, known as the implementation layer.
To have its best performance, blockchain needs decentralisation, scalability, and security. Layer 1 protocols cannot meet these needs, which is why the Blockchain Trilemma occurs.
To solve this problem, the blockchain has to sacrifice one of the three, which is mostly scalability. To understand why scalability is dabbled, let’s explain the terms that form the blockchain trilemma.
Let’s clarify it with an example. A giant network Ethereum prioritises security and decentralisation, sacrificing scalability.
Scalability is directly related to throughput or transaction execution time, and low scalability leads to high gas fees in the case of Ethereum.
Since many networks have to leave out scalability, layer 1 was not enough to meet all three needs and another layer needed to come into being to solve the scalability issue.
Layer 2 was designed to solve the scalability issue faced in blockchain layer 1. Layer 2 aims to solve this issue using various methods, including applying the off-chain mechanism to execute transactions.
An example of a layer 2 protocol is the Sidechain designed to help scale the Ethereum throughput.
Layer 2 is independent of layer 1 to decrease the work pressure in Layer 1 (the main chain) and perform the tasks off-chain. Thanks to Layer 2, Layer 1 can concentrate on maintaining security, and scalability (throughput) is covered in the second layer.
Layer 3 blockchain, known as the application layer, includes application and execution and is where the users interact with.
The application part includes applications that enable users to interact with the blockchain. The execution part comprises smart contracts and rules controlling the dApps. AMMs (Automated Market Makers) and Decentralized Exchanges are examples of layer 3 protocols.
Crypto and blockchain experts believe that there are five layers of blockchain technology, including
Blockchains are P2P (peer-to-peer) networks connecting clients with peers to share data. In simple terms, this layer is a network of devices interacting and exchanging information. This ability to share information is the backbone of establishing the distributed ledger.
The data transfer layer is the bottom layer among blockchain layers and components. Data layer components include the Internet, hardware, and connections that enable layer one to run smoothly.
The data layer operates as the blockchain data structure and comprises two primary elements: pointers and a linked list. The linked list is a chain of blocks with their data and pointers to the previous blocks.
Also, the data layer consists of the following components: a Merkle Tree and Hashing Function.
The transactions in a blockchain are stored as part of a tree called a Merkel tree. A Merkle tree provides security, integrity and irrefutability for blockchain technology.
The users employ the hash function to convert a large amount of input into a smaller size. Follow me to learn all about Hash Function!
The next blockchain layer above the data layer is the network layer, which could be described as the hardware aspect of the blockchain. This layer is also called a propagation layer or peer-to-peer layer.
A peer-to-peer layer involves all the blockchain nodes and doesn't have someone in charge as a centralised administration coordinating transactions. All the nodes are interconnected and share data, create blocks and broadcast transactions to each connected party in the network.
Each block and its information should be authenticated, and the block is officially connected to the blockchain once most of the nodes in the network have authenticated the block.
In the blockchain, the third layer is called the consensus layer, which mainly includes consensus mechanisms like Proof-of-Work (PoW) and Proof-of-Stake (PoS).
The consensus layer provides a certain set of agreements between nodes across the distributed peer-to-peer network to reach a consensus about the broadcasted transactions. It also deals with the production and verification of blocks.
To achieve consensus, more than half of the participants (nodes) need to validate the transactions before it is permanently recorded in the blockchain ledger.
Once a transaction is permanent, no one, not even the system administrator, can delete the transactions from the ledger. The type of the consensus algorithm and the number of nodes determine how much cost and time are required to reach a consensus.
Incentives are everywhere, from elementary school to sports competitions and even on the blockchain, to encourage nodes and participants to cooperate and develop the platform.
An incentive layer determines the variant types of incentives available on the network and how these incentives are delivered to the network nodes.
Additionally, the incentive layer defines the minimum amount of transaction fees needed to perform actions on the blockchain. The capabilities of the incentive layer include the distribution of rewards and transaction fees. What do they mean? Let’s see!
To run a successful blockchain platform and develop the transactions, we need programs to incentivise individuals to get more nodes involved in the blockchain for validating transactions.
Depending on the type of consensus mechanism, each node receives a particular reward. For instance, In PoW, the node receives an amount of cryptocurrency for solving the puzzle.
In the blockchain, miners not only receive rewards but also get transaction fees. To verify a transaction successfully, you need to calculate the amount of the fee you need to pay. The more fee you pay, the quicker your transaction will be included by a miner in one of the next blocks.
The contract layer provides various components and services like smart contracts, digital wallets, state channels, data feeds, and DAOs to create a bridge between blockchain platforms and other technologies.
The application layer is the final and uppermost layer in the architecture of blockchain layers presented to the users and provides applications on top of the blockchain.
The capabilities of the Application Layer include programmable smart contracts, APLs and dApps. For instance, in a programmable blockchain like Ethereum, various advanced features and dApps work together to make up the Application Layer.
API stands for Application Programming Interface. With API, blockchain nodes or client services will easily interact and communicate with an application or website. Additionally, API as an interface provides tools for two or more applications to interact with each other.
Layer-2 solutions refer to the technology that the blockchain protocol uses to enhance the efficiency and speed of the blockchain.
Layer-2 solutions came into being to solve the layer 1 scalability problem by processing transactions away from the mainnet (layer 1).
Layer-2 solutions provide advantages, including
Ethereum is a layer 1 blockchain as it is the base on which multiple layer 2 networks are built. One of the layer 2 projects on Ethereum is its "rollups".
One of the reasons for creating blockchain technology is to maintain high levels of security and avoid data manipulation. Blockchain’s security structure is based on cryptography, decentralisation and consensus, which provide and increase trust in transactions.
The first layer is the primary level of blockchain and handles on-chain transactions, while the second layer has been designed as a connected network to handle off-chain transactions.
The key difference between the two layers’ scalability solutions refers to their role and focus on the blockchain. While Layer 1 improves the blockchain architecture, Layer 2 creates third-party networks on top of the mainnet (Layer 1).
As you read, we investigated blockchain layers' ups and downs, and now we are one step closer to decoding the intriguing world of the blockchain. The articles on Cryptologi.st are helpful guides for improving every aspect of your crypto knowledge. We focus on educating you since we wish to help you make confident crypto decisions!
In the following sections, we’ll answer some frequently asked questions about blockchain technology, blockchain layers, and related issues. None of your questions regarding blockchain layers will remain unanswered!
Yes, and many layer-33 projects have emerged in recent months to create interoperability protocols to streamline connections between layer-2 services and blockchain networks and layer-22 services.
To improve the functionality of the blockchain, innovators of blockchain technology created layer-2 blockchain protocols. The third layer includes blockchain-based applications like Decentralised Finance (DeFi), distributed storage apps, games, etc.
Solana is a Layer 1 blockchain aiming to streamline using smart contracts and help develop DApps (Decentralised Applications).
Yes and no. Yes, because Ethereum is on the initial blockchain layer. Also, Bitcoin and Polkadot are on the initial blockchain layer. No, because in this article, I don’t call it layer 0, but layer 1. Some do not consider all the layers and categorise blockchain layers with different names, i.e., 0, 1, 2, and 3.
Yes, it is layer 1, which is also called the mainnet or mainchain. Some other platforms on the initial layer of blockchain are Binance Chain and Cardano. Being a layer-1 platform means the project has created its specific infrastructure to process transactions and won’t rely on other security protocols.
Ethereum 2 or layer-2 Ethereum is a separate blockchain designed to extend Ethereum. To learn all about Ethereum 2, check out this short and easy read.
Yes, Matic, which is now known as Polygon, is a layer-2 scaling solution. This platform was created in 2019 to come up with solutions for some of the problems on the Ethereum blockchain. The issues Matic aimed to solve included gas fees, transaction speed, and throughput.
We don’t have similar projects