In-depth interpretation of Layer2 scalability: How does the project choose between ZK-Rollups and subnets?
Original author: Bybit, NGC Ventures
background
background
Recently, popular layer-1 networks like Solana and BNB Chain experienced network outages due to DeFi protocols, NFT marketplaces, and Web3 games running at the same time. Likewise, Ethereum has also been criticized for network congestion and expensive gas fees that plague its network. As a result, the industry has begun to realize the importance of Layer 2 (L2) scalability solutions.
According to the Ethereum Foundation, rollups are currently the go-to L2 solution for scalability issues. Besides rollups, other L2 solutions (such as sidechains and subnets) exist to solve the scalability trilemma.
In particular, Avalanche’s L2 scalability solution, Subnets, has gained considerable popularity recently following the deployment of DeFi Kingdoms and Crabada subnets earlier this year. In some cases, subnets are essentially sidechains, except that subnets can choose to use validators from the mainnet. Currently, subnets and sidechains seem to be the preferred L2 scaling solution for web3 games.
first level title
ZK-Rollups Prospects, Recent Developments, and Pain Points
By packaging compressed off-chain transactions into a single order on the L1 network, Rollups enable lower gas costs and scale up the transaction capacity of any given L1. This way, L2 can perform computations, while L1 only needs to verify them. As a result, the gas fee will be distributed among a bunch of transactions, and thousands of transactions can be completed collectively.
There are two different schemes for Rollups: Optimistic Rollups and zero-knowledge rollups (“ZK-Rollups”). The two differ in the verification method.
Optimistic Rollups assume all transactions are valid and publish them to the base layer without validation. Validators then amend the disputed transaction during a 7-day challenge period.
ZK-Rollups, on the other hand, create a cryptographic proof and publish it to the mainnet as a form of validity proof. Currently, transactions using ZK-Rollups can be completed in about 10 minutes.
Source: preethikasireddy.com; ethereum.org
As can be seen from the graph above, ZK-Rollups seem to endow a faster and more scalable Ethereum ecosystem compared to Optimistic Rollups.
image description
Source: l2beat.com (data as of June 7, 2022)
As can be seen from the graph above, Optimistic Rollups currently holds 72% of the overall market share in terms of TVL. The aforementioned lack of EVM compatibility seems to have put ZK-Rollups on the back burner, with large DeFi players not opting for ZK-Rollups when scaling to rollups.
As Optimistic Rollups have matured, most large DeFi projects have adopted this scheme as needed. However, the one-week waiting period often overwhelms new users in the field. As an alternative, when considering GameFi scalability, NFT marketplaces, and web3 applications, ZK-Rollups could be a possible solution for networks requiring higher throughput and cheaper transaction fees.
Source: l2beat.com and the agreement's website (data as of June 7, 2022)
As of this writing, there are more than a dozen ZK-Rollup solutions in the field, with the underlying technology being developed by StarkWare, Loopring, Matter Labs, and Polygon Hermez.

