Back to Docs

Privacy & SUSY Swaps

Opt-in confidential transactions for the QuantumAI Blockchain — hide amounts and addresses while maintaining full verifiability

Overview

QuantumAI Blockchain supports opt-in privacy through SUSY Swaps — confidential transactions that hide amounts and addresses while maintaining cryptographic verifiability. Privacy is not mandatory; users choose between public and private transaction modes on a per-transaction basis. Public transactions remain the default for maximum transparency and auditability.

The privacy system is built on three well-established cryptographic primitives: Pedersen commitments for amount hiding, Bulletproofs for range verification, and stealth addresses for address unlinkability. Together they provide strong privacy guarantees without requiring a trusted setup or compromising network security.

Transaction Modes

ModeAmountsAddressesTx SizeVerification
Public (Default)VisibleVisible~300 bytesFast
Private (Opt-In)HiddenHidden~2,000 bytes~10ms (range proof)

Cryptographic Components

Pedersen Commitments

C = v·G + r·H

Cryptographic commitments that hide transaction amounts while preserving additive homomorphism. The sum of input commitments equals the sum of output commitments, allowing validators to confirm that no QBC was created or destroyed without revealing the actual values.

Bulletproofs Range Proofs

~672 bytes, O(log n), no trusted setup

Zero-knowledge proofs that committed values fall within [0, 2⁶⁴) without revealing the value itself. Bulletproofs are non-interactive, require no trusted setup ceremony, and produce compact proofs that scale logarithmically with the number of outputs.

Stealth Addresses

Spend key + View key → One-time address

One-time addresses generated per transaction prevent address linkability. The sender uses the recipient’s spend and view public keys combined with an ephemeral secret to derive a unique destination address. Only the recipient can detect and spend the funds.

Key Images

I = x·H(P)

Cryptographic construct derived from the private key and a hash of the public key. Each confidential output produces a unique key image that is published when spent, preventing double-spending of private outputs without revealing which output was consumed.

How SUSY Swaps Work

1. Commitment Phase

The sender creates Pedersen commitments for each output amount. A commitment C = v·G + r·H binds the sender to the value v using blinding factor r, without revealing v. The blinding factors are chosen so that the sum of input commitments minus the sum of output commitments equals zero, proving conservation of value.

2. Range Proof Generation

For each output commitment, a Bulletproof range proof is generated demonstrating that the committed value is non-negative and less than 2³². This prevents the creation of negative outputs that would effectively mint new QBC. Each proof is approximately 672 bytes regardless of the value range.

3. Stealth Address Derivation

The sender generates an ephemeral keypair and combines it with the recipient's public spend and view keys to derive a one-time stealth address. The ephemeral public key is included in the transaction. Only the recipient, scanning with their view key, can identify incoming payments and reconstruct the private key needed to spend.

4. Key Image Publication

When spending a private output, the sender publishes the key image I = x·H(P). The network checks that this key image has never appeared before, preventing double-spending. The key image is deterministic for a given output, so the same output always produces the same image, but it is computationally infeasible to link a key image back to its source output.

5. Verification

Validators verify: (a) all Bulletproof range proofs are valid, (b) commitments balance (inputs = outputs + fee), (c) no key image has been seen before, and (d) the transaction signature is valid. The entire verification takes approximately 10 milliseconds per transaction.

Privacy Guarantees

Hidden (Private Mode)

  • Transaction amounts
  • Sender and receiver addresses
  • Balance linkability between transactions
  • UTXO ownership graph

Visible (Always)

  • Transaction existence on-chain
  • Block timestamps
  • Fee amounts (paid publicly)
  • Transaction size and network metadata

Deniable RPC Endpoints

Even querying the blockchain can leak information about which addresses or transactions a user is interested in. QuantumAI Blockchain provides four privacy-preserving RPC endpoints that use batching and probabilistic data structures to prevent observation of query patterns.

POST /privacy/batch-balance

Query multiple address balances in a single request with constant-time response, preventing timing side-channels.

POST /privacy/bloom-utxos

Returns UTXOs as a Bloom filter rather than exact matches, providing plausible deniability for which UTXOs belong to the requester.

POST /privacy/batch-blocks

Fetch multiple blocks in one request to mask which specific block the client is interested in.

POST /privacy/batch-tx

Fetch multiple transactions in a single request to prevent observation of which transaction the client is tracking.

Implementation

ModulePurpose
privacy/commitments.pyPedersen commitment creation, verification, and blinding factor management
privacy/range_proofs.pyBulletproofs generation and batch verification
privacy/stealth.pyStealth address generation, scanning, and key derivation
privacy/susy_swap.pyConfidential transaction builder and SUSY swap orchestration

Using Private Transactions

SUSY Swaps are accessed through the QuantumAI Blockchain wallet. When constructing a transaction, toggle the privacy mode to "Private" to create a confidential transaction. The wallet handles commitment generation, range proof creation, and stealth address derivation automatically. Recipients scan for incoming stealth payments using their view key.