Verifiable Random Function (VRF) System
Our gacha pack system uses Verifiable Random Function (VRF) technology to ensure completely fair and tamper-proof randomness for all pack openings.
How It Works
1. Deterministic Input Creation
When you open a pack, the system combines two pieces of data:
- Your unique pack memo (UUID assigned when you purchase)
- Your transaction signature (generated by your wallet when confirming the transaction)
2. VRF Proof Generation
This combined input is processed through our VRF algorithm (ECVRF-SECP256K1-SHA256) using our private key to generate:
- A cryptographic proof
- A random number (1 to 100,000,000) that determines your NFT
3. Immutable Storage
Both the proof and roll number are stored in our database, but also stored permanently on the blockchain.
Why This Is Trustworthy
- User-Controlled Randomness: Your wallet's transaction signature is unique and unpredictable - we cannot influence or predict it
- Deterministic: Given the same memo + transaction signature, the VRF will always produce the same result
- Tamper-Proof: Once your transaction is confirmed, the randomness cannot be changed or manipulated
- Cryptographically Secure: Uses industry-standard elliptic curve cryptography
Verification
Anyone can verify the fairness of any pack opening:
API Verification
Use our verification endpoint:
GET /api/vrf/verify?memo=YOUR_MEMO_HERE
This returns:
valid: Whether the VRF proof is cryptographically validrollMatches: Whether the stored roll matches the calculated rollproof: The VRF proof for this packpublicKey: Our VRF public keytransactionSignature: Your unique transaction signature
Manual Verification
- Take the memo + transaction signature
- Hash them together using SHA-256
- Use our public key to verify the VRF proof
- Calculate the roll from the proof hash
Technical Details
- Algorithm: ECVRF-SECP256K1-SHA256-TAI
- Input: SHA-256(memo + transaction_signature)
- Output: Deterministic 32-byte hash converted to roll (1-100,000,000)
- Public Key: Available in verification responses
Transparency
Every pack opening includes:
- Immutable transaction record on Solana blockchain
- VRF proof stored in our database
- Public verification endpoint for all users
- Open-source verification logic
This system ensures that neither we nor anyone else can manipulate your pack results after your transaction is confirmed.