Exploring the Power of zkProofs — My Journey With zkSync

Ines Isljami • TxFusion
9 min readAug 19, 2023

--

Ever wondered how technology from the ’80s could revolutionize 21st-century blockchain technology?

Well then let me wish a warm welcome to the world of Zero-Knowledge and zkProofs!

A brief overview of ZK Proofs

Imagine a world where you can prove the authenticity of a claim without sharing any more information. Sounds like a dream? Well, that’s ZKP — a game changer for modern blockchain tech.

The name of this concept roots back to a philosophy of releasing only proof of the existence of info and zero actual information to verifying parties. Founded in 1985, the philosophy of Zero-Knowledge (ZK) Technology has been seeing massive developments in recent years.

The first public mention of the ZK concept was by researchers Silvio Micali, Shafi Goldwasser, and Charles Rackoff in a publication titled The Knowledge Complexity of Interactive Proof Systems.’ In simple terms, Zero-Knowledge is an innovative concept where two parties can validate information between them without revealing the actual data.

We continually see the need to implement zero-knowledge proofs in the modern, dynamic, fast-paced digital world. Sensitive data like password checks require interactions where a party can prove the authenticity of a statement without conveying any other info aside from the fact that ‘this statement is true.’

Moreover, the presence of ZK in any technology would prevent anyone from observing transaction details hence fostering higher levels of security.

“ZKPs are cardinal to developing a blockchain system that marries transparency with privacy, enabling verifiable transactions without ever exposing their content.”

Since the birth of blockchain, ZK proofs have been a crucial force, offering unparalleled levels of privacy and security. Multiple blockchain networks, including Ethereum, ZCash, Polygon and more, have employed or plan to implement different iterations of Zero-Knowledge proofs.

The concept of ZK proofs comes in two fundamental types:

  • interactive ZKP (in this type of ZKP, the prover must convince each verifier in a series of actions)
  • non-Interactive ZKP (these create a proof fully verifiable by anyone)

The role of ZK Proofs in the blockchain realm

Despite being founded in the 80s, the idea of ZKPs has been gaining momentum faster recently, especially since the birth of blockchain. Its wider applications in blockchain networks could solve 3 major challenges:

1. Scalability

One of the most popularized advantages of ZK Rollups is scalability. The inability to scale, as seen in several major blockchains like Ethereum and Bitcoin, is a serious dilemma. The consensus mechanism is challenging in many blockchains, consuming intensive computational power.

The advent of ZKP technologies offered the blockchain realm a novel, more inventive solution for the scalability predicament. With ZK Proofs solutions, verifying a transaction is just as simple as confirming the proof of the existence of info.

Blockchains need not store the entire transactional data, only small data representing the proof. Once you confirm the transaction, you have validated all transactions in the batch. Scalability is, therefore, one of the primary benefits of using ZK Rollups. But what are the other benefits?

2. Privacy

When I conduct my daily transactions, privacy is my key requirement. I want the info about my account details and the amounts withdrawn to remain privy to me.

My first interaction with blockchain-focused ZKPs was in the ZCash cryptocurrency. ZCash blockchain network launched with the general theory of fostering full transaction privacy.

At the dawn of blockchain, privacy was one of the key selling points of this technology. While Bitcoin was never designed for privacy, many crypto enthusiasts continued demanding more anonymity of transactions.

The emergence of ZKPs afforded blockchain networks and users more anonymity. As mentioned earlier, Zero Knowledge is the verification of information without actually sharing the info. So someone can demonstrate a point without sharing the specifics.

In a ZKProof setup, you don’t need information like a username or password to access an account. Instead, you must provide a ZKProof and fully validate your identity.

The validators do not need full transaction details to verify in a transaction setup. Instead, a simple ZKProof can be used in validating any transaction. As such, the validator does not know the transacting parties but trusts the validity of the transactions.

“Zero Knowledge tech adds an enigma to blockchain, making it possible to validate authenticity without surrendering privacy.”

Therefore, any computations done with ZK proofs on blockchain tech enjoy an extra layer of privacy obscuring sensitive info.

3. Security

