The Ultimate Guide to Layer 2 (Part 1)

introduce

In this article, I will talk about the Ethernet Square, L2 on the current expansion of ecosystem status; and why I believe that in the long term run on the Square, L2 Ethernet solutions for the most economical and technology for sustainable expansion.

Disclaimer: This article summarizes my thoughts, other people’s resources, and various technical information. This article is not a simple summary of the expansion ecosystem, but a more detailed overview of the current state and future feasibility of Ethereum L2 scalability.

In order to study more deeply, we need to understand some definitions and concepts first.

Summary

To summarize this lengthy guide, I will list important points related to the technology and its future prospects:

  • Users will no longer need to interact with the Ethereum mainnet because it will only serve as the data availability layer for L2
  • The UX of the Web3 application will present all the complexity in a concise form
  • Modular blockchain is the most economical and technically feasible long-term scalability design solution
  • At present, Ethereum has a dominant position in the modular blockchain because it has strong security, and the security will be further improved with the switch to PoS
  • In the long run, proof of validity is better than proof of fraud
  • Volition L2 infrastructure (Validium + zk-rollup) is becoming the gold standard for L2 based on zkVM
  • As the L1 layer, Ethereum also uses data sharding, verkle trees, statelessness and other changes to improve scalability
  • The L2 field is accelerating the construction of a shared cross-L2 communication framework, which will enable different L2 projects to share liquidity and have smart contract composability
  • L2 uses ETH as a gas fee, but then uses the incentive mechanism to create DAO governance tokens to achieve decentralized operations
  • The application design space is expanding, as builders will have more bandwidth available and face fewer execution barriers

What is Layer2?

L2 (Layer 2) is a scaling solution that has a separate execution layer (where the code runs, in an environment such as EVM) and runs on top of L1 (L1 is Ethereum in our discussion). And this execution layer inherits the security assurance and decentralization characteristics of the L1 network. This means that if L2 goes down due to vulnerabilities or infrastructure failures, L1 will also safely protect users’ assets within the smart contract bridge.

Assets can be retrieved based on the latest status snapshot submitted to the mainnet. The real L2 bridge is completely permissionless and decentralized, so once users deposit funds, users can always access their assets. At present, several expansion solutions use different encryption certification mechanisms, all of which have different security and scalability trade-offs. In the following we will discuss the differences between them in depth.

Main types of L2

There are two parameters that can be used to classify L2 expansion solutions. One is based on the encryption certification used, and the other is whether their data availability (DA) is stored on-chain or off-chain.

There are two main types of proofs:

  • Validity Proof-This is a mathematical proof that uses zero-knowledge (ZK, zero-knowledge) cryptography to ensure the validity of transactions
  • Fraud proof-This proof introduces a so-called Dispute Time Delay (DTD). Once the proof is submitted to L2, the verifier has a certain amount of time to mark invalid proof; invalid proof may contain incorrectness The state transitions, which will impose penalties on the verifiers involved; then the state rolls back to the most recent valid snapshot state

What does it mean to store data availability on-chain or off-chain?

  • On-chain: The state data, together with all executed calldata (smart contract function calls, native token transfers, signatures) of all transactions, are put into the encrypted proof of the transaction bundle/rollup, which makes it possible to access and verify all data on the chain.
  • Off-chain: The executed calldata and state are processed by L2 and stored off-chain. This makes this solution insufficiently secure and decentralized. However, the off-chain data storage solution is easier to pack more transactions into one rollup, and therefore it is much faster than the on-chain data proof solution.

The Ultimate Guide to Layer 2 (Part 1)

Classification of expansion solutions

These are the main relevant attributes that help distinguish the different types of L2. However, since we can directly expand the capacity through L1, why use L2? Why not use cheaper chains such as Solana, Fantom, Avalanche or BSC? We will answer this question in the next section.

Modularity vs. Monolithic Infrastructure

In the blockchain, there is a well-known concept called the trilemma-that is, trying to optimize three main factors: security, decentralization, and scalability. It is very difficult to achieve the three optimizations in the same system. Generally speaking, the blockchain makes trade-offs on one of the three points and optimizes the other two points. In the use case of Ethereum, we first optimize the level of security and decentralization, while improving scalability as a secondary priority. To be clear, scalability is not the main priority of Ethereum core developers.

