Intermediate guide

How provably fair games work

Provably fair systems let a player verify that a result was fixed before the bet and not altered afterwards. The cryptography is simple; the limits are worth knowing.

By Tomás ReyesReviewed 6 min read

The problem being solved

In a conventional online casino, the random number generator runs on the operator's or the studio's servers. Players cannot see it. Trust comes from outside: test laboratories certify the generator, and a regulator licenses the operator.

Provably fair is a different approach that emerged from crypto gambling sites, many of which operated without those external checks. Instead of asking the player to trust a certificate, the game publishes enough cryptographic evidence for the player to check each result independently. It is most common in simple, fast games such as dice, crash, mines and plinko.

The building block: a hash commitment

A cryptographic hash function such as SHA-256 turns any input into a fixed-length string. Two properties matter here. It is practically impossible to work backwards from the output to the input, and practically impossible to find two different inputs with the same output.

That allows a commitment. If the operator shows you the hash of a secret value before you bet, it cannot later swap that secret for a different one, because the new value would not match the hash you already hold. And because the hash reveals nothing about the secret, you cannot use it to predict results.

The three ingredients

Most implementations combine three values.

  • Server seed. A random secret generated by the operator. Before play begins, the player is shown its hash.
  • Client seed. A value supplied by the player's browser, which the player can change at will. Because the operator committed to its seed before knowing the client seed, it cannot choose a server seed that produces bad outcomes for that particular player.
  • Nonce. A counter that increases by one with each bet, so that every round produces a different result from the same pair of seeds.

How a round is produced

For each bet, the game feeds the three values into a keyed hash function, commonly HMAC-SHA256, producing a long string of hexadecimal characters. A published rule converts part of that string into a game result: a dice roll between 0 and 99.99, a crash multiplier, the positions of mines on a grid, or the order of a shuffled deck.

When the player chooses to rotate seeds, the operator reveals the old server seed and commits to a new one. The player can now do two checks. First, hash the revealed seed and confirm it matches the commitment shown earlier. Second, recompute every round played under that seed using the client seed and each nonce, and confirm that the results match what the game displayed. Operators usually provide a verification page, and because the algorithms are public, independent verifiers and a few lines of code will do the same job.

Some crash-style games, where all players share one result, use a variation: a long chain of hashes generated in advance, with each round's seed being the hash of the next round's. The final hash is published before the first round, so the whole sequence is fixed from the start.

What it proves, and what it does not

Verification demonstrates that the outcome of a round was determined by inputs fixed before the bet, and that the operator did not alter it afterwards. That is a meaningful guarantee.

It does not show any of the following.

  • That the game is generous. The rule that maps a hash to a result includes the house edge. A dice game can be provably fair and carry a 1 percent edge or a 10 percent edge. The edge has to be read from the published rules or worked out from the payout table.
  • That the operator will pay. Nothing in the scheme addresses solvency, withdrawal limits, account closures or bonus terms.
  • That third-party content is covered. Slots and live dealer games supplied by external studios on the same site generally use conventional certified generators and are not verifiable in this way.
  • That anyone is checking. The protection only works if players, or someone acting for them, actually verify. A commitment nobody checks deters less than one that is routinely audited.

How it sits alongside regulation

Provably fair verification and licensing answer different questions. One addresses whether a specific result was tampered with. The other addresses who the operator is, whether customer funds are protected, how disputes are handled and whether safer gambling tools are in place. A number of licensed operators now offer provably fair games, and some regulators have approved them within their normal testing frameworks.

For a reader assessing a site, the sensible position is to treat provably fair as one useful property among several, and to check the licence, the terms and the published house edge with the same care.

Keep learning

All guides

Latest stories

All stories

Worth a look

All guides

Case studies

All case studies