Private Payments with Public UX on Solana
VeilPay is a privacy-first payment protocol on Solana that enables fully private SPL token transfers while preserving wallet-like UX, notifications, and auditability. Built with Arcium confidential SPL and Helius privacy-safe indexing.
On Solana today, every payment leaks sensitive financial data:
- Wallet balances are public
- Transfer amounts are visible
- Wallets can be clustered through address reuse
- Indexers expose full transaction history
VeilPay solves this by combining encrypted balances with privacy-safe metadata indexing.
Arcium Confidential SPL (cSPL) - Encrypted balances and transfers
Helius Privacy-Safe Indexing - Activity feeds without exposing sensitive data
Stealth Addresses - Prevents wallet clustering
Selective Disclosure Proofs - Optional compliance and audits
Private:
- Wallet balances (encrypted with Arcium MPC)
- Transfer amounts (never revealed on-chain)
- Sender/receiver identities (hidden via commitments and stealth addresses)
Public:
- Transaction existence (timestamp and slot)
- Validity proofs (cryptographic commitments)
- Event metadata (non-sensitive data for indexing)
ConfidentialBalance Account:
- owner_commitment: [u8; 32] (Hashed owner pubkey)
- encrypted_balance: [u8; 64] (Arcium encrypted value)
- nonce: u64 (Replay protection)
- bump: u8 (PDA bump seed)
- Confidential balance storage using Arcium MPC
- Private transfers with encrypted amounts
- Stealth addresses for recipient privacy
- Replay protection via nonces
- Owner verification through commitments
- Privacy-safe event emission for indexing
- End-to-end encryption for sensitive data
- Range proofs for balance validation
- Zero-knowledge proofs for correctness
- Access control via owner commitments
- Rust 1.75+
- Solana CLI 1.18+
- Anchor 0.32+
- Node.js 18+
# Clone repository
git clone <repository-url>
cd veilpay
# Build program
cd veilpay
anchor build
# Run tests
anchor test
# Setup frontend
cd ../frontend
npm install
cp .env.example .env.local
# Edit .env.local with your configuration
npm run devNEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_RPC_URL=https://api.devnet.solana.com
NEXT_PUBLIC_PROGRAM_ID=your_program_id
NEXT_PUBLIC_HELIUS_API_KEY=your_helius_key
NEXT_PUBLIC_ARCIUM_API_KEY=your_arcium_keyconst balancePda = PublicKey.findProgramAddressSync(
[Buffer.from("balance"), owner.publicKey.toBuffer()],
program.programId
)[0];
await program.methods
.initBalance()
.accounts({
confidentialBalance: balancePda,
owner: owner.publicKey,
systemProgram: SystemProgram.programId,
})
.signers([owner])
.rpc();const encryptedAmount = encryptAmount(100);
const commitmentHash = generateCommitmentHash(encryptedAmount, nonce, recipientPubkey);
const encryptedTag = generateEncryptedTag(recipientPubkey, senderSecret);
await program.methods
.privateTransfer(encryptedAmount, new BN(nonce), commitmentHash, encryptedTag)
.accounts({
senderBalance: senderBalancePda,
receiverBalance: receiverBalancePda,
sender: sender.publicKey,
})
.signers([sender])
.rpc();cd veilpay
anchor testTest coverage includes:
- Mint initialization
- Balance initialization
- Private transfers (success and error cases)
- Replay attack prevention
- State consistency validation
- Integration scenarios
cd veilpay
anchor build
anchor deploy --provider.cluster devnetanchor build
anchor deploy --provider.cluster mainnet-betaVeilPay implements multiple security layers:
- Encryption - All balances encrypted with Arcium MPC
- Access Control - Owner commitment verification and signature requirements
- Privacy - Stealth addresses and encrypted tags prevent clustering
- Replay Protection - Nonce-based transaction validation
veilpay/
├── veilpay/ # Solana Program
│ ├── programs/
│ │ └── veilpay/
│ │ └── src/
│ │ ├── instructions/
│ │ ├── state/
│ │ ├── utils/
│ │ └── lib.rs
│ └── tests/
│
└── frontend/ # Next.js Frontend
├── app/
├── components/
├── contexts/
└── lib/
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
MIT License - see LICENSE file for details.
- PROJECT_SUMMARY.md - Detailed project overview
- FRONTEND_SETUP.md - Frontend setup guide
- TEST_COVERAGE.md - Test coverage details
- IMPLEMENTATION_SUMMARY.md - Implementation guide
Built with ❤️ for Solana - Making privacy practical, one transaction at a time.