Security is a major dilemma in the crypto ecosystem — investors lose millions yearly from security attacks. By design, blockchain offers a security guarantee for assets and decentralized ledger storage cutting down centralization risks.

Zero-knowledge proofs bolster security by ensuring that only actual parties of information can decipher it. Any attempts to forge will cause a variance in the final root, meaning the verifier will reject the transaction.

Simply put, ZK proofs leverage validity proofs that guarantee that any info related is accurate.

ZKPs have been increasingly touted as the best tools for dealing with a pandemic eating into the crypto ecosystem, the rug-pull disease.

Rug pulls take advantage of the project founder’s anonymity. Conversely, developers who desire to remain anon will begin by providing evidence of their honest intentions, acts of good faith, and financial stability but not revealing sensitive information.

ZKPs also provide a more secure transaction validation model. This fosters security by protecting sensitive information.

I have always believed that:

“Rug pulls are the opposite of what ZKPs promote — transparency remains intact but privacy is respected.”

This innovative tech builds trust and transparency, curbing any chances of rug pulls.

Types of ZK-EVM

ZK-EVM refers to Zero Knowledge proofs that have some connection or compatibility with Ethereum’s virtual machines. In recent years, there has been an increasing number of ZK-EVMs offering different solutions to Ethereum and the Virtual machine.

Here are the 5 types of ZK-EVM:

Type 1 ZK-EVMs

These are fashioned to be fully equivalent to Ethereum without any modifications. They leverage similar hashes, state trees, precompile, translation trees and more.

Their biggest advantage is the perfection of compatibility; hence, they are excellent for improving scalability on L1 and creating rollups.

On the downside, Type 1 ZK-EVMs is the complexity to ZK-prove. Ethereum’s design was not created to be compatible with ZK. As such, some parts of ETH are complex for ZK to prove.

A good example of Type 1 ZK-EVM is the ZK-EVM Community Edition.

Type 2 ZK-EVMs

Type 2 ZK-EVMs aim to be EVM-equivalent, resembling Ethereum “from within” but exhibiting differences in external data structures like the block structure and state tree. The idea is to offer compatibility with existing applications while making minor alterations to Ethereum, simplifying development.

Type 2 ZK-EVMs achieve full EVM compatibility.

However, there is a downside in the applications that validate Merkle proofs of historical Ethereum blocks to authenticate historical transactions, receipts, or states. These proofs will be disrupted if a ZK-EVM substitutes Keccak with a different hash. Moreover, Type 2 ZK-EVs still suffer from prolonged prover time. Scroll’s ZK-EVM project and Polygon Hermez are building a Type 2 ZK-EVM.

Type 2.5

Type 2.5 denotes an EVM-equivalent approach, barring gas costs. They reach better prover times by massively increasing the gas costs of some operations. The operations could include precompiles, the KECCAK opcode, specific calling contracts patterns, accessing memory or storage, or reverting. While these alterations reduce developers’ access to some tools, it is not a bad move.

Type 3 Balance Between Efficiency and Compatibility

Type 3 ZK-EVMs stand out for their near-EVM equivalence, which eases the development process and accelerates prover times. Type three makes major sacrifices, like omitting precompiles and other complex features. They also handle elements like memory, stack or contract codes in a slightly different mode.

Despite type 3 offering compatibility, it is sometimes necessary for application codes to be rewritten.

Notable builders of Typer 3 ZK-EVMs are Scroll and Polygon, both of which are expected to enhance compatibility further. Type 3s can be further developed into type 2.5 by developing the precompiles.

Type 4

In Type 4 systems, smart contract source code is written in a high-level language and compiled into a ZK-SNARK-friendly language. Owing to the modification, the prover times are greatly improved since there’s no need to prove each EVM execution step. Moreover, Type 4 reduces costs while promoting decentralization.

However, there could be some mismatch in the contract addresses associated with the Type 4 system compared to those in the EVM. As such, applications relying on counterfactual contracts, ERC-4337 wallets, and EIP-2470 singletons will suffer.

zkSync, a recently launched Ethereum L2 solution, is currently the main network leveraging Type 4 ZK-EVMs.

