Skip to content

Provably Fair Giveaway: Run One on Stream

By YesNoWheelApp · Reviewed by the founder ·

Cover for Provably Fair Giveaway: a padlock above the start and end of the worked example's SHA-256 commitment, be59d916 and afa7

This guide shows how to run a provably fair giveaway: a fair giveaway on stream whose winners any viewer can recompute, step by step with a worked example. Use it when a prize matters enough that someone might question the result.

The wheel stops on a name and someone in chat types "rigged". Usually it's a joke. When the winner is a regular, a mod's friend or last month's winner, it can turn into a thread.

A wheel spinning on screen can't settle that argument. Viewers can't tell whether you spun five times off-camera, whether the list on screen is the list you drew from, or whether you changed a ticket count just before going live. A provably fair draw gives them something to check afterwards, on their own device, without taking your word for it.

The Idea in One Paragraph: a Sealed Envelope

Before the draw, you lock in two things: the entry list and a long secret number (the seed). You don't show the seed. You show a fingerprint of the seed and the list together: a SHA-256 hash, 64 characters of hex. That fingerprint is the sealed envelope. You can't open it and swap the contents later, because any change to the seed or the list, even one ticket, gives a completely different fingerprint.

Then chat supplies a word. Because the word arrives after the envelope is sealed, you couldn't have picked a seed that steers the result toward a particular person: you didn't know what the word would be. And chat can't steer it either, because nobody in chat knows the seed.

The winner is computed from seed + word. Afterwards you publish everything (list, seed, word, winners) as a proof link, and anyone can redo the math and confirm the fingerprint matches the one you showed before the draw. This is the commit–reveal pattern, a long-established technique in cryptography. Here it runs entirely in the browser, with no server or account involved.

Provably fair giveaway, step by step1. Commit: Lock the list, post the hash 2. Viewers’ word: Chat supplies it by your rule 3. Draw: seed + word + n picks each winner 4. Proof: Seed revealed, link shared 5. Verify: Anyone recomputes and checks the hash1. CommitLock the list,post the hash2. Viewers’ wordChat supplies itby your rule3. Drawseed + word + npicks each winner4. ProofSeed revealed,link shared5. VerifyAnyone recomputesand checks the hash
The commit–reveal order of a provably fair giveaway. The hash is posted before chat picks the word, so neither the host nor chat can steer the winner alone.

A Worked Example: 8 Entrants, 3 Prizes

Say viewers earned entries by a rule you announced in advance: one per stream attended, per hour watched, or per free entry. Eight people hold 20 tickets between them:

EntrantTicketsShare of the draw
Maya15%
Theo420%
Priya210%
Jonah15%
Sam630%
Lena315%
Carlos210%
Kai15%

Ticket counts become weights directly: Sam's 6 tickets out of 20 is a 30% chance at the first prize. Enter them in Weights mode on the percentage spinner, one row per person with their ticket count as the weight (the weighted name wheel guide covers pasting a long list).

Step 1: Lock the List and Post the Commitment

Finalize the list first: names, ticket counts and order. The order matters because the draw lays the entries out end to end in that order (Maya's ticket is position 0–1, Theo's four are 1–5, and so on). Read the list out or keep it on screen so it's in the VOD.

Then open the More tab and choose Provable draw. The panel shows the entries with their weights; press Lock the list. The tool creates a seed with crypto.getRandomValues (32 random bytes, 64 hex characters), keeps it hidden, and shows the Commitment (SHA-256). Copy commitment puts it on your clipboard for chat. For this example we used a fixed demo seed so you can reproduce every number below:

seed (secret until the draw):
d3ef35ea3f6f2ff18011313f387563af51aadef3004f43a2dee8269a8637987c

commitment (shown on stream before the draw):
be59d91633afe0bde73a1d158dd8123ad5c77229c9abab16f8962037c995afa7

The commitment is the SHA-256 of one line of text: the version tag yesnowheel-draw-v1, the seed and the entry list, joined with |:

yesnowheel-draw-v1|d3ef35…987c|[["Maya",1],["Theo",4],["Priya",2],["Jonah",1],["Sam",6],["Lena",3],["Carlos",2],["Kai",1]]

Leave the commitment on screen for a while and tell chat to clip or screenshot it. That recording is what makes the proof worth anything later: a viewer checks the proof against the hash they saw before the draw, not against whatever you post afterwards.

