What is Blockchain Layer 2 | Types, Points of Interest, and Typical Networks

1 year ago 84

Blockchain scaling technology

Blockchain has the advantage of being able to build a decentralized system with security, transparency and immutability, and its popularity is increasing.

Starting with remittance and settlement of crypto assets (virtual currency), operation in DeFi (decentralized finance), trading of NFT (non-fungible token), GameFi elements that combine them, and the number of users as use cases are born has increased.

However, since blockchain has limited transaction processing resources, Layer 2 scaling solutions are attracting attention.

Layer 2 functions separately from the basic layer of the blockchain (Layer 1), with the aim of improving the speed and efficiency of transaction processing by processing transactions and smart contracts off-chain (outside the blockchain). technology developed. This reduces the load on-chain (on the blockchain) and improves overall scalability.

In this article, we will provide an overview and benefits of layer 2 scaling solutions, and mainly focus on high-profile projects in the Ethereum (ETH) ecosystem.

table of contents
  1. What is layer 2
  2. What is the scalability problem of blockchain?
  3. Layer 2 type
  4. roll up
  5. Optimistic Rollups
  6. ZK-Rollups
  7. ZK-EVM
  8. channel
  9. sidechain (plasma)
  10. Difference between layer 2 and sidechain
  11. summary

What is layer 2

Layer 2 is an additional layer created to solve the scaling problem of blockchains, taking over transaction processing from Layer 1 blockchains and supporting application scalability.

Layer 2 can process more transactions per second by sending compressed transaction data back to Layer 1 while leveraging Layer 1’s strong decentralized security. Layer 1 is responsible for ultimate security as it stores information that proves the legitimacy of a transaction.

By implementing Layer 2, end-users can enjoy high-speed processing of transactions and reduce the burden of transaction fees (gas costs).

Blockchain “scaling solutions” include sharding, parallel chains, and side chains, but the difference between them and Layer 2 is that they are implemented while utilizing the strong decentralized security of the mainnet.

Also, since layer 2 is implemented as an additional layer, there is no need to change the structure of layer 1. Many projects have been launched in recent years because Layer 1 can support multiple Layer 2s.

What is the scalability problem of blockchain?

The scalability issue is that a blockchain can only process a limited number of transactions per second, so a sudden surge in users or usage will result in longer transaction processing latency, higher fees, and poor user experience. Point.

Since Ethereum determines transaction fees based on the auction principle, fees can skyrocket. Other blockchains may have higher processing power and lower fees, but may come at the expense of security or decentralization.

Layer 2 scaling solutions are being developed to solve these blockchain scalability problems.

Layer 2 type

“Layer 2” scaling solutions include Optimistic Rollups, ZK Rollups, and Channels. They support application scalability by offloading transaction processing from Layer 1 blockchains while leveraging Layer 1 security.

Layer 2 scaling solutions have different technical approaches and different use cases. Introduce the characteristics of typical networks.

roll up

It is a technology that executes transactions off-chain, combines multiple transactions into a single block, and submits it to Layer 1.

Compared to other scaling solutions such as channels and sidechains, rollups have the characteristics of allowing anyone to participate and maintaining a higher level of security. Broadly divided into Optimistic Rollups and ZK Rollups, each has a different security model.

Rollups are being promoted as a pragmatic approach to Ethereum’s scalability problem.

connection:What is “Rollup”, a solution to the scaling problem? Detailed explanation of the mechanism and points to note

Optimistic Rollups

Optimistic Rollups operate on the assumption that the legitimacy of trade batches is “optimistically” valid, and typically do not publish data proving validity. However, it employs a “fraud proof” scheme in case of fraud in the transaction batch calculation.

After the transaction batch is sent, there is a certain period of time (challenge period) during which anyone can check whether there is any fraud. If there is fraud, a “fraud proof” is submitted to invalidate the transaction batch and penalties and rewards are given to the nodes involved.

Therefore, the Optimistic Rollups security model consists of an environment in which at least one honest node exists and can submit fraudulent proofs at any time.

Optimistic Rollups can also run on the Ethereum Virtual Machine (EVM), allowing the migration of existing Ethereum dApps and projects to build complex use cases.

Typical examples of Optimistic rollup include Arbitrum (ARB), Optimism (OP), and Boba Network. Notably, Arbitrum has $1.7 billion in total assets (TVL) deposited, while Optimism has $940 million (DeFillama: at time of writing).

Ethereum’s original L2 network “Base”, whose development is led by the major US virtual currency exchange Coinbase, is also a kind of Optimistic rollup and is built on the Optimism base. The Base testnet went live on February 23, 2023. Base will use ETH to pay for gas and has no plans to issue its own token.

connection:Coinbase’s L2 “Base” Calls for Development in 4 Focus Areas

ZK-Rollups

ZK-Rollups is a technology that performs transaction processing and state storage at Layer 2 and sends only minimal summary data to Layer 1.

It uses a zero-knowledge proof technique called validity proof to prove that the final state change processed at layer 2 is the final result of executing all the transactions in the batch.

A zero-knowledge proof is a method of cryptographically proving that a prover has knowledge of information without revealing the “actual information” to the verifier. It is attracting attention as a means of utilizing data while protecting privacy in a transparent environment of public chains such as Ethereum.

▶Cryptocurrency Glossary

ZK-Rollups are fast and don’t require a challenge period, but are expensive to compute and validate, and can increase gas costs.

Also, unlike Optimistic Rollup, ZK-Rollups are not compatible with the Ethereum Virtual Machine (EVM), so developers often need to develop new smart contracts and tools.