My adventure with zkSync

It is common knowledge that myriads of scaling solutions are mainly designed for Ethereum. Polygon, Arbitrum, Loopring, Immutable X, and xDai Chain have been towering over the crypto waves as the best scaling solutions.

So, why zkSync?

Developed to solve the challenges of the blockchain industry, zkSync was originally met with scepticism. There were questions on whether this tech could address the scalability and cost issues associated with the blockchain realm.

Today, the question is no longer if zkSync can deliver; rather, how further zkSync is seeking to go. The project amassed glory only in the short time of operation.

Messari mentioned that zkSync Era’s TVL surpassed its equal Polygon zkEVM. Early in June, zkSync Era surpassed a landmark of $500 million in TVL.

zkSync leverages a stylistic class of zk-roll-ups.

A rollup is simply a unique way a system bundles millions of transactions into one. Today, ZK rollups remain among the hottest trends in the crypto realm, with tokens associated with this technology surging vastly.

zkSync is a layer-2 protocol designed to scale Ethereum by leveraging the unique ZK technologies. The network bolsters Ethereum’s throughput and preserves its foundational values, including decentralization.

Its zkSync’s unique scaling ability made me love this technology.

zkSync leverages ZKPs to batch multiple transactions processing them off-chain, lowering the load on Ethereum. This futuristic approach decoded the scalability issue long associated with blockchain networks.

As we began the research to create our project TxFusion, zkSync stood out as the best option for hubbing our project. As such, this led to a collaboration between TxFusion and zkSync.

Benefits of zkSync

Hyperscalability

zkSync comes with a hyper-scalability feature that aids in processing massive numbers of transactions without impacting the costs. Owing to hyper scalability, zkSync offers cheap computation, storage, and unlimited throughput.

Security

zkSync developed a secure network through long bug-testing processes and contract audits before opening to the public. Moreover, this technology boasts of inheriting layer 1 security. Its open-source system and battle-tested security protocols are why I fell in love with the tech.

EVM Compatibility

Finally, zkSync Era brought computational compatibility with the Ethereum Virtual Machine. This compatibility expanded zkSync’s use cases to smart contract applications.

Other blockchain applications of zkProofs

ZK-SNARKs

One of the earliest applications of ZK proofs was Z-Cash. The crypto network developed a system called ZK-SNARKs (zero-knowledge succinct non-interactive argument of knowledge) to provide obscured transactions. Launching with this ideology, Z-cash was for years touted as the most privacy-focused cryptocurrency network.

Another crypto network leveraging ZK SNARKs is Horizen, initially named Zen. In December 2021, Horizen implemented Zendoo, a ZK-SNARKs-powered cross-chain protocol, to provide scalability, privacy, and lower transaction costs. Horizen offers software development toolkits for designing independent blockchains or sidechains. The parallel chains submit data to the main chain using the Zero Knowledge proofs.

ZK-STARKs

Developed by the founder of Starkware and StarkNet, Eli Ben-Sasson, ZK-STARKs is a newer approach to ZK rollups. It stands for Zero-Knowledge Scalable Transparent Argument of Knowledge and was born purely as an alternative to the popular ZK-SNARKs.

Starkware’s scalability technology mainly relies on STARKs. They bolster the scalability and security of the blockchain networks using them.

ZK-Rollups

As established, zkSync is the best network offering zk-rollups in the industry. These zk-rollups enable this network to offer top-tier scaling services within the Ethereum network. While Polygon and Loopring also utilize zk-rollups, zkSync has been seen to thrive in that space.

My thoughts

ZKPs have emerged as a revolutionary technology that shapes the blockchain ecosystem. Despite being launched decades ago, ZKPs earned a place in modern technology by tackling scalability, privacy, and security issues.

Blockchains like Ethereum, Zcash and my favourite zkSync Era, are towering in using ZKPs. This technology is now a tested antidote for the rug pull disease and other security challenges. Its unique way of fostering privacy also enhances its perks.

I really believe that as we move forward, ZKPs likely hold a promise for even bigger advancements within and beyond blockchain.

--

--