There are two main approaches to cryptographic proofs in ZK-Rollups. The technology adopted by Loopring and zkSync creates a zero-knowledge, succinct, non-interactive zero-knowledge proof (ZK-SNARK) to verify the transaction package in the main network. ZK-SNARKs came into focus in 2012 and have been widely adopted by ZK-Rollups pioneers.
secondary title
StarkWare
StarkWare offers two main ZK-STARK solutions: StarkEx and StarkNet.
StarkEx is a Validium solution designed for application-specific ZK-Rollups, adopted by derivative trading platform dYdX, web3 games, and NFT Marketplace Immutable X.
image description
Source: l2beat.com (as of June 8, 2022)
StarkNet is a general-purpose rollup launched by StarkWare, which was launched in February this year. It is worth mentioning that Immutable X includes a Volition model that allows users to choose between the Validium model or the general ZK-Rollup. As TVL gradually picks up, StarkWare focuses on accelerating StarkNet's TPS to an optimized level.
StarkEx's Web3 Gaming Footprint
StarkEx's Web3 Gaming Footprint
With ZK-Rollups, web3 games can significantly reduce transaction costs for users, avoid network congestion, and benefit from the measured security of Ethereum. As a result, ecosystems such as Sorare, Immutation X, and others have adopted StarkWare's scalability solutions in an effort to support web3 games on their platforms.
Sorare is a well-known football card game that was popular on the Ethereum mainnet and then moved to L2 by adopting StarkEx. Sorare chooses ZK-Rollups to expand capacity without sacrificing security and decentralization.
Immutable X is an L2 platform for the Ethereum-based NFT marketplace. It offers zero gas fees and instant transactions by offloading computations. According to DappRadar data, there are currently four active web3 games performing NFT transactions with the help of Immutable X. Gods Unchaine is the most prominent one, with about 5,000 users and a peak daily transaction volume of $1.5 million.
Illuvium is the latest web3 game to join the Immutable X platform. Before its official game release, Illuvium sold 72 million US dollars of virtual land and became the news that attracted much attention.
secondary title
Loopring
secondary title
Matter Labs (the team behind zkSync)
Matter Labs is the team behind the zkSync scaling solution. It uses ZK-SNARK and provides off-chain Validium solution zkPorter and on-chain general rollup zkSync.
ZKSpace is forked from zkSync and employs the same ZK-SNARK technology to solve the scalability problem. zkSync pointed out that ZKSpace has been closed since the fork, and there is a possibility of security risks. As of this writing, ZKSpace (formerly known as ZKSwap) owns the protocols ZKSpace, ZKSwap, and ZKSea (not yet live).
Matter Labs launched zkEVM, the first EVM-compatible ZK-Rollup, on a public testnet in February 2022. The zkEVM is still in development and aims to run 99% of Solidity contracts. This marks an important milestone for ZK-Rollups to run parallel to the Ethereum mainnet and compete with Optimistic Rollups.
secondary title
Polygon
Polygon is very active in forming its own L2 scalability solution. Its ZK-Rollups products include Polygon Hermez (ZK-SNARK), Polygon Zero (ZK-SNARK) and Polygon Miden (ZK-STARK). Polygon acquired ZK-Rollups expansion project Hermez and startup Mir in 2021, gaining expertise in building its ZK-Rollups.
first level title
Pain points and summary
A recurring problem with general-purpose ZK-Rollups is their EVM compatibility. We noticed that most DeFi players in Ethereum choose Optimistic Rollups or Polygon PoS as their L2 scaling solutions. For example, Curve has opted for Optimism; Aave V3 for Polygon, Optimism, and Arbitrum; Uniswap has expanded to Optimism and Polygon. zkEVM is being tested by Matter Labs, while Nethermind is developing a transpiler for StarkNet. It is possible that any breakthrough in EVM compatibility will eventually help attract DeFi projects to ZK-Rollups in the future.
Another problem is the lack of communication in ZK-Rollups. This can lead to liquidity fractures and the centralization of the sorting process can raise security concerns. However, Immutable X’s new cross-rollup liquidity solution may herald a more liquid rollup ecosystem.
Introduction to Avalanche Subnets
Avalanche Subnets and Polygons
Introduction to Avalanche Subnets

source:https ://docs.avax.network/learn/platform-overview
Avalanche's main network consists of three blockchains - the X, P, and C chains. Each chain serves a different purpose in maintaining the integrity of Avalanche and creating new assets or blockchains.
The exchange chain (X-chain) is the default asset blockchain on Avalanche, which supports the creation of new assets, transactions, and cross-subnet transfers.
The Platform Chain (P-chain) is the metadata blockchain that coordinates validators, tracks active subnets, and enables new subnet creation.
Avalanche uses the scaling method to create subnets for horizontal scaling. Subnets are different from individual blockchains, and the relationship between them is as follows:
Avalanche uses the scaling method to create subnets for horizontal scaling. Subnets are different from individual blockchains, and the relationship between them is as follows:
A subnet is a group of validators on a blockchain.
Each blockchain has only one subnet (set of validators), and each subnet can maintain multiple blockchains at the same time.
You can start with five validators per subnet, but 10 is recommended for network health and security. Only one AVAX is required to create a subnet on Avalanche. However, each validator on the subnet is also required to validate the main network - requiring 2000 AVAX tokens, worth approximately $50,000 as of June 9, 2022.
Web3 games on subnets
Web3 games on subnets
andCrabadaandDeFi Kingdomswere their two forerunners,Castle Crushtestnettestnet。
source:https ://cryptodaily.io/how-crabada-is-paving-the-way-for-p2e-games-on-avalanche/
As can be seen from the above table, Crabada’s gas fee share on Avalanche’s C chain is the highest at 38.93%. However, similar to many web3 games, Crabada faced network congestion issues on the mainnet, which prompted them to move to their own chain, such as a subnet. Recently, Crabada moved from the Avalanche C chain to their own subnet, the Swimmer Network. With the migration to the Swimmer Network, gas fees for Crabada players have been reduced by 85%, and transaction times have been greatly reduced.
Besides the obvious benefits of lower gas fees and higher TPS, there are other benefits that could entice web3 games to adopt subnets. By having their own subnet, web3 games inherently have better control over the predetermined parameters of the blockchain. Can pay for their gas in the token of their choice. Crabada now uses $TUS as fuel token instead of $AVAX, burning up to 80% of the gas used for network expansion. Token burning suppresses token inflation and increases token utility.
It’s worth noting that game studios have been building a subnet for the entire gaming ecosystem, rather than the typical one-game-per-subnet model adopted by Crabada or DeFi Kingdoms.
first level title
Polygon Supernet and Sidechains

