Docs · The draw · Verify
Reproduce a draw
Anyone can re-run a LOOTBOX draw from public data and check they get the same winner. This page explains how.
What you need
| Input | Where it comes from |
|---|---|
| Every snapshot for the drop | Published as JSON on the drop's proof page. Each file's SHA-256 is posted on Solana when it's taken. |
| The locked ticket list's fingerprint | A Solana transaction posted before randomness was requested |
| The randomness | The drop's ORAO VRF request account on Solana (64 bytes) |
Steps
- Check the snapshots. Hash each snapshot file (SHA-256 over its canonical JSON, keys sorted) and confirm it matches the fingerprint posted on Solana at that time.
- Rebuild the ticket list. For each wallet, average its balance across the snapshots, then divide by the per-ticket amount and round down. Remove excluded wallets. Sort by wallet address.
- Check the lock. Hash the ticket list and confirm it matches the fingerprint posted before the randomness request.
- Pick. Run the selection with the VRF's 64 bytes, as below.
- Compare. The ticket and wallet you get must match the published winner.
The selection, exactly
total = sum of all tickets
r = the 64 VRF bytes, read as a big-endian 512-bit number
limit = 2^512 - (2^512 mod total)
round = 0
while r >= limit:
round += 1
r = SHA-512(vrf_bytes || round as 2 bytes) # re-hash, try again
index = r mod total # 0-based
ticket = index + 1 # the number shown on the live page
winner = the wallet whose ticket range contains ticket
A worked example, computed by the real code
Three wallets hold 100, 300 and 600 tickets (1,000 in total), and the randomness is 64 bytes of 0x07. This page runs the actual selection function while it renders:
| Rounds needed | 1 |
| Winning index | 583 |
| Winning ticket | #584 |
| Winner | Wallet C |
Any implementation of the steps above must produce the same result.