During the transaction process, zk-SNARKs turn the information that needs to be proved into equations. These equations can be evaluated and solved without disclosing the information itself.
Pros and cons of zk-SNARKs
The primary benefits of zk-SNARKs are the privacy and efficiency they offer. They shield sensitive information, it takes just milliseconds to verify them, and they don't require extended interaction between the parties involved. All that's needed is one message from the prover to the verifier.
Although zk-SNARKs don't have any glaring drawbacks, if someone has the private key used to set up the protocol, they'd be able to create false proofs and counterfeit funds. Privacy coins that use zk-SNARKs must take steps to ensure no single party has access to that private key.
zk-SNARK vs. zk-Rollup
zk-SNARK is far from the only type of zero-knowledge proof used by cryptocurrencies. Another common technology is the zk-Rollup, a scaling solution to help Ethereum (ETH +0.61%) process transactions more efficiently.
A rollup bundles a large group of transactions and validates them off-chain, meaning all the computations are handled off the main Ethereum blockchain. They're then rolled up into a single transaction that's sent to Ethereum's execution layer.
There are different types of rollups available. For example, Optimistic rollups assume transactions are valid until they're proven false. zk-Rollups, on the other hand, instantly verify transactions and generate cryptographic validity proofs. The proofs can be generated using zk-SNARKs or another type of zero-knowledge proof technology, zk-STARKs.
zk-SNARK examples
The most well-known example of zk-SNARKs is their use in shielding cryptocurrency transactions. Zcash is the first widespread application of zk-SNARKs. This privacy coin allows users to choose between private and transparent addresses. When a user chooses a private address, zk-SNARKs shield the transaction data.
Other blockchain projects are also using zk-SNARKs. Ethereum started working on integrating Zcash and zk-SNARKs in 2017. That same year, Zcash partnered with JP Morgan Chase (JPM +1.34%) on building a blockchain-based payment system with zk-STARKs.
While zk-SNARKs are currently used to privatize financial transactions, that's not their only application. In the future, we could see them used to protect people's data during online activity.
Related Investing Topics