Provably Fair Giveaways: How to Run a Draw Anyone Can Verify

Run provably fair giveaways in three moves: hash the entrant list, commit to a future drand round, and pick the winner with a formula anyone can rerun.

Updated November 2, 2026

Contents
  1. What do you publish, and when?
  2. Which random value should you commit to?
  3. How does the formula pick a winner?
  4. The worked draw, value by value
  5. Can you keep entrant names private?
  6. Where should the commitment be posted?
  7. What happens if someone edits the list?
  8. What should a checker look at first?
33,987,412
The drand quicknet round used for the example draw
3 seconds
Between two drand quicknet rounds
1,200
Quicknet rounds in one hour

Twelve example entrants, one prize, and the formula picks lumen.ash. You can recompute that yourself in about a minute without trusting us, because the list, the random value and the formula are all on this page. In a real draw they would also be published before anyone could know the result. That is what a provably fair giveaway is: a draw where every step is published, in the right order, so anyone can rerun it and land on the same name.

The method needs no special platform. You need a list, SHA-256, a public random value from a beacon, and a formula you announce in advance. The rest of this page walks through one complete draw with real values.

What do you publish, and when?

Order matters more than any single step. If you publish something after the random value is known, you could have tried variations until one gave the winner you wanted. So the sequence runs like this:

  1. Close entries and freeze the list. Decide the exact text format: one entry per line, a fixed order, UTF-8, no trailing newline.
  2. Publish the list and its SHA-256 hash.
  3. In the same post, name the random source precisely: the beacon, the chain and the round number, plus a fallback if that round is missing.
  4. Publish the formula that turns the list hash and the random value into a winner index.
  5. Wait for the round, then compute and announce the result with every input attached.

Steps 2 to 4 together form the commitment. The underlying idea, fixing a value by publishing its fingerprint first, is the same one provably fair games use, explained under commit-reveal schemes.

Which random value should you commit to?

One that does not exist yet and that you cannot influence. A public randomness beacon fits. We used drand's quicknet chain, which publishes a new round every 3 seconds from a network of independent operators, each round signed with a threshold BLS signature. The random value is the SHA-256 hash of that signature, so anyone can check it.

Quicknet started at Unix time 1,692,803,367, and round r is published at that time plus 3 × (r − 1) seconds. That lets you pick a round for a specific moment. For this example we chose round 33,987,412, which falls at 18:00:00 UTC on November 15, 2026. A real draw would publish that round number before that moment; ours is reconstructed after the fact for illustration, so treat it as a demonstration of the arithmetic, not as a committed draw.

The overview of provably fair draws compares drand with the NIST Randomness Beacon, which works on the same principle with one pulse about every minute.

How does the formula pick a winner?

Our formula hashes three things together, the list hash, the beacon value and a winner counter k, then reads the result as one large number and takes the remainder after dividing by the number of entrants. The remainder is a position in the list, counting from 0.

list hash  = SHA-256(entries joined by "\n")
h          = SHA-256(list hash + ":" + beacon randomness + ":" + k)
winner     = entries[ h as a 256-bit integer mod N ]     (k = 1 for the first winner)

Including the list hash in the formula ties the result to the exact list. Including k lets you draw a second or third winner from the same round without reusing the same number.

The remainder step is where small random ranges cause bias, as dice and roulette designers know. Here it is harmless: h is a 256-bit number, so the difference between the most and least likely entrant is at most one value in about 2256 ÷ N, which for any realistic giveaway is far beyond anything measurable.

The worked draw, value by value

The twelve entrants, in the published order:

Index Entrant Index Entrant
0 amber.fox 6 gus_the_cat
1 bluejay_42 7 harbor.lights
2 cedar-lane 8 ivy_marsh
3 delta.rose 9 juniper.k
4 echo_park 10 kite_runner9
5 fern.and.co 11 lumen.ash

Joined with newlines and hashed, the list gives:

list hash = b8bf4838051d14afff1553836074ce858cefcc1a020eb5b1467d005af7a30d8b

drand quicknet round 33,987,412 has this randomness value, returned identically by two separate public relays when we fetched it:

randomness = e4ae0b153d6c867b5df42652b236606b08f545762529f21b041d480c9c351db6

Plugging both into the formula with k = 1:

h (k = 1) = 4b4aff44d12ef87edaaf7aad96b1eff3a7187c590f1a4062df270569f997f3ff
h mod 12  = 11  →  lumen.ash

h (k = 2) = 7d637065f4576c9d273a599df12ebe5572d850df3a67c0d190e9de10b3900589
h mod 12  = 1   →  bluejay_42 (runner-up)

Here is the whole computation in Node.js, using only the built-in crypto module. Save it as a file ending in .mjs and run it with node to get the same lines:

import { createHash } from 'node:crypto';
const sha256 = (s) => createHash('sha256').update(s, 'utf8').digest('hex');

