Understanding Ethereum Layer 2 Solutions at a Glance: ZK Rollup, Optimistic Rollup, Validium, Plasma

DaolecticResearch
2022-03-09 11:34:36
Collection
The Layer 2 ecosystem is about to explode. How do they actually work?

Author: Daolectic Research

Original Title: 《How to scale Ethereum? --- A comprehensive analysis of all the actual Layer 2 environment

Compiled by: Linqi, Chain Catcher

One of the most controversial topics in the blockchain space is undoubtedly scalability.

Specifically, as Ethereum becomes increasingly popular, the number of transaction requests in blocks is also rising, leading to higher transaction costs. Since the Ethereum mainnet processes about 15 transactions per second, it is necessary to improve throughput. To alleviate the burden on Ethereum nodes, many L2 solutions have emerged, each with its own advantages and disadvantages.

To enhance the speed of the Ethereum network in its actual single-chain configuration, various alternative scaling strategies have been applied: they all aim to reduce the load on transaction processing on the Ethereum main blockchain to improve scalability, but the approaches taken vary.

It is worth noting that these scaling technologies are not unique to Ethereum and can also be used on other networks.

Existing Major Scaling Solutions

In fact, there are already several novel consensus algorithms and technologies, such as sharding, that can directly address scalability issues at the base layer.

In recent months, sharded chains, which account for only a small portion of the current blockchain, have gained significant attention. Particularly in the realm of blockchain games, developments such as DeFi Kingdoms based on Harmony One and the launch of Aurora, an EVM-compatible chain on Near Protocol, have emerged. The main driving force behind the development of these ecosystems is the actual value of the applications deployed within them, which enhances user experience through faster block times and lower gas fees.

Ethereum 2.0 may belong to the sharding family.

Additionally, there are sidechains and solutions built on technologies like rollups: this technology inherits all the security and consensus protocols from the main layer, offering considerable advantages compared to most other scaling technologies. In this regard, these solutions can be classified as "non-custodial" sidechains.

Essentially, rollups collect a large number of transactions, compute them off-chain, and then broadcast them as a single on-chain transaction.

Currently, the rollups active on the Ethereum mainnet are divided into two types:

  • Zk Rollup (Zk stands for Zero Knowledge), supported by validity proofs
  • Optimistic, supported by fraud proofs

image

Zero Knowledge Proofs (ZKP)

Starting from its pure definition, Zero Knowledge Proof (ZKP) is a set of tools that can verify information without revealing the underlying assumptions.

The term "zero knowledge" comes from the idea of providing no ("zero") information about a specific fact: this is achieved through a set of cryptographic techniques that allow the "prover" to demonstrate to the "verifier" that a computational assertion is valid without disclosing any data.

ZKP has been introduced into the blockchain space. Zero knowledge proofs are divided into two types: interactive and non-interactive.

  • Interactive ZKP requires the prover to perform a series of activities or operations to convince the verifier that they possess certain knowledge. Most of the activities required in interactive ZKP involve mathematical probability concepts.
  • Non-interactive ZKP does not require interaction between the prover and the verifier; instead, verification can occur later. In this case, such ZKP requires additional computing or software.

All ZKPs (interactive or non-interactive) must meet three prerequisites:

  1. Completeness: If the statement is true, the verifier can verify all necessary inputs held by the prover.
  2. Soundness: The judgment cannot be refuted, and verification will not hold if the prover does not provide the necessary inputs.
  3. Zero Knowledge: The verifier will not see any other information beyond determining whether the statement is true or false. Personal data will always remain anonymous and encrypted.

Related Reading: Popular Science: What is Zero Knowledge Proof, and what are its use cases?

ZK Rollup

Zk Rollup submits all transaction data to the main chain and uses Zk-Snark (Zero Knowledge Succinct Non-Interactive Argument of Knowledge) to verify transactions.

Vitalik Buterin proposed this cryptographic tool in 2018.

The abbreviation SNARK stands for Succinct Non-Interactive Argument of Knowledge:

  • "Succinct" means the proof is shorter than the underlying data.
  • The knowledge argument indicates that a prover cannot construct a verifiable proof without appropriate "witnesses" or evidence to substantiate the information they provide.

Once these verifications are completed and published to the main chain, all transactions contained within are declared final. Due to the use of cryptographic activities, the processing power required for L2 nodes to construct proofs is very high and faster.

image

ZK rollup combines transactions through relayers, which then generate zkps to prove the authenticity of the transactions. After that, the proof is submitted and published on the main layer.

Related Reading: Understanding ZK-Rollups: How do they bring a paradigm shift to the Crypto ecosystem?

Optimistic Rollup

The basic assumption of Optimistic rollup is that all processed transactions are valid. In fact, this name comes from the optimistic state of the node chain.

Whenever an invalid transaction is discovered, nodes can challenge the batch of transactions by providing fraud evidence: a batch of transactions will be re-executed on the main chain by the underlying system supporting optimistic rollup (optimistic virtual machine, OVM).

Overall, OVM allows transactions on L2 to be completed even if they have been rejected by L1 as invalid: furthermore, if a transaction is deemed invalid, the L2 chain will be reset to the state that existed before the fraudulent transaction. Due to the fraudulent transaction, all subsequent transactions are rendered useless.

