What is Layer2?

Vis In The World
5 min readApr 7, 2023

--

Layer 2 is a concept that emerged to solve the scalability problem of the Layer 1 Ethereum network. As the Ethereum ecosystem expanded, the daily transaction volume increased significantly to around 100, creating a problem that the transaction processing speed could not keep up with the increasing demand. In addition, as the transaction volume increases, the fees paid when requesting transaction processing also increase. This is because, due to the nature of Ethereum, high-fee transactions are processed first, and the level of fees paid previously slows down transactions. In other words, we are hitting the scalability limit.

source: xangle

Therefore, Layer 2 is responsible for transaction processing, and the Ethereum network divides the roles by only recording the result value. As a result, the amount of computation that Ethereum has to handle is greatly reduced, and we hope to reduce the bottleneck. Scalability issues caused by growing networks can be compensated for by Layer 2.

Layer 1

Refers to early networks such as Bitcoin and Ethereum that operate independently based on their own consensus algorithms. An unspecified number of nodes (participants in the blockchain network) record, approve, and process transactions in blocks, and in return receive the corresponding blockchain’s own virtual assets. It is characterized by decentralization because it is done without intermediaries.

Why do we need Layer 2?

To learn more about the purpose and need of Layer 2, let’s look at why scalability issues arise. Reducing the number of block generation and consensus participants is the easiest way to simply execute transactions as quickly and cheaply as possible. However, doing so raises questions about blockchain security and decentralization. This is called the “blockchain trilemma”.

An ideal blockchain should meet all the characteristics of 1) decentralization, 2) security, and 3) scalability, but it is difficult to increase scalability without sacrificing the degree of security and decentralization. Verification by multiple participants increases reliability and facilitates decentralization, but inevitably slows processing speed. However, reducing the number of participants for scalability poses security and decentralization issues. For this reason, the dilemma problem that only two of the three properties can be achieved with a simple blockchain design is called the “blockchain trilemma”.

Layer 1 blockchains such as Ethereum escape this trilemma swamp by putting a new layer 2 on top of the existing blockchain’s layer 1, separate from it, while preserving the existing security and decentralization advantages. Think new through Layer 2 while. How to improve scalability.

In other words, Layer 2 aims to make transactions as fast and cheap as possible, within transaction speed and throughput, without compromising decentralization and security.

So to what extent can Layer 2 solve the scalability problem?

transaction speed problem

TPS (Transaction Per Second), which is the amount of transactions that can be processed per second at Layer 1 (like Ethereum), is at a very low level. As a result, transaction processing can take a considerable amount of time to complete. Ethereum can only process about 15 transactions per second at about 13–15 TPS, while Layer 2 is known to be able to process about 10–100 times faster.

source: xangle

As you can see from the chart above, the trend of fees also changes depending on the trading situation. At Layer 1, as demand for network usage increases, transaction throughput is limited and higher configured transactions are processed first. As explained earlier, transaction processing speeds will slow down at the level of fees previously paid, increasing overall fees.

Therefore, by processing transactions at layer 2 and recording only the result value at layer 1, the bottleneck is reduced and the burden of fees is reduced.

3. Layer 2 types

Layer 2 types can be broadly categorized as sidechains, state channels, rollups, plasmas, and baridium.

side chain

It is a blockchain connected by layer 1 and 2WP (two-way peg), which is the main net. 2WP is a way to move funds from layer 1 to sidechains. It allows users to transfer their funds between different chains. However, it turns out that the concept of freezing a layer 1 virtual asset and then moving an equal amount of coins for actual sidechain use is a bit different. Requires separate consensus algorithms, block generation rules, and validator nodes.

state channel

Transactions between specific participants are processed outside Layer 1 of the blockchain, and smart contracts with transaction rules are placed on the main chain to execute transactions from the outside. Since the participant group is set separately, it is characterized by not being able to trade with those who are not participating in the channel.

roll up

Bundling (rolling up) hundreds of transactions into a single layer 1 transaction is cheaper for the user as the layer 1 transaction fee is shared among everyone in the rollup. Rollup transactions are also executed outside layer1, but the transaction data is published inside layer1. Rollups can be categorized by approach into 1) optimistic rollups and 2) zero-knowledge rollups (ZK rollups), with Ethereum preferring rollups as a layer-2 solution.

plasma

It is a method to collect transactions from small child chains created on the main chain (Layer 1) and reflect them to Layer 1. It can be viewed as a non-custodial sidechain. Each child chain uses smart contracts that can be designed in different ways, so they can operate independently, but can still safely move funds to the main chain in the event of a problem with the child chain. It is characterized by better security than sidechains.

baridium

Validium uses verification methods such as ZK rollup, but stores data off-chain, so transactions are not stored in Layer 1, so data is processed at high speeds of up to 10,000 TPS, allowing for multiple parallel executions is. However, it has the disadvantage of low security as it does not use Layer 1 for data storage.

Each Layer 2 solution has its own strengths and weaknesses, so it is used for different scaling solutions depending on the purpose and method. Typical examples are Porygon Zero with Porygon ZK Rollup and Porygon Nightfall with Optimistic Rollup. In the next article, we’ll take a closer look at each type of layer 2, starting with sidechains.

Post source: https://xangle.io/research/detail/1119

--

--

Vis In The World
Vis In The World

Written by Vis In The World

VIW is the world’s first platform that can issue NFT based on personalised IPFS with best security.

No responses yet