Provably Fair System

Queue-based cryptographic pack opening with pool verification

Verify a Pack Opening

Enter a transaction signature or use the URL from your purchase to verify complete fairness details.

How It Works

RareCache uses a queue-based provably fair system with blockchain commitment. Every hash is recorded in the transaction memo before payment, making manipulation cryptographically impossible.

The Process

1

Join Queue

When you click "Buy Pack", you join a queue. The server generates three things:

  • Server Seed: A random 256-bit value (kept secret until after payment)
  • Server Seed Hash: SHA-256 hash of the server seed (shown to you immediately)
  • Weights Hash: SHA-256 hash of the current card pool snapshot with availability and weights

These hashes prove that the server committed to specific values before you paid.

2

Your Turn (30 Seconds)

When it's your turn, you see a countdown timer with both hashes displayed. You have 30 seconds to approve the payment transaction in your wallet. If you cancel or timeout, the next person is immediately promoted.

3

Blockchain Commitment

Your payment transaction includes a Solana memo with the format:

ticketId|serverSeedHash|weightsHash

This memo is permanently recorded on the Solana blockchain before your card is revealed. This proves:

  • The server seed was committed before the result
  • The card pool/weights were committed before the result
  • Neither party can manipulate the outcome
4

Combined Seed Generation

After payment confirms, the server combines:

  • Server Seed (now revealed)
  • Transaction Signature (your unpredictable client seed)

These are hashed together using SHA-256 to create the final seed, which is used to generate random numbers for:

  • Rarity selection (which tier: common, rare, legendary, etc.)
  • Card selection within that rarity (based on weights)
5

Card Selection with Weighted Probabilities

Cards are selected using a value-weighted system to maintain pack expected value (EV):

  • Higher-value cards have lower weights (less likely to be pulled)
  • Lower-value cards have higher weights (more likely to be pulled)
  • Weight formula: (pack_price / card_value) × availability

The weights hash proves these weights were set before your opening and weren't manipulated to give you a specific card.

6

Public Verification

You can verify your opening by:

  1. Check the Solana transaction memo contains your hashes
  2. Verify SHA-256(server seed) matches the committed hash
  3. Recalculate the final seed using server seed + transaction signature
  4. Verify the pulled card matches the RNG output

Why This Is Fair

🔒 Server Cannot Cheat

Both hashes are committed in the blockchain transaction memo before the card is revealed. The server cannot change these values without invalidating the transaction.

🎲 Player Cannot Cheat

Your transaction signature is generated by Solana's cryptographic system and cannot be predicted or manipulated to produce a desired outcome.

âš–ī¸ Pool Cannot Be Manipulated

The weights hash proves the exact card availability and probabilities at the time of your opening. We cannot remove good cards or adjust odds after you join the queue.

✅ Blockchain Verified

All commitments are recorded on Solana using the Memo Program. Anyone can view your transaction on Solscan to verify the hashes were included in the transaction.

Frequently Asked Questions

What is the weights hash and why does it matter?

The weights hash is a SHA-256 hash of the complete card pool snapshot at the time you joined the queue. It includes every card's ID, availability count, and calculated weight (probability). This proves:

  • We didn't remove valuable cards before your opening
  • We didn't adjust probabilities to favor cheaper cards
  • The pool you saw advertised is the pool you pulled from

Since this hash is in the transaction memo, it's impossible for us to manipulate after you paid.

What if the card pool changes between users in queue?

Each user gets their own pool snapshot when they join the queue. Small changes between users are expected (buybacks, other users pulling cards). However:

  • Pack availability thresholds are checked before payment
  • If the pack becomes invalid, you're notified before payment
  • Your weights hash proves the exact pool state you pulled from
Can you cherry-pick good server seeds?

No. The server seed is combined with your transaction signature, which we cannot predict. Even if we tried billions of server seeds, we have no way of knowing which one will combine with your signature to produce a good result.

How do I verify manually?

You can verify using any SHA-256 tool:

  1. Visit Solscan and view your transaction memo
  2. Confirm the memo contains: ticketId|serverSeedHash|weightsHash
  3. Hash the revealed server seed and verify it matches the hash in memo
  4. Concatenate server seed + transaction signature and hash to get final seed
  5. Use the final seed to verify the card selection was correct
What prevents manipulation of the queue?

The queue system is designed to be transparent and fair:

  • First-come, first-served ordering (no priority for specific wallets)
  • 30-second timeout per user (prevents griefing/blocking)
  • Instant promotion on cancel (no waiting for timeout)
  • Each user's hashes are generated independently
Is this system audited?

Our fairness system is open-source and can be independently audited. All transactions are publicly verifiable on the Solana blockchain. We encourage security researchers and the community to review our implementation.

Technical Implementation

  • Random Generation: Node.js crypto.randomBytes() (CSPRNG)
  • Hashing Algorithm: SHA-256
  • Blockchain: Solana with Memo Program
  • Memo Format: ticketId|serverSeedHash|weightsHash
  • Weight Formula: (pack_price / card_value) × availability
  • Queue System: One user at a time, 30-second timeout
  • Commitment: All hashes in transaction memo before reveal