Fair Draws

Fair Draws: Verifiable Randomness for Raffles, Giveaways and Lotteries

Commit-reveal and public beacons such as drand and the NIST beacon make a verifiable random draw possible, so raffle and giveaway winners can be checked.

Someone posts a screen recording of a wheel spinning through 400 usernames, the wheel stops, and the winner is announced. Nobody watching can tell whether the list was complete, whether the spin was the first try, or whether the tool was rigged. A verifiable random draw fixes that by replacing the recording with three published things: the list, a random value nobody controlled, and a formula that turns one into a winner.

The tools for this are the same ones provably fair games use, plus one more. Games rely on a seed the operator commits to in advance. A draw can go a step further and use a public random value from a source the organizer does not run at all.

If you have checked a round in a provably fair game before, the logic here will feel familiar. The difference is who supplies the unpredictable part. In a game, the operator's server seed plays that role and your client seed keeps the operator honest. In a draw with hundreds of entrants, nobody can supply a client seed for everyone, so the unpredictable part has to come from somewhere all of them can see and none of them, the organizer included, can steer. That is the job a public beacon does, and it is why this section of the site leans on beacons more than on seeds.

What goes wrong with an ordinary draw?

The problem is rarely the randomness itself. Random number generators in ordinary software are fine for picking a name. The weak point is that only the organizer sees the process. They can draw again if they dislike the result, add a late entry, or quietly drop one, and a screenshot of the final spin shows none of that.

A traditional lottery handles this with procedure: witnesses, inspected equipment, audits. Those work, but they ask you to trust the people in the room. A verifiable draw asks you to trust arithmetic instead, which means anyone with the published inputs can rerun the draw at home and get the same winner.

Loot boxes in games sit in a similar spot. Apple's App Store Review Guidelines require apps that sell randomized virtual items to disclose the odds of each item type before purchase. That is useful information, but a disclosure is a promise about the long run. It does not let you check that the box you just opened followed it. A commitment published before the opening would.

How does commit-reveal work for a draw?

The idea is the one described in how commit-reveal works: publish a fingerprint of something now, reveal the thing itself later, and let anyone confirm the two match. For a draw, the organizer publishes three things before the random value exists: the frozen entrant list with its SHA-256 hash, the exact source of randomness (which beacon, which round number or timestamp), and the formula that maps the random value and the list to a winner.

When the named round is published, anyone can compute the result. The organizer cannot redraw, because the round is already fixed, and cannot edit the list, because its hash is already public. A SHA-256 fingerprint is 64 hex characters, and changing a single character of the list changes it completely; the explainer on how SHA-256 hashing works shows why.

The order is everything. If the list or the formula is published after the random value appears, the organizer could try variations until one produces the winner they want.

What are public randomness beacons?

A randomness beacon publishes a new random value at regular intervals, numbers each one, and signs it, so a value can be looked up and checked long after it appeared. Two are widely used.

The NIST Randomness Beacon is run by the US National Institute of Standards and Technology. Each pulse carries a fresh 512-bit random value, pulses come out periodically (NIST gives once a minute as the example), and every pulse is indexed, time-stamped and signed. The current format is version 2.0, adopted in 2018. NIST is explicit about one limit: beacon values must not be used as cryptographic secret keys, because they are public by design.

drand is a distributed beacon. Instead of one organization, a group of independent nodes, organized as the League of Entropy since its announcement in June 2019, jointly produce each value with threshold BLS signatures. Each node holds a key share, and once enough partial signatures are published, anyone can assemble the full signature for that round. The random value is a hash of that signature. Because BLS signatures are deterministic, no single node can bias the output, and none of them can know it before enough of them sign.

drand runs more than one chain. Its default chain produces a round every 30 seconds, and each round's message includes the previous signature. The quicknet chain produces a round every 3 seconds and is unchained, so each round can be verified on its own without the one before it. When we pulled quicknet round 33,987,412 from two separate public relays, both returned the same signature and randomness, and the randomness equaled the SHA-256 of the signature bytes. On both chains a round number corresponds to a fixed time (the chain's genesis time plus the period for each round that came before), which lets an organizer announce a draw for a specific future moment.

Where do verifiable random functions fit?

A verifiable random function, or VRF, solves a slightly different problem. The holder of a secret key computes a random-looking output for any input, along with a proof. Anyone with the matching public key can check that the output is correct, but nobody else could have computed it. RFC 9381, published in August 2023, describes it as the public-key version of a keyed cryptographic hash.

VRFs suit systems where one party must produce randomness on demand and prove it did not shop around, such as selecting a block producer in a blockchain. For a one-off giveaway they are usually more machinery than you need; a public beacon plus a committed list does the same job with nothing to install.

What can a verifiable draw not prove?

It proves the winner follows from the committed inputs. It does not prove the entrant list was fair to begin with, that duplicate accounts were removed, or that the prize was delivered. Those are trust questions, the draw equivalent of the gaps we list under what provably fair does not prove. A good organizer publishes the eligibility rules alongside the list hash, so people can at least argue about the rules before the draw instead of after.

For a full worked example with a real beacon round, a 12-name list and a formula you can run yourself, see how to run a giveaway anyone can verify. The same steps scale from a 12-person office raffle to a draw with thousands of entries.

FAQ

01

What makes a random draw verifiable?

Anyone can recompute the winner from public inputs and get the same answer. That needs a fixed list of entries, a random value nobody could know or steer in advance, and a published formula that maps the value to a winner.
02

What is a public randomness beacon?

A service that publishes fresh random values at fixed intervals, each one signed and numbered so anyone can check it later. The NIST Randomness Beacon and drand are two working examples.
03

Can the organizer of a draw still cheat with a beacon?

Only by changing something after the beacon value is known, which is why the entrant list and the beacon round must be published before that round is produced. Once both are fixed, the winner is decided by a value the organizer did not choose.
04

Is drand free to use?

Its public HTTP endpoints can be queried without an account, and its documentation describes how to verify each round against the network's public key. Check the current terms on the drand website before building anything that depends on it.
05

Should I use a beacon value as a password or secret key?

No. Beacon values are public by design, and NIST says plainly that its beacon values must not be used as secret keys. They are for draws and audits where everyone is meant to see the number.
06

What is a verifiable random function?

A VRF is a keyed hash with a public key: only the key holder can compute the output, but anyone can check it with the public key and a proof. RFC 9381 from August 2023 describes several constructions.
07

Do loot box odds disclosures prove the drops are fair?

No. A disclosure tells you the advertised odds, but it does not let you check any single opening. A commit-reveal scheme would let you confirm that a given item came from a value fixed before you opened the box.
08

How is a fair draw different from a provably fair casino game?

The mechanics are the same, a commitment followed by a reveal, but the trusted value often comes from a public beacon instead of the operator's own server seed. See commit-reveal for the shared idea.