Provably Fair
What is provable fairness?
Provable fairness is a way of proving that every game result is truly random and free from manipulation. It’s a transparent and verifiable system — meaning you, the player, can mathematically verify the fairness of every bet.
To make sure everything runs honestly, Gambear uses a provably fair algorithm that lets you see exactly how each game result was generated. In short, you have full control and visibility over the randomness, so you can always trust the outcomes. Every game on Gambear.com uses the same underlying method to generate random, verifiable numbers.
How it works?
Each provable bet is generated using three main components:
- Client Seed (you control this)
- Server Seed (we provide this)
- Nonce (increments with each bet)
These values are combined and passed through an HMAC-SHA256 hash to produce 32 random bytes (values 0–255). The HMAC input message is formatted as:
client_seed:nonce:round
For example, if your Client Seed is test1234, Nonce is 1, and it’s the first round, the message is:
test1234:1:0
Each time those 32 bytes are used, round increments by 1.
Client Seed
This is your part of the equation—you can set any value or leave it blank. You can change it at any time to start a new chain of randomness. Because we don’t know your Client Seed in advance, we can’t rig the Server Seed to produce specific outcomes.
Server Seed
We generate this as a random 64-character hex string. Before you place any bets, you receive its SHA-256 hash—locking in the seed so it can’t change. To reveal the actual Server Seed, you “rotate” it (generate a new one). Then you can verify that:
- The unencrypted Server Seed matches the previously shown hash.
- All bets placed under that seed were fair.
Nonce
The nonce is a simple counter that increases by 1 with each bet. It guarantees each bet’s input is unique, even with the same Client and Server Seeds.
How to verify?
Step 1: Confirm the Server Seed hash
- Use any SHA-256 tool (binary hash mode).
- Example Server Seed:
4babe5690cb4bba57a45267a7b0234ebfacb80ac231df6a9338c7d9cbf38e5b3
Its SHA-256 hash should be:
c153b4d6a284002dbbea66dbd36303997e5d02fd95b2913df944c09751d6f97a
This proves the seed was pre-committed and unchanged.
Step 2: Generate the result
Use an HMAC-SHA256 generator. Input the Server Seed as the secret key, and the message as:
client_seed:nonce:round
Example:
- Server Seed: 4babe...
- Client Seed: (blank)
- Nonce: 57
- Round: 0
- Message: :57:0
HMAC output might be:
e5593cf24c1ed1ba39c152738e74a67ee80a6c9829e3b0d68b9a51d2e87c3b36
🎲 Decoding the Dice result
Let’s say you’re playing Dice. The game uses the first 4 bytes of the hash to generate a random float between 0 and 1.
Take the first 4 bytes: e5, 59, 3c, f2 — which are: 229, 89, 60, 242 (in decimals)
Now calculate:
229 / 256^1 + 89 / 256^2 + 60 / 256^3 + 242 / 256^4 ≈ 0.895893
Multiply this by 10001:
0.895893 × 10001 ≈ 8959.825
Round down to the nearest whole number → 8959
That’s the result of your Dice roll. 🎉 And yes, this is exactly what you would get in-game using the same inputs!
✅ Summary
- Every bet can be verified.
- You control the Client Seed.
- We commit to the Server Seed in advance.
- You can reproduce results using open tools.
- Transparency is baked into every single spin, roll, or flip.