Throughout 2021, due to the growth of DeFi and NFT, the Ethereum mainnet has become more and more crowded. As a result, Ethereum’s demand for block space is unprecedentedly high. However, we cannot simply change the size of the block gas limit to increase the number of transactions that a block can contain, because this will greatly increase the hardware requirements for running a node, which means that it will become more difficult to run a node (lower Centralization). Furthermore, if the block becomes too large, this will break the consensus (reduce security).

Single blockchain

Other chains have adopted different methods. They prioritize scalability, followed by security, and finally decentralization. Let’s take the beta version of Solana mainnet as an example. The network has a main client development team (Solana Labs), about 1,000 validators (source: SolanaBeach), and another consensus mechanism called Proof of History (PoH).

Solana has adopted a unique expansion plan, which is a single type of blockchain. With the increase in computing power, they plan to expand the verification nodes of the running network indefinitely. This method reduces the degree of network decentralization, because node verifiers are forced to constantly purchase better-performing hardware to keep up with the network. Due to the quantum tunneling effect, when we reach the limit that can be accommodated inside the chip, people are worried that the growth rate of computing power will slow down. To some extent, we need a new computing paradigm or a major technological breakthrough to make this method sustainable. Therefore, my conclusion is that there are better long-term alternatives for blockchain expansion.

Modular blockchain

The modular blockchain solution essentially consists of a main network that prioritizes security and decentralization so that it can act as the L2 data availability layer. If this main network fails, all L2 will fail. However, if a certain L2 fails, all funds are safe (security is provided by L1). This is the method adopted by Ethereum, because L2 will provide us with the largest expansion space. Of course, there are other solutions to expand L1, such as data fragmentation, state expiry, verkle trees, and various other methods. However, it takes more time to implement these solutions because Ethereum prioritizes security and decentralization.

A key aspect of modular blockchains is that they can be expanded indefinitely without the need to quickly upgrade hardware. They can do this because they are technically and economically sustainable compared to a single blockchain architecture. As for why modular architecture is more sustainable than monolithic architecture, a more detailed argument can be found in this article, author: Twitter @epolynya (u/Liberosist-Reddit).

Essentially, the sustainability of the blockchain is analyzed from two dimensions:

Technology sustainability

  • Nodes need to stay in sync
  • Complete the synchronization from the genesis block of the blockchain within a reasonable time
  • Avoid over-expansion and loss of control

Economic sustainability

  • Ideally, the revenue generated by L1 is higher than the cost of operating the network
  • The throughput cannot be increased artificially, because eventually all centralized L1 will have to increase their fees

Rollup and data sharding (rads) have become the only solutions to meet these needs, which is why the modular architecture is the only long-term feasible solution for expansion.

For a more complete explanation, please read the article @epolynya’s articles in the “Extended Reading” section below.

The current state of L2 and how users can benefit from it

We are realizing capacity expansion, and the solutions we have been researching over the past few years are already online-at least providing a limited amount of expandable capacity. And in the near future, there will be more solutions to release an improved version of its L2 and an Alpha version on the main network. In the “Main Types of L2” section above, the different attributes of the expansion plan are described. According to these attributes, the expansion plan can be divided into different categories.

Incomplete list of L2 solutions

Optimistic rollups

➤ arbiter

Arbitrum is built by the Offchain Labs team. The network itself is called Arbitrum One, and it uses optimistic rollup technology to expand Ethereum. Arbitrum One uses fraud proofs and has on-chain call data availability, which means that all data for each transaction is completely sorted, bundled and submitted to the mainnet. Since Arbitrum uses fraud proofs, it will have a dispute time delay (DTD) of approximately seven days. Once the DTD is passed, the status change on the network can be considered valid, and users can raise their available balance through the local bridge. We will discuss other centralized bridges later. These bridges allow you to bypass the fraud proof cycle through the cross-L2 liquidity pool and achieve instant withdrawals.

Arbitrum One is currently the L2 network with the highest lock-up volume. A great website L2Beat counts these data for us.

