Provably fair

Every result is locked in before you bet, and you can check it yourself.

  1. LockedBefore you bet, a secret seed is locked in and its hash shown
  2. MixedIt is mixed with a value we can't pick, which makes the result
  3. RevealedAfterwards the seed is shown, so anyone can check it fits

Check any bet

The ID shows in the bet's provably fair check.

What makes a result

  • Single-player games

    Your own pair of seeds

    1. Server seedKept secret, its hash shown
    2. Client seedYours to set
    3. NonceOne up each bet
    4. HMAC-SHA256Mixes all three into numbers
    5. OutcomeRead from those numbers
    Before
    The hashes of your server seed and the next one
    After
    The server seed, when you rotate your seeds
  • Shared rounds

    Crash, Roulette, Slide and Snail Derby

    1. Hash chainFixed before round 1, played from the end back
    2. Round hashHashed as many times as its round number
    3. Terminal hashWhat that gives, published to all
    4. Avalanche blockNamed at commit, still to come
    5. OutcomeIts hash salts every round
    Before
    The chain's terminal hash, and the number of a future block
    After
    Each round's hash, as the round finishes
  • Case Battles

    One seed for the whole battle

    1. Seed hashFixed when the battle opens
    2. Avalanche blockNamed when the last seat fills, still to come
    3. HMAC-SHA256Server seed, salted by the block hash
    4. PullsSeat s of round r reads float r × seats + s
    5. Server seedRevealed when the battle ends
    Before
    The seed's hash, and a future block once every seat is taken
    After
    The server seed, when the battle finishes

The Avalanche block doesn't exist yet when the seed is locked, so nobody can know the result.

What is a hash?

A code made from a seed, called a SHA-256 hash. It can't be turned back into the seed, and one changed letter changes all of it, so a seed can't be swapped later.

  • goat5480f08f3596…74bd0c9c
  • boat25cdb46d8d21…b560a0dd
Exact formulas
Single-player games
HMAC_SHA256(serverSeed, "clientSeed:nonce:r") for r = 0, 1, 2 and on. The nonce is the bet number: it goes up by one each bet and starts at 0 after you rotate.
Shared rounds
HMAC_SHA256(roundHash, "blockHash:r"). Hashing a round's hash as many times as its round number gives the published hash. Any Avalanche C-Chain explorer shows the block.
Case Battles
HMAC_SHA256(serverSeed, "blockHash:r"), read round by round and seat by seat.
Numbers
Each digest gives eight numbers between 0 and 1, four bytes each, read in order. A whole number below n is floor(number × n).
Case pulls
One number below a million, weighted over the case's public items and odds.