This article serves as an overview of current Zero-Knowledge Proof (ZKP) implementations in the crypto space and discusses what to expect from ZKP as an exciting cryptographic method in the upcoming months and years. Specifically, we provide a snapshot of some of the most interesting projects and how ZKP improves important properties of today’s blockchains’ infrastructure, tooling, and applications. In an earlier article on ZKPs written at the end of 2020, we have taken a closer look at the core principles of Zero-Knowledge Proofs, their usage in Verifiable Credentials, and the state of available implementations back then. Now, in 2022 ZKPs are increasingly used as a solution for some of the blockchains’ scalability issues. We have also started to see improvements in its usage for privacy enhancements, though the topic of privacy seems to be in an earlier stage than scalability.
Primer on ZKPs
Essentially, a ZKP is all about trust between multiple parties. In simpler terms, this means one party is able to prove to a second party that it holds a certain piece of information without disclosing the relevant information to the receiving party. For instance, proving to the cashier that you are older than 21 without revealing your actual age. To get a better idea of ZKPs core principles, please refer to this ELI5 video.
ZKP Infrastructure and Tooling
ZKP solutions discussed in this section focus on improving whole blockchain networks or on providing specialized tools for those. For blockchain networks, ZKPs can help with keeping the ledger size consistent or with providing an overall more efficient approach to Distributed Ledger Technology (DLT). SDKs and tools can in return be used for writing ZKP logic and for compiling this logic into ZKP circuits.
Mina Protocol is a layer 1 protocol that takes blockchain infrastructure to a new level by basing blockchain interactions on ZKPs. While other scaling solutions aim to decrease transaction size and cost, Mina has a more holistic approach. Mina is a succinct blockchain, with a constant size of about 22KB.
With Mina, ZKPs are directly integrated into smart contracts and so-called zkApps that can be built using those ZKP-enabled smart contracts. zkApps manage their state off-chain (mostly synchronously) and then store a proof of their state on-chain once the computation is finished. Thus, Mina and zkApps allow the building of highly efficient applications. Fortunately, zkApps are built using Typescript not requiring learning a special-purpose programming language like Solidity with Ethereum.
StarkNet is a layer 2 network for Ethereum using the “StarkEx Protocol” for providing faster and more cost-effective transactions and increased privacy. Instead of directly sending transactions to layer 1 Ethereum, StarkEx uses zkRollups for creating proofs for the transaction on layer 2 and then stores those proofs in batches on layer 1.
The StarkEx Protocol is defined in five different components, i.e., Application, StarkEx Service, SHARP, Stark Verifier, and StarkEx Contracts of which some are acting on-chain and others off-chain.
The high-level architecture above shows how users will use an Ethereum-based application that sends transactions to the StarkEx Service. This service uses StarkWare’s Cairo language for creating zero-knowledge programs that prove the application-relevant state. After a proof has been computed off-chain it is stored on-chain using StarkEx Contracts. The Stark Verifier can then be used to verify the proofs by either checking the state of the StarkEx Contract or by using the SHARP service in case one needs to prove the states of multiple different applications at once.
DuskNet is a business-oriented ZKP-based blockchain with fast transactions for building privacy-preserving smart contracts and confidential tokens for the financial sector that respect confidentiality agreements. Driving factors for DuskNet are mostly privacy concerns and compliance with GDPR rules and the essential need of companies to keep information secure.
To provide these properties in a blockchain network, DuskNet uses PLONKs that are in general faster than bulletproofs but in need of a trusted setup. For more information on PLONKs, I can recommend this blog from Vitalik.
One interesting use case of DuskNet is the XSC Security Token Standard, which provides permission management for an asset’s lifecycle. The ledger records all transactions, but the access rights of token holders are not lost once a token holder fails on a transaction or the access keys are lost. This property is an important requirement of securities law.
EY’s Nightfall 3 provides a secure and privacy-preserving solution for transacting ERC-20 tokens as well as ERC-721 tokens at low cost. The successor of EY’s Nightfall called Nightfall 3 aims to improve the performance of such transactions even more while simplifying the developer experience. In addition, Nightfall 3 provides the ability to transfer ERC-1155 tokens.
Nightfall’s performance improvements are achieved by combining the existing ZK solution with optimistic rollups, creating a ZK-optimistic rollup hybrid. In this scheme, ZK transactions are grouped and then sent to the ledger as an optimistic rollup.
Aleo promises to be the “first decentralized, open source platform to enable both private and programmable applications”. To further encourage the benefits Aleo uses the example of DEXs like Uniswap. A DEX on Aleo would keep the number of tokens you own disclosed or hide from where you got those tokens in the first place. Furthermore, all of this privacy is enabled without removing the ability to integrate with data from public blockchains.
Aleo comes with a variety of tools that should help new developers to build applications using Aleo.
Aleo Studio — Aleos IDE for writing applications with Leo.
Aleo Package Manager — For publishing the packages and applications written with Aleo Studio.
snarkOS — A decentralized OS for running Aleo. SnarkOS contains important logical components for writing ZKP applications and for proving states publicly.
Once you have decided on a certain infrastructure, may it be a ZKP-based blockchain network or a non-ZKP network you can build your own application. This is where ZKPs get interesting for the common user as the benefits are becoming more and more obvious at this level.
Aries describes itself as “a shared, reusable, interoperable tool kit designed for initiatives and solutions focused on creating, transmitting, and storing verifiable digital credentials.” We discussed Hyperledger Aries and their use of Hyperledger Indy’s “Anoncreds” in our earlier article. Interesting to note at this point is that we can see the first integrations of BBS+ signatures (signature-based ZKPs) that enable selective disclosure.
Combined with the W3Cs JSON-LD credentials, Hyperledger Aries could be one of the first movers in providing the ability to use ZKP-enabled W3C credentials in messaging, resulting in a more private and secure exchange of information between users or even devices.
Iden3 is an open-source project aiming to provide a new and decentralized solution for digital identities. Based on ZKPs, Iden3 powers really neat use cases like anonymous logins and reputation proofs while not requiring users to disclose their actual identity. Although it is in the early stages of development, the use cases of an open-sourced and community-driven digital identity solution for end users seem manifold.
Iden3 developed its own Circom language and the Circom 2.0 compiler that allows creating ZK-Snarks (another type of ZKPs) on a more abstract and not mathematical level. This way, Circom allows for easy creation and integration of ZKPs. The figure below shows how Circom and SnarkJS can be used in combination.
Loopring is an open-sourced decentralized exchange using an Automated-Market-Maker(AMM) and zkRollups to provide a fast and cheap method for token exchanges and payments. Loopring and similar applications could very well introduce a significant improvement for multiple fields in the crypto industry like Decentralized Finance (DeFi) and NFT trading.
One of Loopring’s latest announcements includes the hosting of GameStop’s upcoming NFT marketplace. This might introduce the advantages of ZKPs to a broader audience.
dydx is another decentralized exchange mostly focusing on perpetual trading. While dydx was initially launched on Ethereum’s layer 1 it introduced trading as a layer 2 solution for Ethereum in mid-2021 through zkRollups. The solution used for enabling zkRollups is StarkWare’s StarkEx (described above). Using the layer 2 solution instead of the layer 1 solution provides various improvements to trading like instant off-chain settlement. For a more detailed comparison of the benefits of the layer 2 approach please see this blog.
Sorare uses ZKPs in an app for building your own soccer teams and trading your player cards. Like dydx, Sorare introduced its scaling solution of choice in the middle of 2021 by integrating the StarkEx Protocol. While there’s nothing too special about Sorare, I think it is a great example of where the crypto (consumer) space is heading.
In a blog entry, Pierre Duperrin explained the reasoning behind Sorare’s decision to use Ethereum layer 2 scaling solutions that use ZKPs instead of other scaling solutions.The key argument for ZKPs seems to be thescalability trilemma. While there are other scaling solutions out there, ZKP-based solutions provide the advantage of not compromising on security or decentralization while increasing scalability.
ZKPs help to improve the scalability and privacy of a lot of existing solutions in the crypto space — for instance decentralized exchanges. Furthermore, ZKP can be a key enabler for the Web3.0 by improving privacy — not just on a transaction level but also on a network level. Users will be able to interact almost anonymously while still being able to provide the necessary information to participate in networks and applications.
Tools like Hyperledger Aries and networks like DuskNet will further enable businesses to utilize ZKP technology in privacy-preserving solutions. I can also think of scenarios where businesses will be able to integrate private solutions with public solutions. For example, using ZKP-enabled digital identities to participate in open markets privately. Personally, I am confident to say that crypto’s public sector (especially DeFi) will experience a lot of growth in 2022 and early 2023 through ZKP-based scalability improvements. This can already be seen by examples like Sorare or Loopring but will only accelerate once more applications integrate ZKPs.
51nodes GmbH is a provider of crypto-economy solutions based in Stuttgart, Germany.
51nodes supports companies and other organizations in realizing their Blockchain projects. 51nodes offers technical consulting and implementation with a focus on smart contracts, decentralized apps (DApps), integration of blockchain with industry applications, and tokenization of assets.