HashKey Cui Chen: Interpreting the Competitive Landscape and Trends of Ethereum Layer 2

Cui Chen
2021-04-30 12:41:03
Collection
Ethereum Layer 2 solutions will develop along differentiated paths, with the competition for developers and users being the core focus.

This article was published on ChainNews, author: Cui Chen, employed at HashKey Capital Research, reviewed by Zou Chuanwei, Chief Economist of Wanxiang Blockchain.

The scalability issue of Ethereum is urgent, while the development of Ethereum 2.0's sharding plan is slow. Layer 2 scaling solutions are most likely to change the congestion status of Ethereum in the short term. Teams practicing Layer 2 scaling in Ethereum are implementing corresponding products based on similar or different technical solutions, such as Rollup and Plasma. Currently, most products are still in the development stage, and their patterns will affect the landscape of the Ethereum ecosystem. This article interprets and evaluates the practicality of the solutions disclosed by Layer 2 development teams, summarizing the development trends of Layer 2 projects and the problems currently faced by Layer 2 solutions.

Understanding Layer 2 Solutions and Their Competitiveness

Layer 2: The Intermediary Between the Underlying Layer and Applications

The idea behind Layer 2 solutions is to move the computation processes that should run on Layer 1 off-chain and return the results to the chain for confirmation. Whether it is a simple transfer or a complex smart contract, Layer 2 solutions can achieve fast transactions to save Gas fees. As a scaling tool in Ethereum, Layer 2 also serves as an intermediary layer connecting the underlying network and upper-layer applications. From this perspective, there are two main requirements for Layer 2: applications need Layer 2 for quick settlement; the mainnet and users need Layer 2 to ensure the correctness of computation results and the safety of funds.

Generally speaking, technologies such as Rollup and Plasma achieve communication between the Layer 2 layer and the main chain through smart contracts on the main chain. Users interact with smart contracts to recharge and withdraw on Layer 2, and Layer 2 returns the results to the main chain by updating the state. However, state updates do not occur automatically and require a designated responsible party to execute, which is the Layer 2 operator. Taking Rollup as an example, although anyone can perform Rollup operations, off-chain computation and updating the main chain require resources, so economic incentives for operators are necessary to ensure Rollup operates sustainably. Especially for solutions that require fraud proofs and challenge periods, without suitable incentive mechanisms, it is difficult to maintain project sustainability. Transaction fees on Layer 2 are borne by users, and operators receive these rewards. Sidechains, as a broad form of Layer 2, also operate in this manner, with independent validation nodes, and users must send requests to the sidechain nodes when using sidechains or performing cross-chain transactions. Layer 2 acts as an intermediary between the underlying network and application, charging fees for the convenience it provides.

Manifestation of Layer 2 Solution Competitiveness

From another perspective, the development of Layer 2 is related to both the underlying network and applications. If the underlying network Ethereum encounters problems leading to no users, there is no need for Layer 2 scaling. If there is no thriving application ecosystem on Layer 2, there will be no users, and thus no necessity for its existence. Involving both applications and users, the competition among Layer 2 solutions resembles the competition among public chains. However, unlike public chains, users exiting a public chain ecosystem cannot easily transition to another ecosystem unless they sell all assets in the public chain, while users on Layer 2 can freely enter and exit Layer 2 applications. If applications on Layer 2 are not attractive, users can switch to other Layer 2 applications at any time. In the current environment, Layer 2 itself does not have inherent attractiveness for users; the focus is more on the applications built on Layer 2. Therefore, Layer 2 must emphasize two aspects of experience: the developer experience and the user experience.

Ethereum has already formed a moat effect in the developer community, so for Layer 2, the closer it is to Ethereum's development environment, the more favor it will gain from developers. Especially since many target applications of Layer 2 have already been deployed on the mainnet, requiring developers to develop specifically for the Layer 2 environment can be very time-consuming. Like any new technology, Layer 2 solutions also have first-mover advantages, especially since Ethereum users are eagerly anticipating the launch of Layer 2 networks. Therefore, quickly developing Layer 2 solutions and deploying popular applications is currently the most effective way for Layer 2 to enhance its competitiveness.

To improve user experience, the first step is to protect the safety of user funds. Secondly, users should be able to move seamlessly between the mainnet and Layer 2; if the operations are cumbersome, it will create barriers for users and affect the number of users. Additionally, Layer 2 must provide a smoother user experience than the mainnet and effectively save Gas fees.

In summary, the comprehensive evaluation of the costs users incur to use Layer 2 and the conveniences they gain represents the competitiveness of each Layer 2 solution.

Layer 2 Solutions and Their Characteristics

Layer 2 technical solutions can be categorized into several types, such as state channels, sidechains, Plasma, and Rollup, with the same technology being developed into different versions by different teams. Below are the currently popular Layer 2 solutions and their characteristics.

