header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP

What are Layer2 and why are they important?

2022-07-23 10:00
Read this article in 73 Minutes
A detailed look at layer2 and its importance, and examine several key components utilized by layer2 including summary and side chains.
Zk, zkVM, zkEVM, what is Layer2, and why are they important?
The original author: water | zkSync


Take a simple example. A company has a large volume of business, so it sets up a subsidiary, and turns over some of its business to the subsidiary. The parent is Layer 1 and the subsidiary is Layer 2. In this way, the burden on the parent company is lightened.


First, we need to define what Layer 1 is: The layer 1 network is the base layer, or underlying infrastructure of the blockchain. Also known as the master network or "master network," it not only defines the core rules of the ecosystem, but also validates and completes transactions, as exemplified by Ethereum, Bitcoin, and Solana.


Layer 1 blockchains typically start with an emphasis on decentralization and security -- both core tenets of any sound network and (with some exceptions) maintained by a diverse global network of developers and participants such as verifiers.


See also: What is blockchain technology?


Lacking any central authority or oversight, these platforms require inherent security in the technology itself to protect users from scams and attacks. Because of this priority in design, not to mention the large amount of resources required to maintain a fully functioning ecosystem, they often lack scalability.


Although some developers think that could not in safety, decentralization and balance between extensibility is an unstoppable defects of the technology (referred to as block chain trilemma), but the layer 2 solutions, such as the etheric fang rollups and lightning on the COINS on the network is used for a solution to solve these problems.


What is Layer2?



Layer2 is a set of off-chain solutions (standalone blockchains) built on top of Layer 1 to reduce bottlenecks through scaling and data. Think of it like a restaurant kitchen -- if every order had to be completed by one person from start to finish before order confirmation and delivery, it would be a very slow process, with only a few orders an hour. But layer 2 is like a prep station -- there's one for cleaning and cutting food, one for cooking, and one for assembling dishes -- to focus and accomplish each task more efficiently. When the time is right, the end person can match each assembled dish to the order and confirm it before sending it to the final destination (the customer).


Payment platforms such as Visa use a similar system. Instead of Visa separately managing the thousands of daily microtransactions from suppliers that clog the network in minutes, Alipay breaks them up into batches and clears them regularly in the banking system. The bank then stores and sorts the transactions through its internal equivalent of the settlement layer. In this case, Visa becomes Tier 2 and Visa's broader network of institutions and governments that keep records of transactions and define financial industry rules as Tier 1.


Ethereum also uses a similar approach with features such as Optimism and Zero knowledge (ZK) aggregation, which can reduce the burden of managing transactions on the main network, resulting in greater transaction inclusion and throughput (higher transactions per second). All of this leads to a more seamless and useful user experience. Examples of layer 2 on Ethereum include solutions such as Arbitrum, Optimism, Loopring, and zkSync.


Why is layer 2 important?


While decentralization and security are features of Ethereum's Layer 1 or main network, the ensuing market penetration over the years has led the network to reach its current capacity of more than 1.5 million transactions per day. In addition, because the main network can only handle about 15 transactions per second, periods of high network activity typically result in data congestion. This in turn leads to higher gas (transaction fees) and slower application performance, which is not evident in today's bear market, but clearly we can't be in a bear market forever.


To address these issues, Layer2 extends ethereum as a separate blockchain on top of the layer 1 network. As mentioned earlier, it communicates through smart contracts that integrate and benefit from Ethereum's powerful decentralized security model and help lighten the heavy burden of main-network transactions. In essence, layer 1 deals with security, data availability, and decentralization, while Layer2 deals with transaction-related extensions.


In most cases, the layer 1 blockchain has:


- The network of nodes used to protect and verify the network

- Block producer network

- Key blockchain and transaction data

- Relevant consensus mechanisms


Layer 2 is different in that it provides:


Lower costs: Layer 2S bundles multiple off-chain transactions into a single Layer 1 transaction, which helps reduce data load. They also maintain security and decentralization by clearing transactions on the main network.


More practical: With the combined advantage of higher transactions per second and lower fees, Layer 2 projects can focus on improving the user experience and expanding the reach of applications.


Most scalability issues are related to decentralization. Unlike traditional banks, which have closed and more efficient methods of regulating payments, blockchain transactions and data management must go through a series of systematic steps, such as acceptance, validation and distribution over a network with thousands of participants, while maintaining security and transparency.


How does layer 2 work?


The Layer 2 protocol provides a second framework in which transactions can be conducted separately from layer 1. This means that a considerable amount of work that would be performed by the main chain can be moved to the second layer. The Tier 2 application then publishes the transaction data to Tier 1, where it is secured in the blockchain ledger and history.


