A "collaborative zkSNARK" is an encryption technology that allows multiple parties to produce a zero-knowledge proof without revealing any information to each other.
For example, multiple traders can swap assets without disclosing any order details before or after the trade. Renegade is leveraging collaborative SNARKs to build an on-chain dark pool.
How Collaborative SNARKs Work
First proposed by Ozdemir and Boneh, collaborative SNARKs combine two important pieces of encryption technology — ZK SNARKs and MPCs — to create a fully privacy-preserving environment between multiple interacting parties.
- Zero-Knowledge (ZK) SNARKs: Zero-knowledge proofs cryptographically prove that some information is valid without revealing anything about the information itself. “SNARKs” are a particular type of zero-knowledge proof which are easy to verify on a blockchain system.
- Multi-Party Computation (MPC): Multi-party computation is a privacy-preserving computation method which allows multiple parties to generate a proof without revealing any of their inputs. For example, two traders can see if there is a liquidity match between their orders without learning anything about the specific contents of those orders.
Collaborative SNARKs are the marriage of MPC and ZK. More specifically, a collaborative SNARK is an MPC that outputs a zero-knowledge proof as its result.
Collaborative SNARKS on Renegade
Renegade relies on collaborative SNARKs to keep orders on the platform completely private. To match an order, relayers perform pairwise MPC computations with each other. If there is a match, the MPC outputs a valid zero-knowledge proof. This ZK proof then goes on-chain, transferring the funds without revealing what the inputs (the orders) or the outputs (the swapped assets) are.
Implementing just one or the other would not provide full privacy. For example, orders settled using just an MPC would have their inputs hidden, but matches would be visible in plaintext. Orders settled through only a ZK-SNARK, on the other hand, would have their outputs hidden but still show the inputs in plaintext.
Collaborative SNARKs bring together the best of both worlds and provide full pre-trade and post-trade privacy on Renegade.
- Pre-trade privacy: While relayers are able to view the contents of the user wallets they are connected to, they do not share this information with other relayers when matching trades. Instead, relayers use an MPC to match orders. This hides each respective relayer’s information but still allows for a match to be found. Pre-trade privacy eliminates the possibility of MEV and arbitrage trading.
- Post-trade privacy: Once a pairwise MPC between two relayers finds a match, the calculation outputs a zero-knowledge proof of that match. The zero-knowledge proof then gets committed on-chain by the relayers, finalizing the trade and swapping the assets. At no point is the output of the order visible publicly; even the traders themselves do not know the full magnitude of their counterparty’s trade. They only find out what was swapped. Post-trade privacy eliminates wallet tracking and copy-trading.
Collaborative SNARKs provide comprehensive trade privacy throughout the entire order lifecycle, making Renegade the first trustless, decentralized on-chain dark pool.