Confidential Balances Demo

A graphical interface for conducting confidential token transfers on Solana.

About This Demo

This microsite provides a user-friendly interface for conducting confidential token transfers on Solana using browser wallets. It serves as an alternative to the SPL Token CLI, making it easier to interact with confidential balances through a graphical interface.

Built on top of Solana's Token-2022 program, this demo showcases the power of confidential transfers while maintaining compliance capabilities.

How to Use

  1. Start with a token mint

    Begin with a token mint that supports confidential transfers. You'll need the mint address to proceed.

  2. Create a Confidential ATA

    Click the "Create & Initialize Confidential Balance ATA" button to initialize a new token account that supports confidential balances.

  3. Receive tokens

    Receive tokens to your newly created Associated Token Account (ATA). These will appear as your "Public Balance".

  4. Deposit to confidential balance

    Click the "Deposit" button and specify how many tokens you want to move from public to confidential balance.

  5. Apply pending balances

    Click the "Apply" button to confirm and finalize the deposit operation, moving your tokens from pending to available confidential balance.

  6. Decrypt your balance

    Use the "Decrypt Available Balance" button to view your confidential balance. This decrypts the balance locally for your viewing only.

  7. Send confidential tokens

    To transfer tokens confidentially, enter the recipient's address (which must also have a confidential ATA) and the amount to send from your available confidential balance.

Remember that all confidential operations require blockchain transactions. You may need to approve these in your wallet.

Features

  • Cluster selection

    Choose your intended Solana cluster. Be sure to assign the same cluster on your wallet as well. For mainnet, you will need to provide your own RPC endpoint since mainnet public endpoint (api.mainnet-beta.solana.com) is restricted. The current version of this site was tested for mainnet with Helius free tier.

  • Auditor tab coming soon

    Allow individuals with access to the Confidential Transfer auditor key to decrypt the balances of a given transaction hash.

Cautions

  • Failed operations

    This demo requires optimizations. It currently makes excessive RPC calls to evaluate account states. Hitting API limits (especially on public endpoints like devnet & testnet) may result in failed transactions. Confidential Balances operations are often comprised of several transactions. Failing operations half-way may lead to states only recoverable via CLI or other custom implementations. Be sure to have adequate RPC rate limits until optimizations land.

  • Only operate this demo from trusted URLs

    Most of this demo's business logic is orchestrated on a backend facilitating encryption on behalf of the user and therefore exposing the keys during runtime. While your funds are always safe if leaking encryption keys, it defeats the entire purpose of confidentiality. When in doubt, host the project yourself!

Help Us Improve!

Found something confusing? Have an idea to make this better? We welcome all feedback - technical or not!

Share Feedback or Report Issues

No GitHub account? That's okay! Anyone can view existing issues.