Optimistic Ethereum

Optimistic Ethereum (OE) is a Layer 2 network developed by Optimism based on Optimistic Rollup technology, with plans to launch the mainnet in July 2021. Currently, there are demo versions of two applications, Synthetix and Unipig (the Layer 2 version of Uniswap), on the testnet, which will also be among the first applications to launch on the mainnet.

OE uses its own OVM virtual machine, which serves as a substitute for EVM on Layer 2. Due to different execution environments, these two are not entirely the same; smart contracts executed on the main chain need to be transformed into operation codes suitable for OVM. In OE, fraud proofs and challenge periods are required to determine the correctness of the state, involving multiple transactions on Layer 1 and requiring a certain amount of time. The final confirmation of the state on Layer 2 takes 7 days, and if fraudulent transactions are detected, they will be rolled back. The security of OE also comes from the guarantee of fraud proofs, where users who reveal erroneous transactions and submit proofs on OE will be rewarded. To prevent operators from maliciously acting without cost, becoming an operator requires depositing a trust bond on Ethereum. If their fraudulent behavior is discovered by validators, part of the operator's bond will be given to the validators, and part will be destroyed, considering that operators might try to run away before validators present their proofs.

Due to the existence of fraud proofs and the limitations of the challenge period, users face a one-week waiting time when withdrawing, which is a current drawback of OE that can be addressed through liquidity provider solutions. If a validator in OE proves that a user's transaction is correct, after the stipulated time, the user can actually withdraw, and the validator can act as a liquidity provider, pre-advancing funds to the user and waiting for the user to complete the withdrawal before being repaid, thus earning interest during the challenge period. Alternatively, if the applications users need are all on OE, they may not need to withdraw to the main chain.

In terms of fees, users need to incur Gas fees when transferring and withdrawing to OE smart contracts, and they may also pay Gas fees to operators when trading on OE. The calculation of Gas fees in OE differs from that on the mainnet; for example, the Gas Price on OE is a fixed constant, currently set at 1 Gwei, without requiring users to make additional settings.

Arbitrum Rollup

Arbitrum Rollup is implemented by the Offchain Labs team, also based on Optimistic Rollup technology, and has released the testnet V4 version, which is a candidate for the future mainnet. In addition to Rollup, Offchain Labs plans to develop state channels and sidechains for other applications that are not yet online. The testnet ecosystem of Arbitrum Rollup includes applications such as Bancor, Balancer, Bounce, MCDEX, and Arbiswap (the Arbitrum version of Uniswap), as well as infrastructure like Chainlink and The Graph.

HashKey Cui Chen: Interpreting the Competitive Landscape and Trends of Ethereum Layer 2Figure 1: Arbitrum Architecture

As shown in the figure above, Arbitrum is built on Ethereum, using EthBridge to maintain the connection between Layer 1 and Layer 2. Calling the EthBridge contract allows interaction between the mainnet and the Arbitrum chain. Above the AVM Architecture is the Arbitrum virtual machine (AVM) that operates at the underlying level, with ArbOS running entirely within the AVM, responsible for managing and executing smart contracts. Most importantly, ArbOS provides an EVM-compatible execution environment for smart contracts. Users in the upper left corner can interact with Arbitrum using wallets or frontend tools without needing new tools, and developers do not need to perform additional development; they can directly migrate existing Solidity contracts to Arbitrum.

Similar to the concept of Optimistic Rollup, Arbitrum Rollup uses fraud proofs to ensure network security. Similarly, there will be dedicated operators and validators in Arbitrum, and operators need to deposit bonds to prevent malicious behavior. Dedicated validators supervise the operators' erroneous actions; otherwise, if every transaction participant personally verifies, it would affect user experience. In dispute arbitration, Arbitrum will split the disputed content off-chain, and after determining the minimal scope of the dispute, it will call Ethereum contracts for decision-making. Therefore, in terms of validation at the Layer 1 level, Arbitrum's efficiency will be higher.

In Arbitrum, users also need to pay Gas for using the virtual machine, which is reflected as ArbGas, serving as economic compensation for Arbitrum operators. ArbGas is used to assess the time spent on executing computations in the AVM, with 100 million ArbGas approximately equating to 1 second of CPU time on Offchain Labs' developer computer in early 2020. The ArbGas cost of each AVM instruction is set through measurement, differing from Gas calculations in Ethereum. Currently, in the test version, the default fee setting is zero.

zkSync

zkSync is developed by Matter Labs, based on ZK Rollup technology, ensuring asset security through cryptographic proofs of on-chain data authenticity. When operators upload data, they attach validity proofs, allowing the mainnet to verify the information instantly during data uploads, thus achieving security equivalent to that of the mainnet for Layer 2. Currently, the zkSync ecosystem includes Curve, AAVE, Balancer, 1inch, etc., and the mainnet has already launched, with the 2.0 version expected to go live in August 2021.