Since the optimistic approach is based on the premise that submitted transactions are always true until proven otherwise, it is considered "trust-based" to some extent.

image

If appropriate incentives are provided to participants in the ecosystem, this assumption may hold true. However, additional precautions are also necessary to prevent worst-case scenarios. For example, when transferring assets from L2 to L1, Optimism stipulates a seven-day waiting period to give verifiers enough time to detect and flag fraudulent transactions.

Validium

Validium operates similarly to ZK rollup, with the difference being that data is stored off-chain. Because transaction data is not published on the blockchain, it is necessary to adopt additional trust assumptions, and users must trust the operators to access the data when needed.

The off-chain data storage of Validium has many benefits, including faster transaction speeds and improved user privacy since the public cannot access the transactions.

However, since data is stored off-chain, users will not be able to see their available amounts in smart contracts at all times.

Therefore, users must obtain data from the relayers to manage their funds, and they must trust the relayers.

To address this issue, solutions like StarkWare provide a Data Availability Committee (DAC) that stores all off-chain data and becomes publicly accessible in emergencies, reducing users' reliance on relayers: since it still uses zkps, there is no risk of broadcasting incorrect states; users now only need to trust the timeliness of the information.

The Validium solution is relatively new, built on the foundation of ZKR, and its momentum will continue to grow as the validity proof suite for scaling solutions becomes increasingly popular.

Projects using Validium solutions include DeversiFi, ZKSwap (payment, trading platform), Sorare (football NFT game), and Immutable X (NFT marketplace).

Plasma

In the Plasma family, several blockchains essentially replicate Ethereum and connect to Ethereum through a trust-minimized bridge architecture. Each Plasma chain can adopt its own transaction validation process, but the Ethereum blockchain still holds the authority for the finality of transactions.

Plasma does not require users to have absolute trust in operators; even in cases of dishonesty or interference, users always have the opportunity to reclaim their funds. While the launch of Plasma generated significant interest in the Ethereum community, it also brought many challenges: new data availability network attacks, the requirement for users to monitor transactions to detect malicious activities, and concerns about the data capacity on the main chain when a large number of users attempt to exit the Plasma chain simultaneously have slowed the adoption of Plasma-based systems.

Moreover, many Plasma designs are plagued by a series of user experience and security issues, and they do not provide native convenience for the development of smart contracts. OMG and Polygon have now abandoned Plasma, leading some to believe it has effectively ceased to exist.

Technical Comparison

So far, Optimistic rollup has received the most attention and adoption, thanks to its nature that allows developers to "copy and paste" their Ethereum applications onto the L2 platform.

Top applications on the Ethereum mainnet, such as Uniswap and Synthetix, have begun deploying their applications using Optimistic rollup solutions based on probability. Similarly, ZK rollups and Validium solutions, while currently having very limited support for general smart contracts, are still actively being deployed.

A major advantage of ZKR over Optimistic Rollup is the absence of a dispute period (withdrawal time). Since zkps are used to establish transaction authenticity, relayers cannot deceive the system. Another factor to consider is that ZKR users can always move their assets since the data is always stored on-chain.

Related Reading:

Why Optimistic Rollup is seen as the future of Ethereum scaling compared to ZK Rollup?

Polygon refutes Offchain Labs: ZK Rollup is the future of Ethereum scaling

Overall, the development of these initiatives highly depends on what they can offer. The future of zero-knowledge proof EVM compatibility provides a promising outlook for the development of validity proof-based L2 solution combinations.

image

As Matter Labs and StarkWare pioneeringly choose data availability to utilize the accessibility of these proofs, they may surpass the popularity of optimistic rollup. The security provided by zero-knowledge proofs, along with the difficulty for relayers to publish malicious activities, makes the future of L2 systems adopting their power look brighter.

As of February 20, the total TVL of the entire L2 ecosystem is approximately $6 billion.

According to the data from L2Beat shown in the chart below, optimistic rollup accounts for 70% of the total market value, with Arbitrum ranking first at $3.1 billion. dYdX is the L2 adopting ZK-Rollup, following closely with $995 million. So far, the TVL related to Validium is relatively low, but with the emergence of IMX and Sorare, it also has significant growth potential.

image

Conclusion

The use of rollups is expected to be the most common scaling method in the future. Many of these have been deployed for the first time recently, marking an important milestone. Given that the release of Ethereum 2.0 is still a long way off, rollups may exist for a long time.

Composability is a key element of Ethereum, allowing anyone in the network to easily build new use cases on and around existing assets.

If you are a user of the Ethereum network, this actually gives you a lot of freedom: you can conduct relatively complex transactions through some user-friendly activities on the same chain within the same security framework.

While L2 solutions have significantly improved user experience by lowering gas fees, they also provide options for independent execution environments.

Recently, application developers have become hesitant about which platform to deploy on, as they have been observing which L2 solution is more popular.

Integration between one or more L2s will be a key aspect of future development. This will not only impact the network effects of the entire Ethereum ecosystem but also have significant implications for the broader smart contract platform environment.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators