Saturday, December 2, 2023

Join the club

top

zkSync 2.0 Testnet is Live

tl;dr Summary: On February 22, Matter Labs launched zkSync 2.0, the first EVM-compatible ZK Rollup on Ethereum’s testnet.

On February 22, an engineering group based in Berlin called Matter Labs, announced that zkSync 2.0 is now live on public testnet. Testnets enable developers to try out the infrastructure behind a new software application in practice within a sandbox environment. They can run applications, services, and benchmark tests on the testnet to identify software bugs and to see where optimization of the base-layer protocol is needed. This is a crucial step for blockchain protocols before deploying on a mainnet blockchain like Ethereum and risking the assets of millions of users.

Matter Labs is inviting developers to build on their platform. So far there are already close to 100 apps building on zkSync including wallets, exchanges, payment processing applications and social media platforms.

In their announcement, the Matter Labs team stated:

“In a world where code is law, and billions of dollars in assets are secured, it’s necessary we build systems that do not fail. As made clear by its name, the testnet is an opportunity to test things without risking real funds, because we’re not yet at a stage where we should be risking real funds… We expect (and hope) things break. We encourage the community to try and break things.”

A ZK Rollup is a computational method for validating multiple transactions on a separate network and sending Ethereum a snapshot of the data. Handling transactions outside of the Ethereum network with ZK rollups increases throughput from around 30 TPS to thousands of TPS and reduces the gas fee per transaction to a fraction of a penny. 

zkSync 2.0 is a ZK Rollup that would allow developers to build and deploy decentralized applications (DApps) in a low-fee, highly scalable layer 2 environment using Ethereum’s native programming language, Solidity. This isn’t the first product by Matter Labs. They’ve also created the aptly named process payment application called zkSync 1.0, which uses the underlying ZK Rollup technology to bundle payment transactions and validate them before submitting them to Ethereum mainnet (i.e. layer 1). With zkSync 2.0, the Matter Labs team have taken this to the next level and created the first ever general purpose zkEVM (zero-knowledge Ethereum Virtual Machine) where developers can create and deploy decentralized applications on layer 2.

It’s difficult to explain just how a ZK Rollup works and why it’s important without getting extremely technical. Some of the greatest computer scientists in the world are working on creating Ethereum scaling solutions, and even they have a difficult time figuring out how to make it work. Before explaining how ZK Rollups help solve Ethereum’s scalability problems, it is important to understand just what those problems are.

Imagine that every time you went to order a drink at the bar of your favorite venue, the bartender had to check your ID to verify you’re of legal drinking age before you could order drinks. After checking your ID, the bartender shows it to all of the other bartenders and their manager so they are all aware that you are of legal drinking age and they will be making drinks for you. This may be fine if you and a couple of buddies are the only people at the bar, but would become inconvenient as the night progresses and more patrons start ordering drinks.

This analogy reflects the current reality of using applications on Ethereum. All transactions on Ethereum must be validated by all nodes on the network to ensure transaction data has not been tampered with. This form of consensus mechanism is called Proof-of-Work (PoW) and is essential to achieve the necessary agreement on the validity of transaction data among distributed processes like Ethereum. However, transactions aren’t always as simple as, “Bill pays Sally 10 ETH.” They are often complex and accompanied with a great deal of crucial information including recipient address, signature, value, arbitrary data, gas limits, etc.

Due to the amount of data that must be shared and validated by all Ethereum nodes, transactions on Ethereum are relatively slow with a current throughput of around 30 transactions per second (TPS). As a reward for validating a transaction and loading it onto the Ethereum blockchain, miners are paid in Ethereum gas fees. Users wanting to have their transactions processed faster than everyone else’s are able to pay miners higher gas fees. In our bar example, this would be like someone offering the bartenders a larger tip for making their drinks first. If the bar is crowded, this can quickly turn into a bidding war and the amount of money required to order a drink may deter patrons from ordering anything at all.

Ethereum exploded in popularity in recent years and has become crowded with new users wanting to use decentralized applications like wallets, exchanges, games, marketplaces, etc. Due to the unprecedented user growth, gas fees are exorbitant and transactions are slow. The developers are working on modifying the Ethereum network to make transactions faster and cheaper, but in the meantime dozens of so-called layer 2 scaling solutions are emerging in hopes of becoming the market leading scaling solution. 

A scaling solution is fundamentally a method of enabling a system’s expansion without hurting the existing operations. In most cases this involves creating a separate network of nodes for validating transactions off chain, or outside of the Ethereum network. I recommend watching this video by Whiteboard Crypto for more information on layer 2 solutions, but the main difference is how the data is validated off chain.

Among the most popular and effective layer 2 scaling solutions are ZK rollups like zkSync 2.0. ZK rollups create a smart contract on the main Ethereum network which holds all transaction data and funds. The transactions are mathematically validated off chain by using a method called zero-knowledge proofs. In cryptography, a zero-knowledge proof is a method by which one party can prove to another party that a given statement is true while the prover avoids conveying any additional information apart from the fact that the statement is indeed true. In the bar analogy, bouncers checking IDs outside of the venue are an example of a zero-knowledge proof. Bouncers are responsible for verifying that all patrons entering the venue are of legal drinking age. The bartenders will know that if a patron was allowed into the venue they must be of legal drinking age without knowing their actual age or having to check every ID.

The reality is as the price of Ethereum increases so will Ethereum gas prices. Eventually the price of gas will be so unreasonable that the average user will not be able to participate in the Ethereum ecosystem. Ethereum users will need to move to layer 2 which will serve as the main application layer by which users interact with decentralized applications like NFT market places, coin exchanges, games and social media platforms. The benefits of ZK Rollups are attracting many decentralized application developers to move from Ethereum to build applications on layer 2 and zkSync 2.0 has just taken the lead by becoming the first to deploy on a public testnet.

Sources:

  1. https://blog.matter-labs.io/zksync-2-0-hello-ethereum-ca48588de179
  2. https://medium.com/imtoken/guide-to-layer-2-what-is-zksync-d06029242d8d
  3. https://blog.matter-labs.io/zksync-2-0-hello-ethereum-ca48588de179
  4. https://medium.com/@CalendarDefi/testnet-guide-zksync-2-0-6fabedf44f21
  5. https://docs.zksync.io/dev/#overview

Author

  • Raul is an engineer, actor and freelance writer living in Houston, TX. He is a blockchain enthusiast and contributor on several NFT projects since September 2021 with particular interests in Web3 gaming and the metaverse.

Related Articles

Enroll now

Latest Articles