Skip to main content
Deploying to mainnet requires careful preparation and security considerations. The Privacy Cash mainnet deployment is fully audited and uses multisig governance.

Program Information

  • Network: Solana Mainnet Beta
  • Program ID: 9fhQBbumKEFuXtMBDw8AaQyAjCorLGJQiS3skWZdQyQD
  • Upgrade Authority: AWexibGxNFKTa1b5R5MN4PJr9HWnWRwf8EW9g8cLx3dM (Squad Multisig)
  • Verification Hash: c6f1e5336f2068dc1c1e1c64e92e3d8495b8df79f78011e2620af60aa43090c5
Mainnet deployment requires real SOL and affects real user funds. Ensure thorough testing on devnet first.

Pre-Deployment Checklist

1

Complete Devnet Testing

  • All unit tests pass
  • Integration tests successful
  • User acceptance testing complete
2

Security Audit

  • Code has been audited by reputable security firms
  • All critical issues resolved
  • Audit reports reviewed
3

Prepare Keypairs

  • Secure the program keypair (zkcash-keypair.json)
  • Secure the deployment keypair with sufficient SOL
  • Set up multisig wallet for upgrade authority
4

Plan Upgrade Authority Transfer

  • Configure Squad multisig wallet
  • Plan authority transfer transaction
  • Coordinate with multisig signers

Build for Mainnet

1

Navigate to Anchor Directory

2

Build Verifiable Program

Always use verifiable builds for mainnet:
This ensures the build can be reproduced and verified by anyone.
3

Copy Program Keypair

Deploy to Mainnet

Ensure you have sufficient SOL for deployment. Program deployment typically costs 5-10 SOL depending on program size.

Deploy Command

This command:
  • Deploys the program to mainnet
  • Sets your deploy-keypair.json as the initial upgrade authority
  • Creates the program account at the address specified in zkcash-keypair.json

Initialize Mainnet Program

Initialize SPL Token Trees (via Squad)

For mainnet, program initialization is done through Squad multisig for security.

Generate Squad Transaction

This script generates a base58-encoded transaction that can be submitted to Squad: Configuration:
  • USDT Mint: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
  • Max Deposit: 200,000 USDT
  • Squad Vault: AWexibGxNFKTa1b5R5MN4PJr9HWnWRwf8EW9g8cLx3dM

Submit to Squad Multisig

1

Copy Transaction

Copy the base58 transaction output from the script
2

Create Squad Proposal

Go to your Squad multisig interface and create a new proposal
3

Paste Transaction

Paste the base58 transaction into the proposal
4

Get Signatures

Coordinate with multisig members to approve and execute

Transfer Upgrade Authority

After successful deployment, transfer upgrade authority to the Squad multisig:
This command:
  • Sets the Squad vault as the new upgrade authority
  • Removes single-key control over program upgrades
  • Requires multisig approval for future updates
This operation is irreversible. After transfer, only the Squad multisig can upgrade the program. Verify the multisig address before executing.

Address Lookup Tables (ALT)

For transaction size optimization, Privacy Cash uses Address Lookup Tables.

Create ALT

This script:
  • Creates a new Address Lookup Table
  • Adds all frequently-used protocol addresses
  • Includes PDAs for SOL and SPL token trees
  • Adds token program accounts and ATAs
Addresses included:
  • Program ID and PDAs
  • SOL tree account and token account
  • USDC tree account and associated token accounts
  • Fee recipient accounts
  • Relayer addresses
  • System programs

Extend Existing ALT

To add new tokens (e.g., USDT) to an existing ALT:
Current ALT: HEN49U2ySJ85Vc78qprSW9y6mFDhs1NczRxyppNHjofe

Update Configuration (via Squad)

Configuration updates like deposit limits must go through Squad multisig.

Update SPL Deposit Limit

This generates a Squad transaction to update the deposit limit for an SPL token. Example Configuration:
  • Token: USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v)
  • New Limit: 1,000,000 USDC
The script outputs:
  • Instruction discriminator
  • Serialized parameters
  • Complete base58 transaction for Squad

Verify Deployment

After deployment:
1

Verify Program ID

2

Verify Upgrade Authority

Confirm the upgrade authority is the Squad multisig:
3

Run Verification Build

See the Verification guide for build verification steps

Monitoring

Check Program Health

Security Best Practices

Follow these security guidelines for mainnet deployment:
  • Never commit keypairs to version control
  • Use hardware wallets for multisig signers
  • Test on devnet before every mainnet upgrade
  • Coordinate multisig operations with all signers in advance
  • Monitor program activity after deployment
  • Keep backups of all keypairs and configuration
  • Document changes for audit trail

Mainnet Configuration Summary

Next Steps

Verify Deployment

Verify your mainnet build matches the deployed bytecode