Skip to Content
Native FeaturesPrivacy Transfer (UNO)

Privacy Transfer (UNO)

TOS provides optional privacy through the UNO (Universal Nullifier Object) protocol, allowing encrypted balances and transfers with zero-knowledge proof verification.

Implementation Status

FeatureStatus
UnoTransfers (encrypted → encrypted)Implemented
ShieldTransfers (public → encrypted)Implemented
UnshieldTransfers (encrypted → public)Implemented
FeeType::TOS (public fee)Implemented
FeeType::Energy (gas-free)Implemented
FeeType::UNO (private fee, burned)Implemented
ZK proofs (Twisted ElGamal)Implemented

Privacy Levels

LevelSenderReceiverAmount
PublicVisibleVisibleVisible
AmountHiddenVisibleVisibleEncrypted
FullPrivateVisibleEncryptedEncrypted

Transaction Types

Shield (Public → Encrypted)

Convert public balance to encrypted UNO balance:

// Shield 1000 TOS ShieldTransfer { amount: 1000_00000000, // Public amount asset: TOS_ASSET, } // Result: 1000 TOS now in encrypted balance

UNO Transfer (Encrypted → Encrypted)

Transfer between encrypted balances:

UnoTransfer { privacy_level: PrivacyLevel::AmountHidden, sender: my_address, receiver: recipient, encrypted_amount: encrypt(amount), zk_proof: generate_proof(), nullifier: generate_nullifier(), }

Unshield (Encrypted → Public)

Convert encrypted back to public:

UnshieldTransfer { encrypted_amount: my_encrypted_balance, zk_proof: generate_unshield_proof(), nullifier: generate_nullifier(), } // Result: Amount appears in public balance

Fee Payment Options

Fee TypeSourcePrivacyDestination
TOSPublic balanceLowMiners
EnergyStaked TOSMediumGas-free
UNOEncrypted balanceHighBurned
pub enum FeeType { TOS = 0, // Public fee Energy = 1, // Gas-free UNO = 2, // Private (burned) }

Gas Costs

OperationCostProof Time
Shield$0.01Instant
AmountHidden transfer$0.02~1 second
FullPrivate transfer$0.05~2 seconds
Unshield$0.01Instant

Security

Double-Spend Prevention

/// Nullifier mechanism /// Each output can only be spent once fn check_nullifier(nullifier: Hash) -> bool { if nullifier_set.contains(nullifier) { return false; // Already spent } nullifier_set.insert(nullifier); true }

ZK Proof Guarantees

The zero-knowledge proof verifies:

  1. Sender has sufficient encrypted balance
  2. Transfer amount is positive
  3. Balances are correctly updated
  4. No tokens created from nothing

Compliance Support

/// Optional compliance proof pub struct ComplianceProof { /// Prove AML compliance pub aml_proof: ZKProof, /// Prove identity verified (without revealing identity) pub kyc_proof: ZKProof, /// Prove amount within limits pub limit_proof: ZKProof, }

Use Cases

Private Salary Payments

Problem: All salaries visible on public blockchain Solution: AmountHidden transfers - HR knows payment was made (sender visible) - Employees can't see each other's pay - Auditors can verify with ZK proofs

Gaming Privacy

Problem: Other players copy bet sizes Solution: AmountHidden betting - Game sees deposit occurred - Bet amount is encrypted - Prevents copy-trading

Large Transfers

Problem: Large transfers attract attention Solution: FullPrivate transfers - Only sender identity public - Amount and recipient encrypted - Reduces targeting risk

Comparison

FeatureTOS UNOMoneroZcashTornado
Optional privacyYesNoYesYes
Hidden amountYesYesYesYes
Hidden receiverYesYesYesYes
Compliance supportYesNoNoNo
Gas costLowN/AHighHigh

See Also

Last updated on