Source: Polygon Blog/Supernet
One competitor of the Avalanche subnet is the Polygon Supernet, a scaling solution following two well-known sidechain solutions, Polygon Edge and Polygon PoS. As mentioned earlier, Polygon's scaling solution is quite radical, with ZK-Rollups co-existing with supernets and sidechains.
Polygon supernets are still new in the field of web3 games, and have not gone through many practical applications. However, the supernet solution is positioned as an alternative to the Avalanche subnet with more features. It is worth highlighting that the Polygon supernet offers the possibility to adopt Proof-of-Authority (PoA) or Proof-of-Stake (PoS) chains; choose from a group of professional validators for enhanced decentralization; and the possibility to share security with the Polygon mainnet .
Polygon PoS has been at the center of web3 gaming, with successful titles such as Aavegotchi and Crypto Raiders enjoying great success in 2021. Popular games come with high volume and transaction issues. Similar to Crabada on Avalanche, Sunflower Land caused severe network congestion problems, consuming up to 42% of the gas on Polygon during peak periods.
first level title
Comparing custom chains with ZK-Rollups
Essentially, both L2 ZK-Rollups and custom chains (Avalanche subnetwork and Polygon supernetwork) are solutions to the scalability issues suffered by their respective L1 blockchains. Both have very different technical specifications and benefits of using them, and we'll try to break them down to better understand the differences.
If we only focus on the technical aspects of web3 games to decide whether to build on L2 or Avalanche subnets, then one could argue that L2 offers a better solution. However, the L2 solution is still under development and has not been battle-tested. Subnets seem to be gaining popularity in web3 games due to the need for their own chain.
In general, web3 games don't require as much interaction with the larger ecosystem compared to DeFi projects. They often have closed-loop ecosystems where their tokens and NFTs support each other. Outside of their ecosystem, the only interaction is through their network token every now and then, just like AVAX or MATIC.
source:https ://myria.com/games/
On the other hand, top web3 game studios Gala Games or the upcoming Myria prefer to build on their own blockchain. These two studios have multiple games that influence each other to some extent; therefore, it makes more sense for them to build games that exist together on the same blockchain.
Still, given that most games these days are made by individual project teams rather than part of a larger collective, there's very little collaboration between games. Therefore, it might make more sense for smaller game studios to adopt subnets rather than build their own chains.
first level title
How do projects choose between ZK-Rollups and subnets?
Due to the lack of composability with the mainnet, subnets and supernets are not designed for DeFi projects. EVM-compatible ZK-Rollups are suitable for projects that deploy smart contracts and require a high level of security. However, since the EVM compatibility of ZK-Rollups is still in its infancy, Optimistic Rollups seem to be the only option available to DeFi projects.
It is clear that subnets have shown to be a better choice than ZK-Rollups for web3 games. Separate custom chains for single-game/single-chain models have gained traction, as evidenced by the popularity of the Avalanche subnet.
ZK-Rollups and Validium may have better technical specifications than custom chains, but they are still under development. The ZK-Rollups scalability solution does not provide a separate custom chain, which can be "overwhelmed" by the sudden hype of a single project. Also, creating a separate rollup like Sorare would be costly and transition painful.

Source: ImmutableX, StarkNet, StarkEx
On the other hand, Immutable X recently released an innovative Layer 3 solution for web3 games。With this approach, game studios will be able to enjoy hyperscale solutions in Layer 3 without sacrificing security and composability. Layer 2 and Layer 3 integration integrates the liquidity of rollup solutions and strengthens the interaction between DeFi and web3 games. While it still seems to be in early development, we're excited to see what else Immutable X has to offer.
Original link




