What are Blockchain Layers?

post image

Recently, there has been a lot of noise around L2 solutions, but many do not understand what a Layer is in the blockchain.


Layer 0

Layer0 offers various tools and solutions for interaction between Layer1 blockchains (for example, cross-chain transfers and asset exchange). As a result, the end user gets the opportunity to operate with assets of various networks and classes, as if he were using a single ecosystem, and not several different ones.The well-known Layer Zero is an example of this.

They also simplify the integration, interaction of blockchains and the exchange of assets between them. This is achieved through unification and standardization, which greatly simplifies the development for several blockchains at the same time.

L0 platforms also offer fast and cheap transactions via cross-chain exchanges, using specialized "communication" protocols.

post image

Layer 1

Blockchains have an inherent problem known as the "scalability trilemma". It lies in the difficulty of creating a fast, decentralized and secure network at the same time. Therefore, developers often have to choose and optimize a maximum of two components out of three.

The architecture of early blockchains, primarily bitcoin and Ethereum, was not designed for a large number of transactions and users, and therefore they have low bandwidth. For example, in bitcoin it is 5-7 transactions per second (TPS), in Ethereum it is about 15 TPS.

Scalability can be increased by changing the code of the blockchain protocol using functions such as sharding. But it takes a lot of time and can take years. In addition, such improvements change the foundations of architecture, so the project community does not always agree to carry them out.

Ethereum has reached its limit in scalability. As of the summer of 2022, Ethereum processes approximately 500,000 transactions per day, which corresponds to 30 transactions per second. For comparison, the Visa payment system is capable of processing up to 150 million transactions per day and 65,000 transactions per second, which significantly exceeds the capabilities of Ethereum.

In practice, reaching the limits of the blockchain leads to network congestion (when it can take several hours to process a transaction) and extremely high gas fees.

post image

Layer 2

L2 solutions allow at least partially solving the problem of low bandwidth and high fees for transfers without affecting the code of the main blockchain. Their main advantage is the ability to transfer assets between the addresses of the "first level", while using the "second level", which can be either a separate off—chain protocol or a separate blockchain.

Advantages of second-level solutions:

• Increasing the number of transactions per second (TPS) improves the user experience and reduces network congestion.

• Transactions are consolidated into a single package before being recorded on the main network, which reduces gas charges.

• Any updates in the Layer-2 solution do not change the underlying blockchain, since Layer-2 is built on top of the blockchain, which helps ensure network security.

• Allows you to create Layer-2 networks for specific applications that are specifically designed to optimize certain functions.

Disadvantages of Layer-2 solutions:

• Liquidity outflow from the main blockchain is likely

• Potential security and privacy vulnerabilities; users should conduct their own research (DYOR) before using Layer-2 solutions

• May make it difficult to interact with other Ethereum-based applications (for example, when using L-2).

L2 development technologies

Zero-Knowledge Rollups

Zero-value rollups (ZK-Rollups) combine transactions taken from the main blockchain and generate cryptographic proof. This proof, also called proof of authenticity, is the only record required to be entered into the main blockchain; hence, the gas fee that users would incur from processing all the data individually is reduced. It is considered the main Vitalik Buterin

Examples: Starknet, ZKSync, Scroll

Advantages:

• Secure and decentralized

• Almost instant transfers

Disadvantages:

• Computational complexity for small applications with less activity on the chain

• Not all ZK-rollups provide compatibility with the Ethereum Virtual Machine (EVM)

• The order of transactions can be influenced by the user

Optimistic rollups

Unlike ZK rollups, optimistic rollups rely on evidence of fraud. Simply put, aggregators publish minimal information at Level-1 and assume that the data is correct.

If the transaction is truly valid, the main blockchain does not need to do anything else. In the case of a fraudulent transaction, an optimistic rollup checks for fraud and punishes the sender.

Examples: Arbitrum, Fuel Network, Optimism.

Advantages:

• Low gas charges

• Increased throughput

• The possibility of concluding smart contracts

• Security

Disadvantages:

• Potential mismatch of incentives and rewards between network members

• Baseline-1 can censor transactions.

post image

Layer 3

Layer 3 is called the application or application layer. This is the blockchain layer on which decentralized applications (dApps) are located, such as decentralized exchanges (DEX), Metaverse projects, decentralized autonomous organizations (DAO), as well as protocols that serve them.

Not all blockchains support Layer 3. For example, Ethereum, Solana, EOS, Tron, BNB Chain, Polygon and other blockchains provide support and thoroughly develop the ecosystem of Layer3 applications.

Blockchains, thanks to the support of Layer 3, increase the number of users, the capitalization of network assets and their popularity.

post image