Hello Everyone!
Today, I am going to demonstrate how to Provably fair system works in the backend of a casino game.
I worked on a slot game with Provably Fair Rng, where I learned how to actually implement provably fair system in our game . Provably fair system in slot is bit complex, so we're gonna take an example of crash game and try to understand how it actually work.
Let's begin.
What is Provably fair ?
Provably fair is a system, most commonly used in online games and gambling, that allows players to independently verify that the outcome of a game was not manipulated by the operator.
working
The core idea behind Provably Fair is simple: the outcome is decided before you even place your bet, but you can't see it until after the round ends.
Here's how it typically works in a Crash game:
1. Server Seed Generation
Before the round starts, the server generates a random Server Seed. This seed is hashed (using SHA-256) and the hash is shown to the player before the round begins.
serverSeedHash = SHA256(serverSeed)
Since hashing is one-way, the player can see the hash but can't reverse it to find the actual seed. This proves the server has already "committed" to an outcome without revealing it.
2. Client Seed
The player (or the client-side app) also contributes a Client Seed, sometimes combined with a Nonce (a number that increases with every round). This ensures the player has a say in the outcome too, so the server alone can't cook up a favorable result.
combinedSeed = serverSeed + clientSeed + nonce
- Generating the Crash Point
Once both seeds are combined, they're passed through a hashing algorithm (usually HMAC-SHA256) to generate a random number, which is then converted into the crash multiplier using a defined formula.
hash = HMAC_SHA256(serverSeed, clientSeed + nonce)
crashPoint = formula(hash)
The formula usually ensures a house edge (say 1–3%) while still keeping the distribution fair and random.
4. Reveal & Verification
After the round ends, the server reveals the original Server Seed. Now anyone can:
Hash the revealed server seed and check if it matches the earlier published hash.
Recompute the crash point using the same formula and confirm it matches what was shown in-game.
If both match, the round is proven fair — the operator couldn't have changed the outcome after seeing the bets.
In short:
Commit (hash shown) → Play (seeds combined) → Reveal (seed shown) → Verify (recompute & match)
This cycle is what makes the system "provably" fair — you're not trusting the casino, you're verifying math.
Consclusion
Provably Fair works by committing to an outcome before the round and revealing the proof after, so trust shifts from the casino to verifiable math. Once you understand this seed-hash-verify cycle, you can apply it to any casino game, from simple dice to complex slots.

Top comments (0)