const entrants = ['amber.fox', 'bluejay_42', 'cedar-lane', 'delta.rose', 'echo_park', 'fern.and.co',
  'gus_the_cat', 'harbor.lights', 'ivy_marsh', 'juniper.k', 'kite_runner9', 'lumen.ash'];
const listHash = sha256(entrants.join('\n'));
const randomness = 'e4ae0b153d6c867b5df42652b236606b08f545762529f21b041d480c9c351db6'; // drand quicknet round 33987412

for (const k of [1, 2]) {
  const h = sha256(`${listHash}:${randomness}:${k}`);
  const index = Number(BigInt('0x' + h) % BigInt(entrants.length));
  console.log(k, h, index, entrants[index]);
}

Can you keep entrant names private?

Sometimes you should. A list of email addresses has no business on a public post, and even usernames can be sensitive. The commitment still works if each line of the list is a fingerprint instead of a name.

One way is to give every entrant a ticket number and a random salt when they enter, and put SHA-256(salt + ":" + handle) on each line instead of the handle. Each entrant can recompute their own line and confirm it is in the published list, while nobody else can read who is on it. The draw formula runs on the list of fingerprints exactly as before, and the winning line points to one ticket. The winner proves it is theirs by revealing their salt.

The trade-off is that outsiders can no longer count duplicate entries by eye. If the eligibility rules matter, say one entry per person, someone trusted still has to check the plain list, and you should say who.

Where should the commitment be posted?

Somewhere with a timestamp you do not control. A post on a public social account, a commit to a public code repository, or an email to all entrants each leave a time record that is hard to backdate. Editing the post afterward should be visible, so a platform that shows edit history is better than one that does not. Post the round number with plenty of margin: at quicknet's 3-second pace, a round chosen an hour ahead is still 1,200 rounds away.

What happens if someone edits the list?

The winner changes, and nobody can predict to whom. Remove gus_the_cat and rerun the same formula with the same beacon value: the list hash becomes 9789e9e1…f253, the remainder of h divided by 11 is 7, and the winner is ivy_marsh. An organizer who wanted a particular winner would have to guess, before the beacon round, which edit would produce them, and the beacon value is exactly the thing they cannot know.

Formatting counts just as much as content. Adding a single trailing newline to the same twelve names produces the hash 8568b5f2…77d7 instead of b8bf4838…0d8b. That is why step 1 above fixes the text format, and why the published list should be the exact bytes that were hashed. How SHA-256 hashing works shows why one byte changes the whole fingerprint.

What should a checker look at first?

Anyone verifying the draw needs four things: the published list, its hash, the beacon round and the formula. Hash the list and compare. Fetch the round from a beacon relay and compare its randomness value with the one in the announcement; for drand you can also check the signature against the chain's public key. Then run the formula.

The step people skip is the timestamps. A perfect calculation proves nothing if the list and the round number were posted after the round appeared, so look at when the commitment went up, preferably on a platform that shows edit history. A draw can also be technically clean and still unfair upstream, through duplicate accounts or a list that quietly left people out; the limits of provably fair apply here too.

FAQ

01

Why publish a hash of the entrant list instead of the list itself?

You can publish both, and usually should. The hash is a short fingerprint that fixes the exact list, including order and spelling, so nobody can add or drop an entry after the random value appears without the hash changing.
02

What if I need to keep entrant names private?

Publish the hash before the draw and give each entrant a way to confirm their own line is in the list, for example a numbered ticket or a salted hash of their handle. After the draw, share the full list with anyone who has a stake in the result, or publish it with personal details removed.
03

Why use a future beacon round instead of my own random number?

A number you generate yourself can be regenerated until you like it, and nobody can tell. A beacon round that did not exist when you published the list is a value you could not have chosen or predicted.
04

Does the modulo step make some entrants more likely to win?

In principle, by an amount nobody could ever measure. The hash is a 256-bit number, and splitting a range that large into even 1,000,000 groups leaves a difference of at most one value in roughly 10 to the power of 71.
05

How do I pick more than one winner?

Repeat the formula with k = 2, 3 and so on, and skip any index that has already won. Publish that rule with the formula, before the draw, so nobody can argue about it later.
06

What happens if the beacon round is late or missing?

State a fallback in advance, such as the next available round on the same chain. Deciding the fallback after a delay would give you a choice, which is exactly what the commitment is meant to remove.
07

Do I need special software to verify a draw?

No. The example on this page runs in Node.js with only its built-in crypto module, and any language with SHA-256 and big integers can reproduce it.
08

Can I use the NIST beacon instead of drand?

Yes, as long as you name the exact pulse in advance and say which field of the pulse you use. See our fair draws overview for how the two beacons differ.
09

Is a verifiable giveaway legally compliant?

Verifiability and legality are separate questions. Rules for sweepstakes, raffles and giveaways differ by country and US state, so check local law and the platform's promotion rules before you run one.