Skip to content
Sunforge Games

Provably fair

Every draw can be recomputed by anyone from public data. Nothing on this page talks to our server: the maths below runs in your browser.

How it works

  1. Commitment. Before a raffle opens we generate a secret 64-character hex seed and publish sha256(seed) on the raffle page. We can't change the seed later without breaking that hash.
  2. Frozen entries. At the draw the list of accepted bet ids is sorted and hashed: entriesHash = sha256(ids joined by newline). The list is public.
  3. Selection. For winner i (starting at 0) compute HMAC-SHA256(seed, entriesHash + ":" + i), take the first 8 bytes as a big-endian integer and use it mod the number of entries still in the pool. Each pick is removed, so one bet never wins twice.
  4. Reveal. The seed is published with the result. Rerun steps 2–3 and you get the same winners.

The seed is used as its 64-character hex string (ASCII bytes), not decoded. Weekly draws use the same steps with site/name:tickets lines and a weighted pick over the remaining tickets.

Verify a draw