All About L2 Scaling Solutions ft. ZkSync and Optimism...

·

4 min read

Cover Image for All About L2 Scaling Solutions ft. ZkSync and Optimism...

The purpose of L2 scaling solutions was to unload the pressure of the number of transactions on a single blockchain i.e. Ethereum. The L2 layer is the layer built on top of the L1 layer i.e. blockchains / Ethereum. To push a block on Ethereum, consensus methods like PoS are used.

These transactions take place extremely slowly as each node has to perform the transaction and validate it for pushing it to the blockchain. As a result, the throughput of Ethereum becomes extremely low, therefore taking a lot of time for completing transactions and costing heavy gas fees for the process.

The reason why The Merge took place was to make Ethereum more efficient and fast in the coming years. But along with this, some solutions can be built on top of these blockchains to significantly increase their throughput. Let's see what Layer 2 scaling solutions provide.

There are two types of scaling solutions, ZK Rollups(used by ZkSync), and Optimistic Rollups(Used by Arbitrum and Optimism).

ZkSync (ZK Rollups):

The main reason why ZkSync has become so popular and has been able to capture a large market is because of Zero Knowledge Proofs. Let's see what Zero Knowledge Proofs are. Let's say you are given an image :

If I ask you where the CD is, you can give me the answer in two ways:

  • You can directly spot and point to the CD in the image, OR...

  • You can first crop out the image and show it to me:

    CD spotted

but there is a difference... You did not mention the location of the CD in the image. You gave it to me without knowing where it was in the image.

THIS IS EXACTLY HOW ZK PROOFS WORK!

Zero Knowledge proofs give validity to a certain transaction without knowing specific details about it. On Blockchains where scaling becomes an issue, ZKRollups run transactions on their chain(also called side chain) in rollups which are divided into batches, that are bridged into the Ethereum chain for validation. Validation does not require much computational power on the Ethereum chain, therefore a lot of R&D is required for launching their mainnet.

ZkSync is Layer 2 Scaling Solution that provides efficiency in gase fees, speed faster throughput, and security through Zero-Knowledge Proofs. All the points above group to form a method called SNARK(Succinct-Non-Interactive-Argument of Knowledge). This is the proof generation method that ZkSync uses.

Version 2.0 of ZkSync supports smart contracts with the idea of launching a full mainnet, which was not available in version 1.0. Version 1.0 can also be called the Lite version of ZkSync.

To know more about ZkSync refer to this page.

Optimism(Optimistic Rollups)

Image result for optimism blockchain

Optimism is another Layer 2 Scaling Solution built for greater throughput on Optimism Chain and increased security on Ethereum Chain. The concept of Optimism benefits making transactions on a less crowded blockchain while still getting the security of the Ethereum blockchain.

The term Optimism itself denotes that the transaction is considered to be valid until it is proved fraud. To prove that a transaction is fraud, it has to be challenged by submitting a "fraud proof". There is a window between which the transaction undergoes the process of being proved fraud. In order to do so, the transaction should be replicated on the Ethereum main chain, which will further cost gas fees. One benefit of Optimism rollup is that it bundles up the transactions which is then considered as one transaction. Therefore, gas fees will be charged only for one transaction.

Furthermore:

Optimism is still popular as integration is quite easier. Wallets like Metamask and DAOs like SushiSwap enable the use of Optimistic Rollups through various forms of integration.

Cross-chain asset transfer is also possible from Optimism to other Layer 2 Solutions such as Avalanche, making its use widespread.

ZkSync vs Optimism

Por qué los paquetes acumulativos hacen que zkSync vs Optimism sea un ...

Although Optimism is widely used for scalability, it has proved to be less efficient than ZKSync. The below figure clearly points out the differences:

Withdrawal of funds in the Optimism chain takes much longer than that of ZkSync. In fact, ZkSync was created to improve on the drawbacks of Optimism, but along with very complex ways of implementing it.

Therefore ZkSync is preferred over Optimism for 2 points:

  1. Withdrawal Time.

  2. Client-Side verification of subjective finality.

There will be more and more scaling solutions that will be designed for different drawbacks and loopholes that different blockchain layers face. Keep following my blogs to keep getting more such updates.