How Does it Work

Core Functionality

Veil operates on a simple concept: users deposit cryptocurrency into a shared pool and later withdraw from the same pool, breaking the link between their deposit and withdrawal. During a deposit, the user submits a β€œsecret” represented as a hash (referred to as a commitment) along with the deposit amount to the Veil smart contract. The contract records the deposit by adding the commitment to its registry. When the user wishes to withdraw, they generate a proof using the secret associated with an unspent commitment from the registry. Thanks to zkSNARKs technology, this proof ensures the withdrawal is valid without revealing which specific deposit it corresponds to. Once the smart contract verifies the proof, it transfers the original deposit to the designated withdrawal address. This process ensures that an outside observer cannot link a withdrawal to a particular deposit.

How zk-SNARKs with merkle trees work can be found here

Why do we need this?

By default, your blockchain transaction history and balances are fully transparent. All activity is accessible on block explorers like Basescan. If someone knows your wallet address, they can easily view your transactions, trace the origin of your funds, estimate your holdings, and monitor your on-chain activity.

This level of transparency can create significant challenges for individuals who value financial privacy. On-chain privacy is not about secrecy for malicious purposes; it’s about protecting personal interests in an increasingly transparent world.

Use Cases

  • When purchasing items or paying for services, you might not want others to see what you bought or how much you spent, protecting your personal preferences and spending habits

  • Onboarding friends and family without sharing your transaction history.

  • Donating to causes or charities can be a sensitive activity, and privacy ensures that your contributions remain anonymous, safeguarding both you and the recipient.

  • General Financial Privacy - Keeping the details of your transactions private prevents sensitive information from being exposed.

Last updated