zk-SNARKs: The Top Practical Applications
Privacy is an important feature for blockchain users and one that Horizen addresses through our implementation zk-SNARKs.
By using zk-SNARKs, transactions and even entire blockchain applications can be verifiably private—a feature that has been highly requested by many in the space. zk-SNARKS have enabled privacy-enhanced projects to build their applications on Horizen and enable shielded transactions that preserve sender and recipient anonymity optionally.
zk-SNARKS: Explain Like I’m 5
Imagine that you’re playing a game of “Where’s Waldo?” with three friends, with a $1,000 betting pool to be split among the winners. You and your friends are sitting around a table, and you’re all given a sheet of paper with the image of Waldo on it.
You have to find Waldo in the picture—and as soon as you find Waldo, you need to show that you’ve found him, but without giving away his location or any hints. In other words, you want to prove knowledge of a fact without revealing any information beyond the validity of your claim.
In our metaphor, you can take a piece of paper of the same size and mark a spot in the same position Waldo would be on the game sheet. You can then hide the sheet in a puzzle box, and once your friends solve the puzzle, they can see for themselves that you marked the point where Waldo would be.
zk-SNARKS: Technical Overview
On a more technical level, zk-SNARKs use a cipher to prove that certain steps have been taken in without revealing what those steps are. In our metaphor, the cipher was simply another sheet of paper, and in practice, zk-SNARKs are based on heavy computation, like computing a hash millions of times.
Instead of representing data as a point on paper, data is represented through polynomials (equations). The polynomial can be factored using the factor theorem to get the original data.
Finally, we can use polynomial commitments. In a nutshell, a commitment is a mathematical proof that something happened. With this proof (which is a type of hash), we can verify a certain piece of information without ever revealing the information itself.
Top Use-Cases of zk-SNARKs
zk-SNARKs are used for a wide variety of applications. Horizen uses them to enable privacy-preserving sidechains, cross-chain transfers, and even privacy-enabled audit solutions.
SDKs
Horizen’s zk-SNARK-enabled SDKs allow developers to create, deploy, and manage fully customizable blockchains. Our SDKs are a customizable toolkit that includes the components required for building a blockchain, including the Cross-Chain Transfer Protocol (CCTP), enabling communication with the Horizen mainchain.
The CCTP leverages zk-SNARK technology so the Horizen mainchain can verify transactions from sidechains without knowing their internal data. This enables a fully scalable yet private ecosystem that maximizes throughput and maintains low transaction fees.
Privacy-Enhanced Sidechains
Sidechains are parallel blockchains that communicate with the mainchain through a bridge. In Horizen’s case, this bridge is implemented with a recursive proving circuit. This means each proof verifies previous transactions while proving a new transaction, thus proving the entire history of transactions.
At the end of an epoch, or a defined number of blocks, a final recursive proof is submitted to the Horizen mainchain that provides proof of correct state progression. This enables Horizen to establish decentralized and verifiable cross-chain transfers from all blockchains in the ecosystem without relying on trusted validators.
zkAudit: Private Yet Transparent
Horizen Labs has pioneered zkAudit technology by leveraging the Horizen blockchain network, enabling auditors to verify information without revealing identifiable information about senders or receivers. This provides an unprecedented level of transparency while preserving user privacy.
Of course, this is accomplished using zk-SNARKs, where all transactions can remain confidential because all of the information is encrypted, enabling privacy while upholding validity in near-real-time.
This ensures that no third party can censor transactions or manipulate data—only verifiable events take place on the blockchain.
zkAudit is used by partners like Celsius Network, a global industry-leading cryptocurrency yield-earning company. With zkAudit, Celsius can prove facts like revenue and liquidity in near-real-time without revealing sensitive data about the underlying transactions or relying on any third-party validators, allowing Celsius to improve transparency while preserving privacy.
zkAudit removes the need for the slow antiquated process of traditional auditing, essentially enabling triple entry audit by using the blockchain and making auditing transparent yet private.
Building Scalable Privacy Solutions With zk-SNARKs
If you’d like to build your own privacy solutions with zk-SNARKs, you can use Ginger-lib, a new zk-SNARK library by Horizen, written in Rust. Rust is a developer-loved language, thanks to its blazing speeds and memory efficiency.
This general-purpose toolkit enables developers to implement zk-SNARKs supporting full recursive proof composition. Recursive Proof Composition is a proof that can verify other proofs, which will allow developers to verify the state of a sidechain or an entire mainchain in a fast, succinct and inexpensive way without needing to synchronize the entire chain history.
More specifically, this library’s key additions include the MNT4-753 and MNT6-753 elliptic curve cycles with all the fields, groups, primitives, and gadgets necessary to implement recursive SNARKs.
Developers can also access several unit tests to improve implementation quality.
zk-SNARKs: A New Hope for Blockchain Adoption
The future of blockchain technology is promising, and with the development of zk-SNARKs, we can expect to see a new wave of innovation in distributed ledger technology.
This will bring about exciting developments in the cryptocurrency space and have a significant impact on other industries. The applications of zk-SNARKs are practically endless, and it’s exciting to think about what they might enable in the future.
Privacy is becoming an increasingly popular topic of conversation in the digital world. As more people demand privacy from their online activities, privacy-preserving blockchain technology will continue to become a more popular choice for storing value.
By building privacy-enabled applications on top of zk-SNARKs, users can enjoy the benefits of blockchain technology without sacrificing their privacy.