Even though cryptocurrency transactions aren't tied to anyone's identity, they're normally traceable because they're publicly recorded on a blockchain. If you want to avoid this, you'll need a specific type of cryptocurrency called a privacy coin. One of the methods privacy coins use to keep transactions anonymous is with a technology called zk-SNARKs.

How zk-SNARKs work
With most types of cryptocurrency, a transaction is validated by the network checking that certain conditions have been met. Specifically, the conditions are that the sender has the funds available and that they've provided the correct private key to show that the funds are theirs.
zk-SNARKs allow the sender of a transaction to prove all that without revealing any of the addresses or amounts involved. To offer this, the blockchain network encodes some of its consensus rules in zk-SNARKs.
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 +1.19%) 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 +0.15%) 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
How zk-SNARKs are applied
zk-SNARKs are applied by turning the information that needs to be proven into a mathematical equation. The sender of the transaction constructs a proof that demonstrates:
- The transfer's input and output values match.
- The sender has the private spending keys for the input.
- Those private keys are cryptographically linked to a digital signature for the transaction, ensuring that it can't be modified by anyone who doesn't have the private keys.
The exact way this works depends on the cryptocurrency. For example, Zcash tracks unspent transaction outputs using what it calls "commitments" and requires revealing a "nullifier" to spend these commitments. To keep commitments and nullifiers private, they're stored as hashes.
zk-SNARKs are a useful technology, and cryptocurrencies that incorporate them have become popular investments. While privacy coins have a clear use case, keep in mind that they're volatile, and the level of privacy they offer could lead to regulatory issues in the future. If you decide to invest in a privacy coin, take a conservative approach and avoid putting in more money than you could afford to lose.