As with any other open or closed platform, accessibility at Level 2 varies. Some can be used by a range of applications, while others can only cater to the whims of a particular project. That said, layer 2 leveragesseveral key components including summaries and side chains.


Layer 2 Summary (Rollups)



Summary is a specific Layer 2 solution that performs hundreds of transactions outside of Layer 1, aggregates them into a single compressed data, and then publishes the data back to the main network for anyone to review and dispute if they think it's suspicious. By doing so, rollup not only takes advantage of ethereum's security, but can also reduce gas costs by as much as 10-100 times.


While rollups are useful for deposits, withdrawals, and verification, there are subtle variations in the way rollups are used, such as Optimism and ZK Rollups, which publish data back to layer 1.


Optimistic Rollups


Optimism summary runs all transactions in parallel with the Ethereum main chain, and then publishes the data back to layer 1. Users are incentivized to trade at these tiers due to competitive low fees. If a fraudulent transaction is suspected, it can be questioned and evaluated through proof of fraud. In this case, the summary runs the computation of the transaction with the available state data. This means it will take slightly longer to exit the ROLLup and withdraw funds to Tier 1 than ZK Rollups (explained below). However, "internal" summary users will still receive quick transaction confirmation.


In general, Optimistic Rollups are compatible with Ethereum Virtual Machines (EVM) and Solidity, meaning that anything possible on Layer 1 of Ethereum can be replicated on layer 2.


Several examples of Optimistic rollups include Arbitrum, Optimism, and Boba.


Side chain



As can be seen from projects such as XDai and Polygon PoS, the side chain is an independent, EVM-compatible blockchain that runs in parallel and interacts with the main network via a bridge. Because they use separate consensus mechanisms and are not protected by Layer 1, they are not technically considered layer 2. However, the chain works in the same way as Ethereum because it models EVM. That said, side chain operators are more at risk because users trust them with money, not the Ethereum protocol (or layer 2 as appropriate). Note: Polygon has made several acquisitions with the ability to speculate, the side chain is no longer accurate.


Validiums


Validiums, such as StarkWare, use proof of validity (similar to ZK summaries) but do not store data at Layer 1. Multiple validity chains can run in parallel with each other, and each can process approximately 10,000 transactions per second. However, support for universal smart contracts is limited due to the need for more specialized languages.


Side chains and validation are blockchains that run in parallel with Ethereum and interact with assets via Bridges connected to the main network. They don't get security or data from Ethereum itself and are therefore not considered a proper layer 2 like Optimistic or ZK aggregation. This is especially true given the potential security and trust implications. However, both scale similar to Layer 2 by providing lower transaction costs and higher throughput.


Zk-rollups (ZK Summary)


In contrast to Optimistic Rollups, ZK Rollups generates encrypted proofs to verify the authenticity of transactions. These proofs (published to Level 1) are called validity proofs or SNARK (concise non-interactive Knowledge Arguments) or STARK (Extensible transparent Knowledge Arguments)


ZK aggregates are more efficient because they maintain the state of all transfers at layer 2, which is updated only with validation. Since ZK Rollup does not require the entire transaction data, it is easier to validate blocks and move Ether (ETH), the main Token of the Ethereum blockchain, to Tier 1. Proof of validity (accepted by ZK ROLLup Contract) has verified the authenticity of the transaction. That is, they do not have full EVM support and run calculations more intensively for applications with little on-chain activity.


ZkSync and Starkware both use the ZK-Proof solution, but there are differences, too:


- While Starknet is technically a ZKRollup (on-chain data availability, it is actually Validium: the current architecture of the Cairo VM does not allow users to force arbitrary transactions through L1.


- Validium's mechanism is very similar to That of zkRollup, with one difference being that data availability in zkRollup is on-chain, whereas Validium keeps it off-chain. This allows Validium to achieve higher throughput -- but these centralizations come at a cost: Validium's operators can freeze users' funds. ZkSync is completely decentralized.


Why are there so many layers 2?


Since we've covered the main layer 2 (Optimistic Rollups, ZK Rollups, and side chains), the ecosystem keeps changing and some applications end up being abandoned, such as Plasma and state channels.


More Layer 2 resources and considerations


Because these Layer2 are in their early stages, there are still risks and varying degrees of false trust assumptions compared to trading on the main network. It is also worth noting that although the security of the main network layer is exploited, layer 2 is only truly secure if proof of fraud is enabled, which (at the time of writing) they are not.


Blockchain Bridges, which people can use to move assets to tier 2, are also in the early stages of development and are highly risky. With all this in mind, it is advisable to conduct thorough due diligence through resources such as L2BEAT before participating in any tier 2.


This article is submitted and does not represent the opinion of BlockBeats.    


The original link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
This platform has fully integrated the Farcaster protocol. If you have a Farcaster account, you canLogin to comment
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit