Cover photo

ZKSYNC – The future of ETH Layer 2

Table of Contents

1.Introductions to Layer 2s

1.1 Considerations of a Layer 2

1.2 Optimistic Rollup VS Zero-Knowledge(ZK) Rollup

1.2.1 Optimistic Rollup

1.2.2 Zero-knowledge Rollup

2.Zksync

2.1 Roadmap

2.2 ZkSync VS others (Technical Criterias)

2.3 Transaction per Second

2.4 ZKPorter

3.TVL and Activities on ZkSync

3.1 L2 Bridge and Depositors Stats

3.2 Layer 2 costs

4.Ecosystem

4.1 ZkSync

4.2 Arbitrum

4.3 Optimism

4.4 Funding

5. Summary

1. Introductions to Layer 2s

  • Ever since the Satoshi Nakamoto created the first blockchain in 2008, there has been a lot of work done into trying to solve issues of the legacy blockchains. One of such problems that arise from blockchain technologies is called the blockchain scalability trilemma, which argues that blockchain technology can only fulfill two out of three of the features, namely Scalability, Security and Decentralization.

Layer 2s are first conceptualized to help address the blockchain scalability trilemma. It is often argued that the scalability limitation of early blockchain exists because they are tasked with too much work. This is inevitable with the growing popularity of the blockchain – as more users adopt the use of the blockchain, more and more transactions / data will be processed, thus clogging up the entire blockchain.

Hence, Layer 2 solutions are built to help with scaling limitations.

1.1 Considerations of a Layer 2

So, what characteristic does a protocol need to have to be labelled as a layer 2?

One of the main requirements to be considered as a layer 2 is that a layer 2 protocol inherits the security of the blockchain it is built on top of. Transaction data integrity is upheld as it must be verified by the underlying blockchain. These means side chains such as Polygon (MATIC) or Aurora (Near ecosystem) cannot be considered as Layer 2 since they rely on their own security and use their own methods in processing transactions.

1.2 Optimistic Rollup VS Zero-Knowledge(ZK) Rollup

For us to understand layer 2s, it is important for us to know how each of these works.

Rollups basically move transaction processing off chain but still ensure transaction data is stored on the main layer 1 chain. This also means there is no compromise on security. Rollups are done by bundling the transaction data in batches, compressing and delivers the data to main chain (ETH).

Rollups are differentiated into 2 forms – Optimistic and Zero Knowledge Rollups.

1.2.1 Optimistic Rollup

Source: https://blog.chain.link/what-is-a-layer-2/

Source: https://blog.chain.link/what-is-a-layer-2/

As the name implies, Optimistic rollup assumes that the transaction data sent is legitimate until a dispute is made. The dispute resolution mechanism is crafted such that both parties within the dispute - the party that submitted the disputed transaction and the party who is disputing the transaction, will need to have ETH bonded. The party who is found to have any wrong-doing will have their bonded ETH reduced.

This ensures that everyone has “skin in the game” and discourages bad actors from clogging the network by either submitting fraudulent transactions or wrong fraud proofs.

1.2.2 Zero-knowledge Rollup

Source: https://blog.chain.link/what-is-a-layer-2/ 

Source: https://blog.chain.link/what-is-a-layer-2/ 

ZK rollup approaches the transaction data by producing validity proofs. The validity proofs provide cryptographic evidence that the proposed changes to Ethereum main chain’s state are the true end-results after executing all the transactions in the batch. Validity proofs in the form of ZK-SNARK or ZK-STARK are used to allow parties to prove the correctness of the statement without revealing the statement itself.

In short, validity proofs are done in 2-steps – Proof generation and Proof verification.

Proof generation:

· Checks on sender/receiver are part of state tree

· Checks on sender having enough funds to perform the transaction

· Checks on transaction is correct and matches sender’s public key

· Checks on the sender nonce being correct

Proof Verification

· Checks on Pre-state root – Before the batched transactions were published

· Checks on Post-state root – After the batched transactions were published

· Checks on Batch root – Merkle root of the batch – derived by merklizing transactions in the batch and hashing the tree’s root.

· Checks on Transactions Inputs – Transaction data executed as part of the submitted batch

Source: https://ethereum.org/en/developers/docs/scaling/zk-rollups/ 

Now that we are aware of how each of the rollup works, let’s dive deeper into protocols that utilizes these technologies, focusing primarily on ZKsync, it’s ecosystem and comparison between its competition.

2. Zksync

2.1 Roadmap

Source: https://twitter.com/zksync/status/1586053698672656384 

Source: https://twitter.com/zksync/status/1586053698672656384 

ZkSync is a Layer 2 scaling solution aiming to help solve the scalability feature within the blockchain trilemma. It offers low gas and fast transaction and utilizes ZK rollup.

ZkSync 2.0 Mainnet (Baby Alpha) launched last week on 28th Oct and aims to solve several pain points from its 1.0 version. However, Baby Alpha will only be open to ZkSync’s team for now with public access planned to be sometime end of year.

The single biggest upside 2.0 brings is official support for smart contracts as well as a complier for EVM compatibility (also coined as zkEVM).

Why is this important?

This is game-changing since any existing smart contract written on solidity (which is majority of the Dapps on ETH) can start deployment on ZkSync with very little changes necessary to their codes.

With the barrier of entry lowered, protocols can utilize ZkSync to lower gas fees and provide faster finality for transaction speed. Further ease of adoption of a layer 2 scaling solution will in turn help with scalability of ETH mainnet.

2.2 ZkSync VS others (Technical Criterias)

A technical comparison between ZkSync and its competition can also be argued that it should be a comparison between the different rollups. As such, it’s not much of ZkSync against others but more of a comparison between Optimistic rollup VS ZK rollups.

Source: 101blockchains.com

Source: 101blockchains.com

The comparison from 101 blockchains sums up pretty much the differences between the technical differences between the 2 different rollups. However, it should be noted that with ZkSync 2.0 already live (but not open to public yet), there will be improvements to the DeFi readiness of ZK rollups.

Another important note is that optimistic rollups take 7 says to achieve transaction finality (due to the challenge window) while ZK roll ups do not have delays in transaction finality.

2.3 Transaction per Second

Source: https://blog.matter-labs.io/zkporter-a-breakthrough-in-l2-scaling-ed5e48842fbf

Source: https://blog.matter-labs.io/zkporter-a-breakthrough-in-l2-scaling-ed5e48842fbf

Since Layer 2 solutions exist to help scale ETH mainnet, one of the most important aspects of scaling is the amount of transactions Layer 2 solutions are able to process per second. ZkSync (ZK rollups) can process up to 2000 TPS at its peak for now but with the help of ZkPorter, it is theorized that ZK rollups can 10X the TPS to a whopping 20,000 TPS!

2.4 ZKPorter

Source: https://www.youtube.com/watch?v=dukgSVE6fxc 

Source: https://www.youtube.com/watch?v=dukgSVE6fxc 

In its essence, ZkPorter users’ data are stored off-chain rather than on ETH network. Instead of publishing state updates as calldata onto the ETH network, ZkPorter root hash will be published onto the ETH network. This ensure that no matter what changes is done on the zkPorter accounts, the users of Zk Rollup will be able to reconstruct the merkle proof for their account. I have also linked an article on how merkle proofs are used here.

The data of ZkPorter accounts will be published to a side-chain-like network comprised of Guardians who are ZkSync holders with staked ZkSync tokens. Guardians are required to sign blocks to confirm data availability of the zkPorter accounts and will be rewarded with fees.

While some may argue that it is less secure, ZkPorter circumvent this by ensuring that a supermajority (2/3 of the stakers) must sign a block in order for it to be published onto the ETH network. Moreover, Guardians are essentially powerless as they can only freeze the ZkPorter state. This also means any malicious actors who tries to hold the Guardian staking network hostage will also freeze their own funds in doing so.

Users are free to choose between ZK rollups or ZKPorter, trading a little security risk for way cheaper transaction fees (Zk rollups around 1/100th of L1, Zk Porter around $0.01).

It is also important to note that this kind of scaling is only unique to ZK rollups due to cryptography of zero-knowledge proofs. That means optimistic rollups are unable to achieve the same magnitude of scaling.

3. TVL and Activities on ZkSync

Source: https://l2beat.com/scaling/tvl/

Source: https://l2beat.com/scaling/tvl/

According to L2 tracker site, l2beat.com, ZkSync current sits at 7th in total TVL (62.14M) and has a total of 1.22% of the total TVL across all layer 2s.

