Hashes, seeds and randomness: how fair play works
This guide is for those who want to understand what happens “under the hood” of WINGRADE. We cover what a hash and HMAC are, why server seed, client seed and nonce are needed, and how a random key turns into a specific result.
Where randomness comes from
It all starts with a secret key — the server seed. It is a long random string that WINGRADE generates with a cryptographically secure generator. Such generators are used in banking systems and encryption: their output can’t be guessed or reproduced.
On its own the key is just a set of characters. To turn it into a roulette cell or an upgrade result, two more things are needed: a hash function and a public formula.
SHA-256: a digital fingerprint
SHA-256 is a cryptographic hash function. It takes any text and outputs a 64-character string. Three properties make it the foundation of fair play:
The original key can’t be recovered from the hash.
Finding two different keys with the same hash is practically impossible.
Changing one character completely changes the hash.
That is why a hash published before a round works like a sealed envelope: you can’t see the contents, but they can’t be swapped unnoticed.
HMAC: how a key becomes a number
To get a result from a key, WINGRADE uses HMAC-SHA256 — a function that “mixes” a secret key with a public message. The message describes what the result is for: for example, the roulette round number.
- HMAC is computedHMAC-SHA256 of the key and the message gives a 64-character hexadecimal string.
- The first characters are takenThe first 13 characters are converted into an integer.
- NormalizationThe number is divided by 2⁵² — the result is a fraction between 0 and 1.
- ResultThe fraction is scaled to the required range: the number of wheel cells, the number of battle participants or the upgrade chance scale.
For example, for a 15-cell roulette wheel the fraction is multiplied by 15 and rounded down — giving a cell number from 0 to 14. Every step can be repeated by hand or with any online HMAC calculator.
Server seed, client seed and nonce
| Component | What it is | Why it is needed |
|---|---|---|
| Server seed | The site’s secret key | The source of randomness; only its hash is visible until it is revealed |
| Client seed | A seed on the player’s side | Adds data to the calculation that the site doesn’t choose |
| Nonce | The attempt number | Makes every result unique with the same key |
| Message | Public round data | Ties the result to a specific round or battle |
In roulette and battles each round has its own server seed, and the message contains the round or battle number. WINGRADE Upgrader uses the account key together with a client seed and a nonce — the attempt number grows with every upgrade, so results never repeat.
Why a result can’t be adjusted
Imagine the site wanted to change a round’s outcome after the bets. It would need a different key — but its hash has already been published. Finding another key with the same hash is practically impossible: all the computing power in the world wouldn’t be enough. And using a new key with a new hash means getting caught on the very first check.
That is why the order matters so much: first the hash is published, then bets are accepted, then the key is revealed. This order can’t be broken unnoticed.
Uniform results
A good hash function produces values evenly distributed across the whole range. This means every wheel cell, every battle participant and every point on the upgrade scale has exactly the probability set by the rules. No cell is “heavier” than another.
- Every round is computed from its own key or its own attempt number.
- Past results play no part in computing the next one.
- Time, number of players and bet sizes don’t affect the result.
Check it yourself
The clearest way to understand Provably Fair is to verify a few rounds yourself. On the fairness check page, pick any finished roulette round and see how the winning cell is derived from the key. A step-by-step guide is in “Provably Fair: how to verify any round”.
Why WINGRADE discloses the formula
We could simply write “the results are fair” and skip the details. But real transparency requires openness: the calculation formula on WINGRADE is the same for all players and publicly described, and the check runs on the user’s side. Any developer can write their own script and recalculate the results without trusting either the site or its check page.
Open the fairness checkFAQ
What is a server seed?
A secret random key from which the result is computed. Before the round only its hash is published; after the round, the key itself.
What is a nonce for?
It is the attempt number. It makes every result unique even when the key is the same.
Why can’t the hash reveal the result?
SHA-256 is a one-way function: the key it was derived from can’t be recovered from the hash.
Can I verify the calculation without the WINGRADE site?
Yes. The formula is public, and HMAC-SHA256 can be computed in any independent calculator.