Smart Contracts

The core functionality of Veil (zk-SNARKs deposit pool) is based on the Tornado Cash contracts from an L2 deployment with changes around who can and can't deposit.

There are 3 contracts in Veil.

Veil Validator Contract

The validator contract serves as the primary entry point for deposits. It also stores verified users, along with token data + deposit limits etc.

  • Transparent Upgradable Proxy contract

  • Controls who can deposit into which pools

  • Deposits can be paused (deposits only)

Fixed Denomination Contracts

There are several of these contract in Veil. One for each denomination / currency type. This contract is heavily based on the tornado cash logic.

  • Deposits into these contracts can ONLY be made via the Veil Validator contract

  • Withdrawals are made directly at these contracts — cannot be turned off.

  • Contracts are not upgradable and cannot be paused

Verifier Contract

Generated automatically using snarkJS. Based on the same Tornado Cash circuit compilation. Contracts can be found in Deployments

Last updated