Provably fair
Every result is locked in before you bet, and you can check it yourself.
- LockedBefore you bet, a secret seed is locked in and its hash shown
- MixedIt is mixed with a value we can't pick, which makes the result
- 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
- Server seedKept secret, its hash shown
- Client seedYours to set
- NonceOne up each bet
- HMAC-SHA256Mixes all three into numbers
- 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
- Hash chainFixed before round 1, played from the end back
- Round hashHashed as many times as its round number
- Terminal hashWhat that gives, published to all
- Avalanche blockNamed at commit, still to come
- 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
- Seed hashFixed when the battle opens
- Avalanche blockNamed when the last seat fills, still to come
- HMAC-SHA256Server seed, salted by the block hash
- PullsSeat s of round r reads float r × seats + s
- 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.
- goat
5480f08f3596…74bd0c9c - boat
25cdb46d8d21…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.