Your cookie choices We would like to use optional cookies for site analytics and for our live chat and enquiry forms. Nothing optional loads until you choose. Read our Cookie Policy.

Technical Guide 11 Mins Reading Time

Provably Fair Explained: How It Works in Crypto Casinos

Provably fair is a cryptographic method that lets anyone check that a game result was fixed before the bet was placed and was not changed after it. The casino commits to a secret seed by publishing its hash, the player adds a seed of their own, and the result is calculated from both.

This guide explains how the provably fair algorithm works, with a worked example you can run yourself, which games can use it, and how it compares with a certified random number generator (RNG). It is written for crypto casino operators and CTOs deciding what to build, and it is clear about what provably fair does not prove.

What Does Provably Fair Mean?

Provably fair means a player can prove, with maths rather than trust, that the casino did not change a result after seeing the bet.

In a standard online casino game, the result comes from an RNG on the operator's or the game studio's server. Players cannot see inside it, so they rely on the lab certificate and the license. A provably fair game publishes a commitment before the bet and reveals the inputs afterwards, so the player can recalculate the result and get the same answer.

The method is a commit-reveal scheme: the casino commits to a value by publishing its hash, and later reveals the value so anyone can check it against that hash. Most provably fair games run on the casino's own servers, not on a blockchain. Only games built as smart contracts are truly on-chain.

How Provably Fair Works: Server Seed, Client Seed and Nonce

Every provably fair result is calculated from three inputs: a server seed chosen by the casino, a client seed chosen by the player, and a nonce that counts the bets.

Provably Fair in Five Steps

  1. CommitThe casino shows the SHA-256 hash of its secret server seed.
  2. Client seedThe player keeps or changes their client seed.
  3. NonceEach bet adds 1 to the nonce.
  4. ResultHMAC-SHA256 turns the seeds and nonce into the result.
  5. Reveal and checkOn rotation the server seed is revealed. The player hashes it and compares.
The casino commits before it knows the player's seed, so it cannot steer the result.

Step 1: The Casino Commits to a Hashed Server Seed

The casino generates a random server seed and keeps it secret. Before any bet, it shows the player the SHA-256 hash of that seed. A hash works one way: it is easy to calculate from the seed, but the seed cannot be worked out from the hash. Once the hash is shown, the casino cannot switch to a different seed without the player noticing.

Step 2: The Player's Client Seed and the Nonce

The player's browser creates a client seed, and the player can replace it with any text they like. Because the casino commits to its seed before it knows the client seed, it cannot pick a server seed that produces a result it wants. The nonce starts at 1 and goes up by one with every bet, so each bet on the same pair of seeds gets a different result.

Step 3: Turning the Hash Into a Game Result

The game combines the inputs with HMAC-SHA256, using the server seed as the key and "client seed:nonce" as the message. It takes the first 8 hexadecimal characters of the output, converts them to a number and divides by 2 to the power of 32, which gives a value between 0 and 1. A dice game then scales that value to a roll from 0.00 to 99.99. Implementations differ in the details, so each casino should publish its own formula.

Here is a worked example with a server seed of 4f3c9a7e1b2d8c6f0a5e3b9d7c1f2a8e, a client seed of operator-guide-2026 and a nonce of 1:

  • The casino's published commitment (the SHA-256 hash of the server seed) is 0d4c2412cb2f485b4e1686a4119b2ddc53b560f94c6b266e1a4b1bd05075e009.
  • The HMAC-SHA256 output starts with 21acbc44, which is 564,968,516 as a number.
  • 564,968,516 divided by 2 to the power of 32 is 0.1315, so the roll is 13.15.
  • With the same seeds and a nonce of 2, the output starts with e5956c7f and the roll is 89.68.

Worked Example: Nonce 1

  1. 21acbc44first 8 characters of the HMAC-SHA256 output
  2. 564,968,516as a number
  3. 0.1315÷ 2 to the power of 32
  4. 13.15dice roll
Same seeds with nonce 2: the output starts with e5956c7f and the roll is 89.68.
const crypto = require("crypto");

function diceRoll(serverSeed, clientSeed, nonce) {
  const hash = crypto.createHmac("sha256", serverSeed)
    .update(`${clientSeed}:${nonce}`)
    .digest("hex");
  const number = parseInt(hash.slice(0, 8), 16) / 2 ** 32;
  return Math.floor(number * 10000) / 100;
}

console.log(diceRoll("4f3c9a7e1b2d8c6f0a5e3b9d7c1f2a8e", "operator-guide-2026", 1)); // 13.15

Step 4: Seed Rotation and Reveal

The server seed stays secret while it is in use. When the player rotates seeds, the casino reveals the old server seed and commits to a new one by showing its hash. The player can now check every bet made with the old seed. Players should be able to rotate whenever they like.

How to Verify a Provably Fair Result

A player verifies a bet by checking the revealed server seed against the commitment, then recalculating the result.

  1. Rotate the seed pair, so the casino reveals the server seed you played with.
  2. Hash the revealed server seed with SHA-256 and confirm it matches the hash shown before your bets.
  3. Take the client seed and the nonce of the bet you want to check from your bet history.
  4. Run the casino's published formula, on its verifier page or in your own code.
  5. Compare the result with the one recorded in your bet history.

A good verifier page shows the hashed and revealed server seeds, the client seed, the nonce, the formula, and the result for each bet. Publishing the verifier's source code lets players run the check without trusting the casino's page.