Loopring, ZkSync, and PolygoZkEVM, which are representative projects of ZK-Rollups, have just opened, so the number of users is small, and the fixed cost of writing to Layer 1 is shared among users at that time. , the gas bill may become expensive. At the moment, it is often confirmed that gas prices are higher than Arbitrum and Optimism.

Source: L2 Fees

Therefore, zk-Rollups seems to be suitable for simple use cases. It has been used in application-specific protocols.

However, ZK-EVM, which is compatible with the Ethereum virtual machine, has recently appeared, and it is expected that a wider ecosystem will be formed. ZK-Rollup and its derivatives may become more efficient and practical as zero-knowledge technology evolves in the future.

ZK-EVM

ZK-EVM is a virtual machine for verifying the correctness of program execution using zero-knowledge proofs. Being able to run Ethereum smart contracts allows dAapps developers to build apps with smoother scalability and security.

ZK-EVM is still in the development stage and few projects have mainnet launches, but there are multiple testnets. Developers and users can test the following products with ZK-EVM:

1.zkSync (ZKSync Era): Developed by Matter Labs. Mainnet (β) launch on March 24th, more than 200 projects are waiting. Support for “account abstraction”.

connection:Ethereum L2 “zkSync”, zkEVM mainnet alpha version now available to all users

2. Polygon zkEVM: Developed by Polygon Labs. Mainnet (β) launch on March 27th. Over 50 projects in operation.

connection:Polygon Launches Mainnet Beta for ‘Polygon zkEVM’

3. StarkNet: Developed by StarkWare. Launch of permissioned mainnet StarkNet Alpha in November 2022. After that, we plan to migrate to the permissionless StarkNet Beta. As of March 17th, the ecosystem boasts over 1000 developers and over 400 GitHub repositories.

4.Scroll: Developed by Scroll Technologies. In February 2023, the alpha testnet was launched on the Ethereum testnet “Goerli”. We plan to participate in the Ethereum hackathon event “ETHGlobal” in Tokyo.

connection:ETHGlobal Tokyo to Host Global Hackathon Event in Tokyo

5.Linea(ConsenSys zkEVM): Developed by ConsenSys. Supports tools such as Metamask and Infura from the beginning. A public testnet was launched on March 28.

connection:ConsenSys to Launch Public Testnet for zkEVM on March 28th

channel

A channel is a technology in which two or more users conduct transactions off-chain and send the final state to Layer 1.

Deposit funds into a multisig (multiple signature) contract and, in the case of Bitcoin, use the Script language to conduct P2P transactions. Once the channel is closed, Layer 1 reflects the final state of transactions made off-chain.

Prior agreement between participants is required, and usage is limited to what can be agreed upon with the person opening the channel. However, even if a direct channel is not opened between users, there is also a mechanism that enables transactions to be conducted indirectly.

There are two main types: payment channels and state channels. Typical examples are the Lightning Network for Bitcoin and the Raiden Network for Ethereum.

connection:What is “Lightning Network” that even beginners can understand? | Explanation of features and mechanism

sidechain (plasma)

A sidechain is a technology that bridges Layer 1 assets and makes them available on another blockchain. It operates on different protocols and rules than the main chain, and can be customized, but security and data availability are often independent of the main chain.

However, Plasma is considered to inherit the security of the main chain because the “root” of the off-chain block (aggregation of hash values ​​of blocks containing transactions) is exposed to Ethereum.

The Polygon PoS chain (formerly MATIC) is a hybrid chain combining Plasma and Proof of Stake that uses the PoS consensus mechanism to create a separate blockchain connected to Ethereum, where transactions are processed before Ethereum commits regularly to the main chain of

Difference between layer 2 and sidechain

A sidechain is another blockchain that is connected to the mainchain with a two-way peg. Support application development that specializes in specific use cases and functions in order to increase the scalability and programmability of the main chain.

A two-way peg realizes asset movement by locking an asset on one chain to another chain and releasing its corresponding asset on another chain, but the transaction result (state) on the sidechain is Layer 1. not sent to

The state data is stored in the sidechain, and the availability of data (data is distributed and maintained by multiple nodes) depends on the validator of the sidechain, which raises concerns about security risks.

On the other hand, Layer 2 is just an additional layer and assumes connection to the main chain (Layer 1) in the part that maintains the overall security and integrity. Layer 2 periodically sends compressed transaction results (states), and the main chain ensures data availability.

Each Layer 2 implementation has its own mechanism for ensuring data availability. For example, in the case of Optimistic Rollups, the reference “state data” is on the main chain, and anyone can use that data to verify the correctness of the work done within the rollup.

Incentives are built in so that even if a rollup operator does something malicious (e.g. creating a bad block), it will be detected.

summary

Since 2021, a number of Layer 2 projects have been established to enable Ethereum scaling. Projects such as Optimism and Arbitrum issue their own tokens and try to decentralize their projects, so it is necessary to consider the risks of each.

For example, if a rollup’s sequencer goes down, you may not be able to access your funds. Therefore, it is important to conduct a survey in advance before using L2, evaluate the risk, and consider the investment capital.

For more information on Layer 2 technologies, risks, and trust assumptions, we recommend reviewing L2BEAT, which provides a comprehensive risk assessment framework for each project.

connection:Ethereum L2 “Arbitrum” decentralizes operations to implement its own token distribution

The post What is Blockchain Layer 2 | Types, Points of Interest, and Typical Networks appeared first on Our Bitcoin News.

Read Entire Article