There are already many protocols and applications that support Arbitrum, including infrastructure that supports seamless switching to Arbitrum L2. The only problem with using L2 is that it needs to accumulate more liquidity, and innovative solutions like cross-L2 AMM architecture (such as dAMM invented by Starkware and Loopring) and liquidity protocols such as Connext and Hop require enough liquidity. It’s flexible and sufficiently decentralized so that all scaling solutions can share the same infrastructure without causing ecosystem fragmentation.

For an overview of the ecosystem of the Arbitrum application, please visit the Arbitrum Portal webpage.

Main tools:

  • Block Explorer-Arbiscan
  • Bridge-Arbitrum native bridge (withdrawal requires about 7 days of DTD time)
  • Network RPC configuration-Chainlist (search for Arbitrum One and add to MetaMask ) / Before bridging your assets, please check whether your mobile wallet supports Arbitrum (this may cause permanent loss of your property) — personal advice: Rainbow wallet (disclaimer : Arbitrum is not yet supported)
  • AMM Aggregator-1inch

If readers are confused when using Arbitrum Bridge, please check the Arbitrum Bridge tutorial. If you want to bridge from a network other than Ethereum, please check the L2 bridge section below (note that these bridges have different degrees of centralization).

Nitro controller

Arbitrum Nitro is an upgraded version of Arbitrum One L2. It uses Web Assembly (WASM) goals instead of custom AVM (Arbitrum VM) to be responsible for fraud proof. This upgrade will also make the entire system more compatible with EVM. Another change is that the EVM emulator (EVM-emulator) will be replaced by Geth (Geth is currently the most running Ethereum client). ArbOS components have also been modified to provide cross-chain communication; a new and improved transaction batching and compression system will also be released to minimize L1 costs.

This upgrade will be rolled out seamlessly, so users don’t need to do anything. After the upgrade, the execution speed is expected to increase by 20-50 times and greatly reduce transaction costs. For more information, please read the announcement issued by the Offchain Lab team.

Arbitrum’s future direction

As the Offchain Labs team claims, Arbitrum is not just an optimistic rollup solution, they will launch other zero-knowledge proofs-based expansion solutions, and will continue to improve the Arbitrum One optimistic rollup L2 solution. This is a good example of the zero-knowledge trend, and many projects are turning to the zero-knowledge direction. Because once the technical implementation of zk L2 has been better studied and general EVM calculations can be realized, the execution environment will be more flexible, or more scalable.

Optimism

Optimism is a public welfare company (PBC) that has built an optimistic rollup L2 solution Optimistic Ethereum (OE) on Ethereum. I will describe OE by explaining the similarities and differences between Arbitrum and OE in terms of infrastructure. For a detailed comparison, you can read the introduction to the tweet posted by Kris Kaczor.

The similarities between Optimism and Arbitrum:

  • All belong to rollup and all transaction data is stored on L1
  • All belong to the “optimistic” mechanism, because they all use fraud proofs
  • Both use sequencers to achieve instant “final certainty”
  • All have general cross-chain communication functions, which can be used to build advanced token bridges
  • Both support EVM-related tools, but need special plug-ins

The difference between Optimism and Arbitrum:

  • Has different fraud proof verification mechanisms
  • Optimism OVM 2.0 is currently EVM equivalence, while Arbitrum One (even after Nitro upgrade) is only EVM compatible
  • Optimism uses a single round of fraud proof, while Arbitrum uses multiple rounds of fraud proof
  • Deploying apps on Optimism still requires permission (opening private whitelisted networks for previous applicants), while Arbitrum has released a public mainnet version (no permission required)

Main tools:

  • Block Explorer-Optimistic Etherscan
  • Native Bridge-Optimism Gateway
  • User’s Guide
  • Existing application portal
  • Network RPC settings-Chainlist (search for Optimistic Ethereum)

OVM 2.0

OVM is the abbreviation of Optimistic Virtual Machine (Optimistic Virtual Machine), which is a virtual machine that executes all transactions in OEL2. OVM 2.0 completed the mainnet upgrade on November 11.

