Transaction Security
Keep Your Secrets Safe
Store Secrets Offline
Keep your note secrets in a secure, offline location. Hardware wallets or encrypted files are recommended.
Use Multiple Notes
Split large amounts across multiple deposits to reduce risk and improve privacy.
Verify Transaction Details
Always verify transaction parameters before signing:
- Recipient address: Ensure the withdrawal address is correct
- Amount: Confirm deposit/withdrawal amounts match your intent
- Fees: Check that fees are within expected ranges (0.25% for withdrawals)
- Token type: Verify you’re transacting with the correct SPL token
Privacy Best Practices
Timing and Anonymity Set
Wait Before Withdrawing
For maximum privacy, wait for multiple other deposits before withdrawing. A larger anonymity set makes linking deposits to withdrawals more difficult.
- Minimum wait: Wait for at least 10-20 other deposits in the same denomination
- Different amounts: Avoid depositing and withdrawing the exact same amount
- Time variation: Don’t withdraw at predictable intervals
Network Privacy
Use VPN or Tor
Protect your IP address when interacting with the protocol to prevent network-level correlation.
Different Wallets
Consider using separate wallets for deposits and withdrawals to enhance privacy.
Amount Management
Deposit Limits
Current Limits:
- SOL: Maximum 1,000 SOL per deposit
- SPL Tokens: Limits vary by token (set by protocol authority)
lib.rs:78, lib.rs:267-272Breaking Up Large Amounts
For amounts exceeding deposit limits or for better privacy:- Split deposits: Break large amounts into multiple smaller deposits
- Use different denominations: Vary the amounts to avoid patterns
- Stagger timing: Space out deposits over time
- Mix tokens: Consider using multiple token types if appropriate
Relayer Safety
Using Relayers for Withdrawals
Relayer Best Practices
Relayers enable withdrawals to fresh addresses without linking to your deposit wallet.
- Use reputable relayers with transparent fee structures
- Understand that relayers know the withdrawal address (but not the deposit)
- Consider using multiple relayers for different withdrawals
- Verify the relayer’s smart contract is correctly implemented
Smart Contract Interaction
Verifying Program Deployment
Before interacting with Privacy Cash, verify the on-chain program:Program ID (Mainnet):Verified Hash:Use Solana verification tools to ensure the deployed program matches the audited source code.
Approved Tokens Only
Token Allowlist
Only use approved SPL tokens listed in the protocol documentation.
- USDC (Circle)
- USDT (Tether)
- ORE
- ZEC (Zcash)
- stORE (Staked ORE)
- jlUSDC (Jupiter LP USDC)
- jlWSOL (Jupiter LP Wrapped SOL)
lib.rs:52-60
Fee Management
Understanding Fee Structure
Deposits
Free - No protocol fees for deposits (0%)
Withdrawals
0.25% - Standard withdrawal fee (25 basis points)
lib.rs:91-92
Fee Error Margin
The protocol allows a 5% error margin on fees to accommodate minor calculation differences:lib.rs:93, utils.rs:148-212
Operational Security
Wallet Security
Hardware Wallets
Use hardware wallets for signing transactions when possible.
Multi-Signature
For large amounts, consider using multi-signature wallets for deposits.
Fresh Addresses
Withdraw to fresh addresses that haven’t been publicly linked to you.
Regular Audits
Periodically review your notes and transactions for any anomalies.
Backup Your Data
Backup recommendations:- Store encrypted backups in multiple secure locations
- Use different encryption keys for different backups
- Test recovery procedures periodically
- Consider using secret-sharing schemes (e.g., Shamir’s Secret Sharing)
Monitoring and Alerts
Track Your Transactions
Monitor these events:
CommitmentData: Emitted when SOL deposits/withdrawals create new commitmentsSplCommitmentData: Emitted for SPL token transactions
lib.rs:351-361, lib.rs:505-517Merkle Root History
The protocol maintains a history of 100 recent Merkle roots:- Transactions can reference any root from this history
- Older roots are automatically pruned from the history
- If your proof references a root outside the history window, the transaction will fail
Common Pitfalls to Avoid
Transaction Failures
Double-Spend Attempts
Using the same nullifier twice will cause automatic transaction failure.
Invalid Proofs
Ensure your zero-knowledge proof is correctly generated for the current circuit.
Unknown Roots
Verify your Merkle root is still in the 100-entry history before submitting.
Insufficient Funds
Ensure the pool has enough liquidity for your withdrawal plus fees.
Privacy Leaks
Avoid these common privacy mistakes:- Same-amount patterns: Don’t deposit and withdraw identical amounts
- Immediate withdrawals: Wait for more deposits to increase anonymity set
- Address reuse: Don’t withdraw to previously used addresses
- Metadata correlation: Use different timestamps, gas prices, and wallet addresses
- Social correlation: Don’t discuss specific deposits/withdrawals publicly
Emergency Procedures
If You Lose Your Note Secret
If You Suspect Compromise
If you believe your note secret may be compromised:- Immediately withdraw: If possible, withdraw to a new, secure address
- Use a relayer: Consider using a relayer to avoid exposing your IP
- Monitor the chain: Watch for unauthorized withdrawal attempts
- Secure new funds: Use different wallets and secrets for future deposits
Additional Resources
Security Audits
Review comprehensive security audits by multiple firms
Safety Features
Learn about built-in protocol security mechanisms
GitHub Repository
Examine the open-source code yourself
SDK Documentation
Integrate Privacy Cash safely into your application