To show how sensitive it is: adding a ninth entry called "Host" with one ticket changes the commitment to 53e93574…7c25. Changing Theo from 4 tickets to 5 changes it to 7bc9568a…2e17. There's no way to make a small edit that keeps the old fingerprint.

Step 2: Get the Word From Chat, by a Rule You Announced

Announce the rule before you post the commitment, for example: "the word is the first chat message after I type GO", or "Kai, Lena and Jonah each send one word, and we join them in that order". Then follow it exactly.

This rule is the one place a host could still cheat. You know the seed, so if you're allowed to choose among several chat messages, you could quietly compute which one makes your friend win and pick that one. The fix is to take the choice away from yourself: a fixed rule, applied on camera. Combining words from several viewers also means no single viewer controls it, in case someone in chat has been told the seed.

The tool ignores spaces at the start and end of the word but not capitalization. In our example, pineapple and pineapple give the same winners, but Pineapple gives completely different ones (Carlos, Lena, Priya). Type the word exactly as it appeared and say it aloud.

We'll use the word pineapple. Type it into Viewers' word, set Number of winners to 3, tick Remove each winner before the next draw, and press Draw. In Weights mode that box starts unticked (it starts ticked only when After each spin is set to Remove winner), so check it: left unticked, the same word gives Sam, Priya, Theo instead, because winners stay in the draw.

Provable draw dialog with the eight entries locked, the commitment be59d916 through afa7 shown, the viewers word pineapple, 3 winners and Remove each winner before the next draw ticked
The worked example ready to draw: list locked, commitment shown, word entered, 3 winners and Remove each winner ticked.

Step 3: The Draw

For each prize n (counting from 0), the tool hashes yesnowheel-draw-v1|seed|word|n and turns the first 13 hex digits of the result (52 bits) into a number between 0 and 1. Multiply that number by the total tickets still in the draw and see whose range it lands in. The wheel in the panel spins to that same slice for each prize, and the winners appear in order under Winners: the proof and the wheel use one function to pick the winner, and the project's tests check that they agree.

Prize 1 (20 tickets in play):

  • SHA-256 of …|pineapple|0 starts with 6ec0094a1092e
  • 0x6ec0094a1092e ÷ 2^52 = 0.43262
  • 0.43262 × 20 = 8.65, which falls in Sam's range (8 to 14)
  • Winner: Sam

With Remove each winner ticked, each winner leaves the draw with all their tickets, so nobody wins twice. Sam's 6 tickets come off, leaving 14.

Prize 2 (14 tickets in play):

  • Hash of …|pineapple|1 starts with 4816e572aee9f, which works out to 0.28160
  • 0.28160 × 14 = 3.94, inside Theo's range (1 to 5)
  • Winner: Theo

