ZK Proofs for Privacy and Scalability

Stefano Tempesta
6 min readNov 22, 2023

Zero Knowledge is the crypto buzzword of the year — and for good a reason! but if you’re not a cryptographer or a developer, you may be wondering: what exactly is a zero-knowledge proof (ZK-proof)?

The core principle behind ZK-proofs is simple yet profound: they allow one party (the prover) to efficiently prove to another party (the verifier) that it possesses certain knowledge without needing to reveal the specifics of that knowledge.

While ZK-proofs existed in theoretical cryptography long before the rise of blockchain, it is the decentralized nature of the latter that has propelled ZK-proofs into the public eye. Blockchain, in its essence, is a public ledger. Every transaction, no matter how trivial, is recorded and can be viewed by anyone. But while transparency is one of the blockchain’s greatest strengths, it’s also its Achille’s heel when it comes to user privacy.

ZK-proofs address the dichotomy between transparency and privacy in the blockchain space. They allow for transactions to be validated without revealing transaction details, thereby preserving user confidentiality while maintaining the immutable nature of the blockchain. By the mid-2010s, projects like Zcash started to build ZK protocols offering private transactions, leading to a surge in interest and adoption of ZK in Web3. But over the last decade or so, the Web3 use case for ZK-proofs has evolved from simple privacy preservation to arguably one of the most important advancements for blockchain technology: verifiable off-chain computing.

Picture generated by DALL·E — A futuristic digital illustration representing Zero-Knowledge Proofs (ZK-Proofs) in the context of blockchain technology. This image visualizes the complex, secure, and efficient aspects of ZK-Proofs, incorporating elements like interconnected nodes, data streams, digital locks, and keys, set against a futuristic digital landscape.

Solving the Scalability Problem

Before I highlight the importance of verifiable off-chain computing, we have to talk about the extreme limitations of smart contracts. Smart contracts are inherently limited in three key ways:

  1. Types of data they can access: Smart contracts can only access the most basic on-chain data points (like wallet balances) and can’t natively access most on-chain data — even as simple as token prices — or any off-chain data.
  2. Storage capacity of the blockchain: Blockchains aren’t built to store vast amounts of data. It’s prohibitively expensive and resource-intensive to do so.
  3. The logic they can execute: A smart contract can only execute very basic conditional logic without needing exorbitant gas fees.

Without a way to solve each of these problems, the blockchain can’t scale to meet the increasing needs of a growing Web3 ecosystem. Luckily, as Web3 has evolved, so too has ZK. While projects like Chainlink’s decentralized oracle network (DON) and cross-chain interoperability protocol (CCIP) have elegantly solved the first problem, several ZK protocols are working to solve the other two.

The most elegant way to solve the limited storage and computing of the blockchain is by moving some of the data and computational work off-chain. The idea that you can perform actions off-chain and use a ZK-proof to succinctly and trustlessly communicate a summary of those actions to the main chain without transferring all the underlying data has ushered in a new paradigm for blockchain technology. Let’s take a look at some of the protocols that are building in this space.

Solving for Storage: ZK-Proven Decentralized Storage

A well-known solution to the blockchain storage problem is off-chain decentralized storage networks. Instead of storing large amounts of data, the blockchain only has to store smaller references to that data as it’s stored in the off-chain platform.

However, simply moving data off-chain isn’t sufficient; in order to ensure that the off-chain data remains available and untampered (to be connected back to a smart contract), you need a ZK-proof. Filecoin’s PoST is a great example of this implementation: it provides periodic cryptographic proofs of continued data storage, fostering trust in the network while still alleviating the data load from the main blockchain.

Solving for Compute: Transaction Rollups

Perhaps the poster child of ZK, ZK-rollups have emerged as the preferred solution to the growing demand for faster and cheaper transactions on L1s like Ethereum. Instead of processing every transaction individually on the main chain, which can lead to congestion and higher gas fees, ZK-rollups take the computational heavy-lifting off the chain, aggregating multiple transactions into a single “rollup”.

For every large batch of transactions processed off the main chain, only a single, compact proof is submitted back to it, providing cryptographic evidence that these transactions were correct. The main chain remains secure without being directly involved in the verification of every individual transaction. ZK-rollups not only enhance transaction processing speed but also conserve the main chain’s resources, significantly boosting throughput and reducing transaction fees. Some of the most prominent ZK-rollups include Polygon’s zkEVM, Matter Labs’ zkSync, and StarkWare’s STARKEx.

Why are ZK Proofs the Future of Ethereum Scaling

Let’s ask ChatGPT what it thinks about the future of ZK proofs 😊.

(Only the next section of this post is generated by ChatGPT!)

<chatgpt version=”4">

Zero-Knowledge Proofs (ZK-Proofs) are considered a promising technology for the future of Ethereum scaling due to several key reasons:

  1. Enhanced Privacy and Security: Zero-Knowledge Proofs allow for the verification of transactions without revealing any sensitive information about the parties involved or the transaction details. This enhances privacy and security, which is a significant concern in blockchain transactions.
  2. Increased Scalability: ZK-Proofs can significantly improve the scalability of Ethereum. By enabling off-chain computation and then proving the correctness of these computations on-chain using ZK-Proofs, Ethereum can process more transactions at a faster rate without sacrificing security. This is crucial as Ethereum currently faces challenges with network congestion and high transaction fees.
  3. Efficiency in Transaction Processing: Zero-Knowledge Proofs enable the aggregation of multiple transactions into a single proof. This aggregation reduces the amount of data that needs to be stored and verified on the Ethereum blockchain, leading to more efficient transaction processing.
  4. Interoperability and Layer 2 Solutions: ZK-Proofs are integral to the development of Layer 2 scaling solutions, like rollups, which process transactions off the main Ethereum chain (Layer 1) and then record the final state on-chain. This approach enhances interoperability between different blockchain systems and contributes to a more robust Ethereum ecosystem.
  5. Energy Efficiency: Since ZK-Proofs can reduce the computational load on the Ethereum network, they contribute to a reduction in energy consumption. This is increasingly important as there is a growing emphasis on sustainability in blockchain technology.
  6. Facilitating Complex Applications: The privacy and efficiency features of ZK-Proofs make them ideal for complex applications like decentralized finance (DeFi) and secure voting systems. They enable these applications to function more efficiently and securely on the Ethereum network.

In summary, ZK-Proofs represent a significant advancement in blockchain technology, offering solutions to some of the most pressing challenges faced by Ethereum, such as scalability, privacy, and energy efficiency. As the technology matures, it is expected to play a crucial role in the evolution and adoption of Ethereum and potentially other blockchain platforms.

</chatgpt>

I’d say, quite accurate!

The Next Generation of ZK

While solutions like ZK-proofs over decentralized storage and ZK-rollups have certainly laid the groundwork for expanding the limitations of the blockchain, there’s still a critical missing piece. On one hand, decentralized storage solutions are just that: storage.

While storage in and of itself is an important tool, these platforms’ inability to perform any sort of “compute” beyond simple data retrieval severely limits the use cases they’re able to support. And ZK-rollups, though powerful processing solutions that cover a wide range of computing functions, still don’t fill the gap entirely.

I’ll cover this aspect of evolution of ZK-proofs to protection of data and code in a future article.

--

--

Stefano Tempesta
Stefano Tempesta

Written by Stefano Tempesta

Web Architect working at the crossroad of Web2 and Web3, to make the Internet a more accessible, meaningful, and inclusive space.

No responses yet