Deposits
What is a Deposit?
A deposit moves funds from your connected wallet into the shared DustPoolV2 contract. Instead of a simple balance transfer, the contract stores a cryptographic commitment — a Poseidon hash of your ownership key, the amount, asset type, chain ID, and a random blinding factor. This creates a UTXO-style note that only you can spend, using a ZK proof.
Deposits support arbitrary amounts of ETH or supported ERC-20 tokens (like USDC). There are no fixed denominations — you deposit exactly the amount you want. Two deposit modes are available: deposit from your connected (Privy) wallet, or deposit from an external wallet like MetaMask via a generated deposit link or QR code.
Step by Step
- 01
Enter the deposit amount
Choose ETH or USDC and enter an amount. The modal shows your wallet balance and reserves 0.005 ETH for gas when using the MAX button. For USDC deposits, the contract will request an ERC-20 approval before the deposit transaction. - 02
Browser generates the commitment
Your browser generates a random blinding factor and computes a Poseidon commitment:C = Poseidon(ownerPubKey, amount, asset, chainId, blinding). This commitment reveals nothing about the deposit details — only the depositor and the contract can reconstruct it. - 03
On-chain transaction
The deposit callsDustPoolV2.deposit(commitment)with the ETH value attached (ordepositERC20(token, amount, commitment)for tokens). The contract stores the commitment and emits aDepositV2event. Your wallet will prompt you to confirm the transaction. - 04
Note encrypted and saved to IndexedDB
Your deposit note — containing the amount, blinding factor, asset, and commitment — is encrypted with AES-256-GCM (key derived from your spending key) and stored in the browser's IndexedDB. Notes are never stored in plaintext or sent to any server. - 05
Relayer adds commitment to Merkle tree
The relayer monitors the contract for new deposit events and inserts each commitment into the off-chain Poseidon Merkle tree (depth 20). Once included, the commitment can be referenced in ZK proofs for withdrawals or transfers.
0x1a2b3c4d5e6f7890abcd...34567890
C = Poseidon(ownerPubKey, amount, asset, chainId, blinding)
PIN Required
Before depositing, you must unlock your V2 keys by entering your 6-digit PIN. The PIN is combined with a wallet signature via PBKDF2 (100,000 iterations) to derive your spending key and nullifier key. These keys are held in a React ref for the duration of your session — they are never persisted to storage. If you haven't set a PIN yet, the deposit modal will guide you through creating one.
Compliance Screening
When the deposit modal opens, your wallet address is automatically screened against the Chainalysis sanctions oracle. If the address is flagged, deposits are blocked. If the oracle is unavailable, a warning is shown but you may still attempt to deposit — the on-chain contract will enforce the check regardless.
After a successful deposit, a 1-hour compliance cooldown begins. During this window, private transfers are restricted — you can only withdraw back to your original deposit address. This gives compliance systems time to flag suspicious activity before funds become fully transferable.
Irreversible