zkSync prioritizes user fund safety, utilizing cryptographic technologies PLONK and RedShift. RedShift is a transparent and general-purpose SNARK discovered by Assimakis from New York University and Konstantin and Alexander from Matter Labs. When using zkSync, there are two parts to the transaction costs: 1. The cost of state storage and SNARK generation on Layer 2, which depends on hardware usage; 2. The cost incurred by operators to return data to the Ethereum mainnet and verify SNARK proofs, which depends on the Gas Price on Ethereum. The biggest obstacle for ZK Rollup is the high verification cost of validity proofs related to smart contracts, making it unsuitable for smart contract scenarios. zkSync rewrites smart contracts to make them applicable in ZK Rollup. However, developers need to redeploy contracts using the Zinc language, which will be one of the most important plans for zkSync's future.

When transferring transactions in zkSync, users can pay Gas fees using the tokens they are transferring, without the requirement to use ETH. Currently, the zkSync network operates under centralized management, but in the future, multiple roles will be introduced to make the network more decentralized, such as introducing a PoS consensus mechanism. To maintain the balance of operators' income and expenses, zkSync fees will change with the mainnet Gas fees, but zkSync will ensure that its usage fees are always lower than those of the Ethereum network, with ETH transfers being over 20 times lower and ERC20 token transfers being over 100 times lower. In the future, zkSync will also launch its own token for governance and collateral, along with a lower-fee platform called zkPorter.

zkPorter will launch alongside the zkSync 2.0 mainnet, with data in zkPorter being transferred off-chain, allowing seamless interaction with zkSync accounts, where data availability will be guaranteed by guardians (Guardian) who hold zkSync tokens. Guardians need to stake zkSync tokens and participate in PoS; if data becomes unavailable, they will lose their staked funds.

StarkWare

StarkWare is a scaling solution based on ZK Rollup technology, with current clients including DeversiFi, iMMUTABLE, and dYdX. Unlike zkSync, StarkWare uses STARK technology, a simple and fully transparent zero-knowledge proof. Cairo is a Turing-complete platform introduced by StarkWare that uses STARK proofs, and the aforementioned applications are built on Cairo. Additionally, StarkWare has launched a trading platform called StarkEx.

StarkWare has also developed a model called Validium, where users send transaction data to committee members, and their data is stored off-chain, reducing the security of funds in ZK Rollup but improving efficiency, making it more suitable for high-frequency scenarios.

Polygon

Polygon is an upgraded product of the Matic network, becoming two different scaling solutions with Matic. Matic uses the Plasma framework to ensure the decentralization and security of sidechains. Matic applies an account-based model in the Plasma chain, differing from the UTXO system in other Plasma, making Plasma Matic suitable for the Ethereum system and supporting EVM. Plasma sidechains use a PoS consensus mechanism, and staking Matic tokens allows one to become a validator in the network.
Polygon's independent sidechains are fully compatible with Ethereum, so the learning costs for users and developers are zero, supporting interoperability through bridge links, with independent validators in the sidechains ensuring security. Polygon (Matic) has currently launched both sidechain and Plasma as two Ethereum scaling methods, with ZK Rollup and Optimistic Rollup products planned for the future. This is to meet the scaling needs of different users, such as enterprise-level applications, startups, and companies focused on network security. Applications like Aavegotchi, Easyfi, SportX, and Aave utilize Polygon's architecture.

HashKey Cui Chen: Interpreting the Competitive Landscape and Trends of Ethereum Layer 2Figure 2: Fixed Chain Mode (left) and Independent Chain Mode (right) in Polygon

xDai Chain

xDai Chain is an Ethereum-compatible sidechain launched by the MakerDAO Foundation, using xDAI as the payment tool for network transactions, with xDAI being exchanged at a 1:1 ratio with DAI. Due to its compatibility with EVM, all applications in Ethereum can be directly migrated to the sidechain. Currently, xDAI has many ecological applications, including 1Hive, Honeyswap, Perpetual Protocol, Sushiswap, Unique.one, etc.

The xDai sidechain uses a proof-of-stake mechanism called POSDAO for accounting and governance, adopting a dual-token model, with xDAI as the payment token and STAKE tokens issued as governance tokens. Currently, the validating nodes are still centralized trusted nodes, but this will gradually open up in the future. In Ethereum 2.0, xDai Chain will become a shard or Rollup integrated into the Ethereum network.

Other Layer 2 Projects

