THE RAFFLE FAIRNESS · DRAW #965

Prove. Commit. Verify.

The operator cannot bias which holder wins. The roll is an RFC 9381 ECVRF output keyed by our on-chain frozen key, its input bound to the resolved slot hash so it cannot be precomputed, and the winner is the holder whose weighted slice of the snapshot covers the roll. Recompute AND verify everything — the binding, the ECVRF proof, the roll — right here in your browser.

Drawn  Pot 1 cards · $18Holders 2,003Outcome WONRaw draw id 2223
FOUR STEPS · ONE VIEWPORT
Freeze > Snapshot > Prove > Roll
  1. Freeze
    We froze our VRF key on-chain before any draw
    Our ECVRF public key is registered + FROZEN on-chain (Collector Crypt VRF program) under a fixed owner + label. Once frozen it cannot be swapped — every proof verifies against this one key.
    vrf_authority: frozen(pk, owner, label)
  2. Snapshot
    Every holder balance is recorded at the close slot
    When the window closes we record a Merkle root of every eligible $GACHA balance at that exact Solana slot. Nobody touches your balance — we just take a tamper-evident snapshot the weighted pick runs over.
    snapshotMerkleRoot = MerkleRoot(holders[closeSlot])
  3. Prove
    alpha binds the slot, we publish the ECVRF proof
    The proof input alpha = sha256(slotHash ‖ drawId) binds the FUTURE slot blockhash — nobody (including us) can precompute it. We produce the ECVRF proof and commit sha256(proof) on-chain.
    alpha = sha256(slotHash ‖ drawId)
  4. Roll
    beta[0:32] picks the winner
    The roll is the first 32 bytes of the VRF output (beta). We walk the prefix-sum of weights — first holder whose slice covers the offset wins the whole pot. verifyVRF confirms the proof; the roll is forced by it.
    roll = beta[0:32] (beta = ECVRF output)
SECTION 02

Recompute the roll. Right here. In your browser.

The widget recomputes the VRF input alpha = sha256(slotHash ‖ drawId), verifies the ECVRF proof itself (verifyVRF, RFC 9381) against the operator key, and confirms the published roll IS beta[0:32] — the entire chain, in your browser. Collector Crypt is an independent cross-check that the operator key is the one frozen on-chain.

RECOMPUTED IN BROWSER
ECVRF (RFC 9381) · Collector Crypt VRF
✓ VERIFIED
DRAW #2223
AUTO-RUN · NO FETCH
VRF authority
13R5zhNirknRrskNyEmyZuC5NNEQWcSwN5w8BUn6qnp8
Slot
440580473
Slot hash
40f5bd4ee403092ca370b938e2231a1e06f9db88e63164d56c7ecea3f90e3aa0
alpha (published)
e5b0f2d55a3c1b37a835c37fbbca884eebfe746b37b545f8f58fde57d4df686d
alpha (recomputed)
e5b0f2d55a3c1b37a835c37fbbca884eebfe746b37b545f8f58fde57d4df686d
Alpha binds slot
alpha === sha256(slotHash ‖ drawId)
Operator VRF key
e75d1717431b1c691084425d0a0d96f094c7e72fb9d35a49b7052326d8f48f0e
ECVRF proof valid
verifyVRF(operatorKey, alpha, proof) === true (in-browser)
beta (VRF output)
fc1d0b1a04b9e8304b8b4a8b709d67685540594210a5ec82d072eaff56a578dcdebc63e4d74428543c1dbd197fcf6bb9984c29626ac7ffdbca1b555b7b580eb7
Published roll
0xfc1d0b1a04b9e8304b8b4a8b709d67685540594210a5ec82d072eaff56a578dc
Roll is beta[0:32]
rollHex === beta[0:32]
Snapshot root
68170fce23443d3c7ab5293f91fab2b84ff5cacb323eeea033b522d43ba8976e
Holders
2,003
Eligible total
908,176,237 GACHA
Winner balance
37,141,141 GACHA
Winner odds
balance / eligible = 4.0896% (matches published)
On-chain commit
13fSiYi4hjcgbNGJ1jokutuXx2fuC8zNk9jgqjXsfJmA
Owner (verify input)
HuTNYccZn2U3sNpJnVTgyi9XZFRo9GjbJHBjc1F2tWYL
Label (verify input)
raffle
Memo (verify input)
pg-raffle-2223
Proof (verify input)
7885ed4770bf7fdf9e33d8d448e0ae77f6b9b58fb45f43032240856ff5753b6a0155c157c2db9a219c37a7dd54a65db86446182e7d222e4cda18317bf17b13824e14c1e075f2114f61bd2f927f68a008

Verified in your browser: alpha binds the public slot, the ECVRF proof checks out under the published operator key, and the roll IS beta[0:32]. The winner is then the balance-weighted pickWinner(snapshot, roll) walk — the snapshot itself is committed by the Merkle root above (not downloaded here), so the winner + odds rows are informational.

The pot1 card · $18 — winner takes all

1 card worth $18 opened this window — tiger.sol held 4.09% of the eligible snapshot and won the pot.

The winnerSolscan
tiger.sol
tiger.sol
Never claimed — cards bought back, USDC rolled into the next draw.Sweep UaqD…jNoe
Win chance
4.09%
About 1-in-N
24
Winner balance
37,141,141 GACHA
Eligible pool
908,176,237 GACHA
REFERENCE IMPLEMENTATION

Copy-paste. Run it locally. Same answer.

raffle-vrf-roll.tsTypeScript
import { verifyVRF, vrfProofToHash } from '@collectorcrypt/vrf-client';
import { sha256 } from '@noble/hashes/sha2';

// alpha binds the resolved slot hash + draw id (32B slot hash || utf8 id)
const alpha = sha256(concat(slotHashBytes, utf8(String(drawId))));

// 1. the ECVRF proof must verify under our FROZEN operator key
const ok = verifyVRF(operatorPubkey, alpha, proof); // RFC 9381 -> true

// 2. the published roll must be the first 32 bytes of the VRF output
const roll = vrfProofToHash(proof).slice(0, 32); // === published rollHex

// 3. the winner: map roll into [0,1), walk the snapshot's weight
//    prefix-sum — the first holder whose slice covers it wins.

Node ≥ 20 · no dependencies · same output as the browser widget.

Raw draw id 2223 — what the proof and this URL key on.Missing rows land once the draw reveals. Very early draws predate parts of this record — what exists is shown, nothing is backfilled.This draw in historyHow the mechanism works