Which Games Can Be Provably Fair?

Games whose result is calculated by the casino from seeds can be provably fair. Games whose result comes from a studio's server or a physical event cannot.

  • Dice and coin flip. One hash gives one number, which sets the roll or the side.
  • Crash. Many crash games use a hash chain. The casino hashes a secret seed over and over to build a long chain, publishes the final hash, then plays the chain backwards. Hashing any round's hash gives the hash of the round before it, so players can check that no round was changed.
  • Plinko. Successive values from the hash decide whether the ball goes left or right at each row.
  • Mines and card games. The hash output drives a shuffle, such as a Fisher-Yates shuffle, that places the mines or orders the deck.

Most third-party slots cannot be checked this way. Their results come from the studio's own certified RNG on its server, and the player has no seed to verify. A few studios sell provably fair versions of some games using their own models. Live dealer games cannot be provably fair at all, because the result is a real card or a real wheel, not a calculation. Third-party game studios still make up most of a crypto casino's lobby.

Provably Fair vs Certified RNG

Provably fair and a certified RNG answer different questions. Provably fair shows that one result was not changed after the bet. RNG certification shows that the generator and the game maths work as stated.

Provably fairCertified RNG
Who checksThe player, or anyone, using the revealed seedsAn accredited testing lab, such as GLI, iTech Labs, BMM Testlabs or eCOGRA
What it provesThat one result was fixed before the bet and not changed after itThat the RNG output is unpredictable and the game maths match the stated RTP
When it is checkedAfter each bet, as often as the player likesBefore launch, and again when the software changes
Regulator viewAn extra transparency featureThe standard regulators expect for licensed games, often tested against GLI-19
Game typesIn-house originals such as dice, crash, plinko and coin flipAll RNG games, including third-party slots and table games

Licensed operators are generally expected to use RNGs certified by an accredited lab. Provably fair adds a check that players can run themselves; it does not replace that certification. Our guide to certified RNG explains how lab testing works.

What Provably Fair Does Not Prove

Provably fair proves that a result was not altered. It does not prove that the game or the casino is fair in every other sense.

  • RTP. A game can be provably fair and still pay back less than it claims. Only the game maths, tested by a lab, sets the return to player.
  • Payouts. It does not show that the casino pays out winnings on time, or at all.
  • Solvency. It says nothing about whether the casino holds enough funds to cover player balances.
  • Licensing. It is not a license and does not satisfy a regulator on its own. See which regulators allow crypto in our crypto casino license guide.

Implementing Provably Fair as an Operator

Provably fair is only as strong as the way it is built. These are the parts an operator needs to get right:

  • Secure seed generation. Create server seeds with a cryptographically secure random generator, never a predictable one.
  • Seed storage. Keep unrevealed server seeds encrypted and out of reach of staff and support tools until they are rotated.
  • Rotation policy. Let players rotate at any time, and reveal the old seed immediately when they do.
  • Audit log. Keep a permanent record of every commitment, revealed seed, client seed, nonce and result.
  • Public verifier. Publish a verifier page and the formula for each game, ideally with open source code.
  • Nonce and seed reuse. Never reset a nonce or reuse a seed pair: the same inputs always give the same result, which a player could exploit.
  • Independent review. Have the implementation reviewed by an outside party before launch, alongside the lab certification of your RNG.

OHS Gaming's provably fair crypto casino software runs in-house originals next to third-party games, with crypto payments in BTC, ETH, USDT and LTC alongside fiat. If you are still choosing a payment model, compare the options in our guide to crypto casino vs online casino.

Provably fair originals for your lobby: OHS self-hosted dice, coin flip, plinko and crash games.

See crypto iGaming software

Provably Fair Games on a Crypto Casino Platform

On a crypto casino, provably fair originals usually sit in the lobby next to certified third-party slots, table games and live dealer tables.

Originals such as dice, coin flip, plinko and crash are popular with crypto-native players, who often check results themselves. Third-party games bring the size and variety of the catalogue. The platform has to handle both: seed management and a verifier for the originals, and certified integrations for everything else, with one wallet and one back office for reporting.

Share this article
Copied!

Aditya Verma

Technical Writer at OHS Gaming

Aditya Verma is a technical writer at OHS Gaming, translating platform engineering into language operators can act on. He brings several years of experience making detailed, technical subject matter clear and accessible.

Frequently Asked Questions

No. Provably fair lets a player check that a result was not changed after the bet. A certified RNG has been tested by an accredited lab, such as GLI or iTech Labs, to show that its output is unpredictable and that the game pays its stated RTP. Licensed operators generally need the certified RNG; provably fair is an extra.
Most cannot. Third-party slots use the studio's own certified RNG on its server, so there is no seed for the player to check. A few studios offer provably fair versions of some games, but most provably fair games are in-house originals such as dice, crash and plinko.
Not as a rule. Regulators generally expect RNGs and games certified by an accredited lab, and provably fair is a transparency feature that operators add on top. Check your regulator's technical standards before launch.
Rotate your seeds so the casino reveals the server seed, check that its SHA-256 hash matches the one shown before your bets, then run the casino's formula with that server seed, your client seed and the bet's nonce. The result should match your bet history.

Want to See Provably Fair on a Live Platform?

Book a demo. We will walk you through how provably fair originals and seed rotation work in our crypto casino software.

Book a demo