6Uok9UsjztPC9VJ3a8ZpawzKmgrD2VvMKQGb64FYjhnx
Code for the program is open source and available here.
UTXO Model
Yona uses a Unspent Transaction Output model similar to Bitcoin/Zcash:Structure
Privacy Properties
- Hiding: Commitments reveal nothing about contents
- Binding: Cannot change UTXO after commitment
- Unlinkability: Cannot link commitments to nullifiers without private key
Transaction Logic
Every instruction consumes 2 input UTXOs and creates 2 output UTXOs:Public Inputs & Data Integrity
All transaction data is cryptographically bound to the zero-knowledge proof through 10 public inputs. This means no transaction data can be modified without invalidating the proof:Public Inputs to Proof Verification
External Data Hash
TheextDataHash itself is computed from additional transaction parameters:
Program Components
The Yona program serves as the core verification system that stores all private transaction data and validates zero-knowledge proofs. It maintains the complete state of the privacy pool, including all commitments and nullifiers, while ensuring that only valid proofs can modify this state.Merkle Tree State
- Height: 26 levels
- Capacity: 67 million commitments
- Structure: Sparse binary tree with Poseidon hashing
- Purpose: Stores cryptographic commitments of all UTXOs without revealing amounts or owners
Nullifier Registry
- Function: Prevents double-spending, stored on-chain in Solana network to prevent double-spending
- Mechanism: Each spent UTXO generates a unique nullifier that is permanently recorded
Proof Verification System
- Provider: Light Protocol’s Groth16 verifier
- Curve: BN254 elliptic curve
- Proof Size: 256 bytes (compressed)
Private UTXO Storage
Yona stores all private UTXOs in on-chain events with highly optimized compression. This approach allows efficient retrieval through the indexer while minimizing on-chain storage costs. The protocol achieves exceptional efficiency through multiple compression techniques:Commitments Compression
We store encrypted Commitments in on-chain events using highly optimized serialization:- Minimal Serialization: Data is compressed to the smallest possible size using custom binary packing
- Dual UTXO Optimization: Two UTXOs are packed into a single on-chain record, reducing storage costs by 50%
- Partial Mint Storage
Data Retrieval
Private UTXO data is stored in Solana events and can be efficiently retrieved through the Yona indexer. The indexer monitors on-chain events, decrypts relevant UTXOs for users, and provides fast access to transaction history without requiring full chain scanning.If needed, you can send transactions directly through the local frontend with any custom
encryptedOutput format that suits your requirements.