How Provably Fair Works (and How to Check a Roll Yourself)
The maths behind provably fair games, in plain English, plus how to verify any Betrefs free case roll.
Updated
Provably fair means you don't have to trust the site. You can check every result yourself.
The three ingredients
- Server seed. A random secret the site generates. Before you play, you only see its SHA-256 hash, which locks it in.
- Client seed. A value you control. Change it whenever you like, so the site can't know the final input in advance.
- Nonce. A counter that goes up by one each time you play, so every roll is different.
How the roll is made
The site combines the three with HMAC-SHA256, takes the first 52 bits of the result and reduces them to a ticket between 0 and 999,999. Each prize owns a range of tickets, and the range your ticket lands in decides the prize.
Checking it
When the server seed rotates, the site reveals the original. Hash it: if it matches the hash you saw before playing, the seed wasn't changed. Then run the same calculation, or use our verifier, and you'll get the same ticket.

What provably fair doesn't prove
Provably fair proves one thing: that the roll came from the seeds, and that the site didn't change its seed after you played. It says nothing about the deal you're getting.
- The odds can still be bad. A case can be perfectly provably fair and still keep 10% or more of every opening. We measured 7,783 CS2 cases on 29 sites: the median case keeps 10%, and nine in ten keep between 8% and 12.5%.
- Item values are the site's own. Many sites price their items above what they sell for elsewhere, so a "fair" upgrade or case is worth less in real money than it looks.
- Check how the seed is hashed. If the site hashes its server seed with a secret salt of its own, you can't check the revealed seed against the hash unless the salt is published too. A plain SHA-256 hash of the seed, like ours, can be checked by anyone.
- Some battles use public randomness. A few sites draw case battle results from a public blockchain block instead of a server seed, so nobody, the site included, knows the result in advance.