How the winner is picked
No server of ours decides anything. Here is how each draw works, and how to check it.
The Solana program enforces the odds and payouts, MagicBlock's VRF proves the randomness on-chain, and every round page rechecks the draw in your browser.
Your SOL buys entries
Every deposit buys entries in proportion to the SOL deposited: 1 lamport is 1 entry, so your chance is exactly your share of the pot.
Closing the round requests randomness
When the round closes, the program sends a request to MagicBlock's VRF (verifiable random function) program with a seed made of the round number, the total entries and the close slot. The VRF program mixes in the latest Solana slot hash and the time, so the final input isn't known to anyone until that slot. Deposits are already closed by then.
The oracle proves its answer on-chain
MagicBlock's oracle computes the VRF output from that input with its secret key and attaches a proof. Before anything reaches our program, the VRF program checks the proof against the oracle's public key (a Schnorr-style proof over the ristretto255 group). A VRF has exactly one valid output per key and input, so the oracle can't pick a different number.
The winner is picked on-chain
The VRF program then calls our program, signing as an identity only it can use, with
SHA-256(VRF output). Our program picks entryrandom_value % total_entries(random value = the first 8 bytes, little-endian) and the deposit holding that entry wins.Only the winner can be paid
The prize (the pot minus a fee set on-chain) can only be paid to the recorded winner. If the randomness doesn't arrive before the reveal timeout, the round is cancelled and every depositor can withdraw their full deposit.
The wheel just shows it
The wheel animation is cosmetic: it lands on the winning entry computed from the same on-chain value, so every browser shows the same result. The on-chain record is authoritative.
Check any round yourself
Open a round from the History page. Its fairness check fetches the round's transactions straight from Solana, not from our server, and confirms that:
- The close transaction sent a VRF request for this round, signed by our program, with settle_round as the callback.
- The request's seed is exactly round number · total entries · close slot · "jackpot".
- The settle transaction came through MagicBlock's VRF program, which called our program as its identity for us.
- The proof came from MagicBlock's oracle, in a later slot than the request.
- The VRF proof itself verifies, using the same maths as the VRF program.
- The randomness our program received is SHA-256 of the proven output.
- The winning entry and the winner follow from that randomness and the deposit list.
If any check fails, the round page shows “Mismatch” and which step went wrong.
Good to know
- One input can't be recomputed from your browser. The VRF input includes a Solana slot hash that public RPC servers don't provide. The VRF program checks it on-chain; your browser checks everything else.
- Our program. Its source is MIT-licensed. The source repository and its verified build let you check that the deployed code matches.
Addresses
Each round's RoundSettled event records the full 32-byte randomness, the winning entry and the winner.