Optimism achieves the goal of EVM equivalence through the OVM 2.0 upgrade, which will make OE a compilation goal that is completely equivalent to EVM. Developer tools like Dapptools (smart contract code base and command line tools — formal verification, symbolic execution, project management, etc.), Hardhat, Solidity, Vyper, etc. will be able to run directly on OVM 2.0 locally. The development of these tools Don’t worry about how to support fragmented code bases. This is the powerful “network effect” mentioned by everyone in the Ethereum community. It is worth noting that any competitor to EVM must rebuild all these developer tools from scratch.

Read Optimism’s blog post to learn how they achieve EVM equivalence.

Retroactive public goods fundraising

I think one of the most important announcements made by the Optimism team is that they promise to use all their profits to promote the development of public goods (a total of more than $1 million), and retroactively use quadratic voting. The team also promised to donate 100% of the profits of the L2 sequencer to promote the development of public utilities. This profit is the amount of transaction fee income generated minus the cost of submitting a fraud proof to the Ethereum main network and the remaining amount. This other L2 project in the Ethereum community has set an example of altruism.

OE’s future direction

Optimistic Ethereum’s future plans are ambitious, and its roadmap can be viewed in the Optimism specification.

Excerpted from its specification:

The Ultimate Guide to Layer 2 (Part 1)

The roadmap and abstract design are to enable each component to develop independently. The 4 main components are:

  • optimistic mainnet deployment
  • Fraud proof infrastructure
  • Stateless client
  • Fragmentation

Each component will be released in an independent and incremental version, and each update will make Optimistic Ethereum more unified and more powerful.

Boba Network

Boba is an Ethereum L2 expansion solution built by the Enya team, the core contributor of the OMG Foundation. Boba is an Optimistic Rollup solution that can reduce gas fees, increase transaction throughput, and expand the performance of smart contracts. Boba provides users with a quick exit function through the community-driven liquidity pool (similar to other solutions such as Connext or Hop protocol), which shortens the exit cycle of Optimistic Rollup from 7 days to only a few minutes, while allowing liquidity providers to Conduct liquidity mining and benefit from it.

Boba was originally formed by forking Optimism, and their team is one of the key contributors to OVM (optimistic virtual machine). An interesting fact is that Boba deployed OVM 2.0 earlier than optimism rollup, which was released on Optimistic Ethereum on November 11. Although Boba is forked, they do have a modular structure that allows them to submit proofs to the mainnet, which allows for upgradeability or zero knowledge in the future. The team plans to completely rewrite the code base for the upcoming v3, which will be released on the mainnet in the next few months. Boba’s design can also achieve smart contract scalability and allow developers to build dapps to call code executed on web-scale infrastructure (such as AWS Lambda), which makes it impossible to execute on-chain or costly algorithms. use.

BOBA Airdrop-Governance Token

resource:

  • Block explorer
  • Boba web portal (bridging)
  • Developer portal

Metis

Metis is an L2 expansion solution on Ethereum, which uses a parallel or fragmented optimistic rollup architecture. In the Metis virtual machine (or MVM), there are so-called decentralized autonomous organizations, namely DAC (Data Availability Committee), which have independent computing and storage layers and can be applied according to L2 (such as DAO, dapp, protocol, etc.) The needs of customization. These DACs are the parallel execution layer of optimistic rollup. Because DAC has a cross-layer communication protocol, each DAC is fully interoperable, and fluidity can be transferred between them seamlessly. According to Metis’ technical white paper, the expansion solution they designed can scale Ethereum horizontally without investing a lot of money in infrastructure.

During my time in Liscon, I came across the Metis DAO team by chance. My understanding of its basic architecture is that it is a network with different execution layers, and different execution layers serve specific users to achieve expansion purposes (DAO, dapp). Etc.), and at the same time, by submitting a fraud proof to the main network to ensure that it has the level of Ethereum L1 security. There may also be some public DACs, such as some AMM liquidity agreements used for swap. Because of its native interoperability across DACs, users of other DACs can also use this public DAC when needed. This is a novel design and interesting experiment.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/the-ultimate-guide-to-layer-2-part-1/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-12-02 21:03
Next 2021-12-02 21:07

Related articles