Prize 3 (10 tickets in play, Theo's 4 removed):

  • Hash of …|pineapple|2 starts with 1a92720af11ff, which works out to 0.10380
  • 0.10380 × 10 = 1.04, just inside Priya's range (1 to 3)
  • Winner: Priya

Notice how close prize 3 was: 1.04 is a hair past Maya's single ticket (0 to 1). That's exactly the kind of result that gets called rigged, and exactly why it helps to have every step on record.

Provable draw results listing the winners Sam, Theo and Priya, the revealed secret seed, and the Copy proof link, Open verify page and New draw buttons
After the draw: the winners in order and the revealed seed.

Different words lead to different results. With the same seed and list, banana gives Theo, Lena, Sam and gg gives Sam, Jonah, Theo. You can't predict which word does what without the seed, which is the point.

Step 4: Publish the Proof Link

Once the last winner is in, the panel reveals the secret seed and builds a proof: the entry list, seed, word, number of winners, whether winners were removed, the winners in order and the time of the draw. Copy proof link copies a link to the verify page with all of that packed into the part after the #, and Open verify page opens it in a new tab so you can check it yourself first. Browsers never send that part of a URL to a server, so the proof lives in the link itself; this site stores nothing. For our example the link is about 620 characters long, which fits in a Discord message or a stream panel.

Pin the link in chat or Discord next to the clip of the commitment.

Step 5: How a Viewer Checks It

The easy way: open the proof link. It goes to the verify page, which reruns every draw from seed + word and compares the result with the winners listed. To also confirm the list and seed weren't swapped, the viewer pastes the commitment they recorded before the draw into Commitment shown before the draw (optional) and presses Check proof. A pass shows ✓ Verified. A wrong commitment shows ✗ Not verified with "The seed and entry list do not match the commitment shown before the draw." If someone edited the winners or the word in the link, it says "Recomputing the draw gives different winners than the ones listed." The page also lists each draw's first 13 hex digits, value and winner, and the steps to recompute it by hand.

Verify page showing Verified for the worked example, with the viewers word, secret seed, entry table and each draw recomputed for Sam, Theo and Priya
The verify page for the worked example's proof link, checked against the commitment shown before the draw.

The no-trust way, for viewers who'd rather not rely on this site's code at all: any SHA-256 tool works. On macOS or Linux:

S=d3ef35ea3f6f2ff18011313f387563af51aadef3004f43a2dee8269a8637987c

# 1. The commitment: should print be59d916…afa7
printf '%s' "yesnowheel-draw-v1|$S|"'[["Maya",1],["Theo",4],["Priya",2],["Jonah",1],["Sam",6],["Lena",3],["Carlos",2],["Kai",1]]' | shasum -a 256

# 2. Prize 1: should start with 6ec0094a1092e
printf '%s' "yesnowheel-draw-v1|$S|pineapple|0" | shasum -a 256

Then divide the first 13 hex digits by 2^52 and walk the ticket ranges by hand, as above. The list has to be written exactly as shown: JSON arrays of ["name",tickets], no spaces, in draw order.

What a Provably Fair Giveaway Proves, and What It Doesn't

It proves that:

  • the seed and the entry list (names, ticket counts, order) didn't change between the moment you showed the commitment and the draw;
  • you couldn't have aimed the result at anyone, provided the word came from chat by a rule you didn't control;
  • the winners listed are the ones the math produces, in that order.

It does not prove that:

  • the entries were collected fairly. If someone was left off the list, or a friend's alt account was added before you posted the commitment, the proof checks out just the same. Post the full list with ticket counts before you commit, so people can object in time.
  • ticket counts match what people actually earned or paid. That's bookkeeping, and only your own records cover it.
  • viewers kept the commitment. A proof checked only against a hash you post afterwards proves nothing: you could have drawn with a fresh seed and posted a matching hash later. The commitment has to be on record (VOD, clip, screenshot, a pinned message with a timestamp) before the word is chosen.

Before You Run a Giveaway: Platform and Local Rules

Twitch, YouTube and Discord each have their own rules for giveaways and promotions, and they change from time to time, so read the current version for the platform you're using. Separately, a drawing where people pay for a chance at a prize (bought tickets, paid entries) can count as a raffle or lottery under state or national law, and many places regulate those or require a license. Entries limited to paid subscribers or donors can count as paying, so offer a free way to enter. Free-entry giveaways usually face fewer restrictions, but not none. This article explains the mechanics of a verifiable draw; it isn't legal advice, and a provably fair draw doesn't make an otherwise restricted giveaway allowed.

Running It Without the Provable Draw

If you just need a quick draw and nobody's going to dispute it, Raffle mode on the percentage spinner works as a plain random winner picker without any of the steps above: add each name once per ticket and press Draw a Winner. One difference to know: Raffle mode starts with After each spin set to Remove winner, which takes off one ticket per draw, so someone holding several tickets can win more than one prize. Choose Remove all copies to take a winner off completely, as the proof draw above does. Pick the rule that matches what you announced. For how the wheel's ordinary randomness works, see How It Works.

Provable Draws: Quick Answers

Can I reuse the same seed for next week's giveaway?

No. Once you've published a proof, the seed is public, and anyone who knows it can work out which chat word would make a given person win. Press New draw and lock the list again: every draw needs a new seed and a new commitment.

What if I made a mistake in the list after posting the commitment?

Say so on stream, press New draw, fix the list and post the new commitment before taking the word. Don't draw with the old one: the proof would show the list you didn't mean to use. Redoing the commitment in public is fine. Redoing it after the word is known isn't.

How many prizes can one proof draw cover?

With Remove each winner before the next draw ticked, up to one fewer than the number of entries (8 entrants, up to 7 prizes), because the last remaining name has nothing to be drawn against. Unticked, the panel allows up to 100 winners, and the same person can win several times. In Raffle mode each ticket is its own entry, so a ticked box removes only the winning ticket.