happyending.com

Provably fair

We lock in the result of every spin before you play, and give you everything you need to check it afterward. You don't have to trust us.

The words you'll see

Server seed
A secret random value we pick. It stays hidden while you play, so nobody can predict your spins, including you.
Server seed hash
A fingerprint of the server seed, shown to you before you play. A fingerprint can’t be turned back into the seed, but any change to the seed changes it completely, so we can’t swap the seed later without you noticing.
Client seed
A random value on your side. You can set your own on your Fairness page whenever you rotate your seed pair. The next server seed’s hash is shown before you choose, so we can’t pick a server seed that suits your client seed.
Nonce
A counter that starts at 0 and goes up by one with every spin, so each spin with the same seeds gets a fresh, independent draw.
Seed pair
A server seed and a client seed used together. When you rotate your seed pair, a new pair starts and the old server seed is revealed so you can check every spin it decided.

How a spin is decided

  1. We mix the seeds with HMAC-SHA256, a standard cryptographic function: the server seed is the key, and the message is your client seed and nonce joined by colons, with a 0 at the end: clientSeed:nonce:0.
  2. We read the first 4 bytes of the result (the first 8 hex characters) as a whole number.
  3. If that number is below 4,294,000,000, your ticket is the remainder after dividing it by 1,000,000, plus 1, so a ticket from 1 to 1,000,000. If it isn't (about 1 spin in 4,400), we use the next 4 bytes instead. That keeps every ticket exactly equally likely.
  4. Each item in the pack owns a range of tickets. The range your ticket lands in is your item. Each round's proof page shows that range.

Check it yourself

  • Every spin has a Verify link that opens its proof page. Once you rotate your seed pair on your Fairness page, the proof page reveals the server seed, checks it against the hash, and recomputes your ticket. Your Fairness page also shows the next server seed hash before you rotate, and checks that it's the one you get.
  • Use the independent verifier. It's open source and runs in your browser, not on our servers.
  • Or use any SHA-256 and HMAC-SHA256 calculator: hash the server seed and compare it with the server seed hash; then run HMAC-SHA256 with the server seed as the key and clientSeed:nonce:0 as the message, and follow steps 2 to 4 above.
Back to home