In addition to projects focused on the Ethereum Layer 2 field, there are some originally aimed at high-speed scalability public chains that have gradually taken on the characteristics of Layer 2 projects due to their proximity to the Ethereum operating environment, such as Harmony, Celer Network, BSC, Heco, etc. Projects on the cross-chain protocol Polkadot are also exploring compatibility with applications on Ethereum, such as Acala EVM successfully deploying and running the Uniswap contract.

The most typical examples are BSC and Heco, both using the same virtual machine as Ethereum, allowing developers to directly migrate smart contracts from Ethereum. Moreover, BSC and Heco have altered parameters such as the consensus mechanism of the underlying public chain, resulting in faster block generation and greater capacity, enabling users to save on transaction costs. If other public chains achieve compatibility with Ethereum, they can be regarded as sidechains on Ethereum, or broadly speaking, Layer 2.

Development Trends and Issues of Layer 2

Expected Development of Layer 2

Various Layer 2 solutions are emerging. As pointed out in the first part, the competitiveness of Layer 2 lies in reducing developer difficulty and improving user experience. Therefore, all Layer 2 solutions will continue to move in these two directions in the future. For example, Optimistic Rollup products will improve the user experience of fraud proofs and challenge periods, while ZK Rollup will develop in the areas of virtual machines and smart contracts to make them more suitable for current DeFi applications. Although implementing sidechains is relatively easy, enhancing the guarantees of fund security and decentralization is necessary.

At the Layer 2 level, it is challenging to achieve a balance among reducing fees, scalability, decentralization, and data availability simultaneously. With the continuous development of Layer 2 technologies, such as the latest Rollup technology, progress has been made in decentralization and data availability by neglecting the inconveniences caused by challenge periods or smart contracts. However, to pursue faster transaction speeds and lower fees, such as in the zkPorter and Validium models, data availability must be sacrificed by moving data to off-chain storage. It is understandable that to achieve higher efficiency, on-chain resources must be used as minimally as possible, granting more power to operational nodes, thus requiring more robust mechanism designs to prevent node malfeasance. Future Layer 2 solutions will make trade-offs among speed, cost, decentralization, and data availability, resulting in different solutions for different scenarios.

For Layer 2 operators or validators, economic incentives are necessary to carry out related work. For most Layer 2 networks, issuing tokens is also a future trend, primarily for governance or incentives. However, for projects using the same technology, such as OE and Arbitrum, the design of economic incentives is also one of their competitive advantages. Similar to the competition in the DeFi ecosystem, if Layer 2 provides more incentives for participants, it will attract more operators and validators to ensure network security.

Layer 2 is merely a tool on Ethereum; more importantly, it is the applications running on Layer 2. It can be seen that the most collaboration with Layer 2 projects comes from DEXs that require high-frequency trading. With the upgrades of DEX projects, such as the V3 version of Uniswap, the demand for running on Layer 2 becomes even stronger. In the future, competition on Layer 2 will also be competition among applications on Layer 2, making it crucial for Layer 2 to compete for applications, especially those requiring high-frequency trading.

Issues Faced by Layer 2 Solutions

Aside from sidechain networks, the development progress of Rollup technology's Layer 2 solutions is below expectations, making it difficult to determine whether they can truly meet expectations after launch. The current challenge for Layer 2 is the development difficulty. Interoperability among Layer 2 solutions is also a problem faced by current Layer 2 solutions; different Layer 2s are controlled by different smart contracts, so applications must interact within the same Layer 2 to reduce fees. If the same application is deployed across different Layer 2s, it will affect its liquidity. Therefore, cross-Layer 2 solutions are also a current research direction.

Reflection and Conclusion

The above is an analysis of the current competitive landscape and trends of mainstream projects in Ethereum Layer 2. As an intermediary layer connecting Ethereum's underlying infrastructure and applications, Layer 2 is also a scaling tool on the Ethereum main chain. The most critical focus is on the user experience for application developers and users, especially in the competition for applications. Since different Layer 2s can affect application interoperability, forming a complete ecosystem at the Layer 2 level is the ideal state.

Although all Layer 2 solutions are developing towards improving usability, there will ultimately not be a single winner, as different demands will arise in different scenarios. For example, in high-frequency trading scenarios, people will be more sensitive to fees, which can lead to sacrificing some data availability to prevent malfeasance through economic mechanisms. However, in other scenarios where security is more critical, fully data-available solutions can be employed.

To maintain the sustainability of Layer 2 solutions, managing the relationship between operators and users is equally important. If incentives for operators are too low, there may not be enough operators and validators to maintain the decentralization and security of the network. If users are charged too much, it may lead to user and application attrition. Especially since most Rollup solutions adopt different Gas fee charging methods from the mainnet, whether operators can achieve a balance between income and expenses will need to be evaluated after launch.

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.
ChainCatcher Building the Web3 world with innovators