The total market share does seem low but that is primarily because ZkSync 1.0 does not support smart contract compatibility and is only mainly used for token transfer, minting NFTs and/or make swaps (on ZigZag Exchange).

Source: https://l2beat.com/scaling/projects/zksync/

Source: https://l2beat.com/scaling/projects/zksync/

The daily TPS will continue to remain low until when ZkSync 2.0 is released to public sometime late 2022.

3.1 L2 Bridge and Depositors Stats

Source: https://dune.com/gm365/L2 

Source: https://dune.com/gm365/L2 

Measuring the activities on the different L2 protocols will need us to take a look at the activities and interactions on the different chains. This can also be shown by taking a look at the total number of bridgers into the different protocols.

It is interesting to note that while the total value bridged (TVB) is the least on ZkSync, the total number of bridgers is higher than that of Arbitrum and Optimism. This is likely also due to the fact that rumours of a ZkSync token airdrop is around the corners and attracted a high number of airdrop farmers to interact with ZkSync.

Source: https://dune.com/biteye/zksync-vs-optimism-vs-arbitrum-biteye 

Source: https://dune.com/biteye/zksync-vs-optimism-vs-arbitrum-biteye 

On another dune report by user @biteye, we can also see the same trend (across 30 days) that there is a strong uptick in daily and cumulative depositors for ZkSync. This is again, likely due to rumours of the airdrop of ZkSync tokens, attracting airdrop farmers to interacting with ZkSync.

3.2 Layer 2 costs

L2fees.info is a website which tracks the cost each layer 2 protocol charges to send ETH and to Swap tokens. A quick check on the website reveals that ZK rollups do have lesser cost than their optimistic rivals with both Loopring and ZkSync (both ZK Rollups) reflecting lower costs than Arbitrum or Optimism (Both Optimistic Rollups).

Source: https://l2fees.info/

Source: https://l2fees.info/

4. Ecosystem

4.1 ZkSync

Source: Coinmarketcap.com

Source: Coinmarketcap.com

With the mainnet launched only 1 week ago, ZkSync still has a pretty impressive list of partners they are working with within their Ecosystem. Though most of the protocols within their ecosystem are the usual suspects (1inch, Curve, Yearn, etc), with the launch of ZkSync 2.0, it is almost certain that the ecosystem of ZkSync will grow exponentially within the next few months. Recent announced partners of ZkSync includes AAVE (announced Nov 3), MEXC (CEX), SpaceFi (DEX, launchpad), Mute.io (Dex/farming/bond) Uniswap, Sushi and many more!

Source: https://twitter.com/zksync/status/1587869170481315840 

Source: https://twitter.com/zksync/status/1587869170481315840 

As a comparison, I have also included both Arbitrum and Optimism’s ecosystem chart below. These ecosystem charts are all dated within 2022 (Between April to June) and are still relatively updated.

4.2 Arbitrum

Source: https://news.cryptorank.io/arbitrum-ecosystem-overview/ 

Source: https://news.cryptorank.io/arbitrum-ecosystem-overview/ 

4.3 Optimism

![Source: https://twitter.com/Coin98Analytics/status/1531182204713218048/photo/1 

](https://images.mirror-media.xyz/publication-images/W3rfwpzw4SmzWSxNi5ddW.png?height=530&width=954)

4.4 Funding

Till date, ZkSync has raised a total of $50M and is currently in Series B with a16z as their lead investor.

5. Summary

Source: https://docs.zksync.io/userdocs/intro/#zksync-in-comparison

Source: https://docs.zksync.io/userdocs/intro/#zksync-in-comparison

Although ZkSync is still very early and has only just launched their mainnet, ZkSync 2.0 offers endless possibilities for a protocol so new. Referencing the snapshot taken above, even founder of Ethereum, Vitalik commented that ZK rollups will win in all use cases in the medium to long term.

It is our opinion that ZkSync cannot be ignored as a strong contender for the king of Layer 2 once the kinks of Baby Alpha (Mainnet launch) has been sorted out and when the mainnet is released to general public.

Loading...
highlight
Collect this post to permanently own it.
HashBrown Research logo
Subscribe to HashBrown Research and never miss a post.
#melody#web3
  • Loading comments...