Published
By Qredo team

Qredo 101s: What Does “Provably Fair” Actually Mean?

"Don't trust, verify" is the founding idea of public blockchains. Provably fair systems apply the same principle to randomness: they let anyone check that a random outcome was fixed in advance and never altered. Here is how they work, where they are used and what they can and cannot prove.

In our earlier Qredo 101 we explained zero-knowledge proofs: ways of proving a statement is true without revealing the underlying data. Provably fair schemes belong to the same family of ideas, but they solve a narrower, very practical problem. When one party generates a random number that another party depends on, how can the second party be sure it was not chosen after the fact?

The problem appears everywhere digital systems hand out something scarce or valuable at random: NFT mints, airdrop allocations, validator selection, raffles, lotteries and online games. The answer, in most cases, is an old cryptographic tool called a commitment scheme.

The commitment scheme: sealing a value in an envelope

Imagine writing a number on a card, sealing it in an envelope and handing the envelope to a friend before a game starts. Your friend cannot see the number, and you cannot change it. At the end, the envelope is opened and anyone can check that the number used was the one sealed at the start.

Cryptographic hash functions make a digital version of that envelope. A hash function such as SHA-256 takes any input and produces a fixed-length fingerprint with two properties that matter here:

  • Hiding. Given only the hash, it is computationally infeasible to work out the input, provided the input is long and random.
  • Binding. It is computationally infeasible to find a different input that produces the same hash, so the committer cannot swap the value later.

Publishing SHA-256(secret) before an event therefore commits you to secret without revealing it. Revealing secret afterwards lets anyone verify the commitment by hashing it themselves.

From commitment to provably fair randomness

A commitment alone is not enough. If one party picks the secret, it could still pick a secret that happens to favour itself. Provably fair designs fix this by mixing in randomness from the other side. The standard pattern uses three inputs:

  1. Server seed: a random secret generated by the service, committed to by publishing its hash in advance.
  2. Client seed: a value chosen or editable by the user after seeing the commitment.
  3. Nonce: a counter that increments with each round so every outcome uses a fresh input.

The outcome is computed with a keyed hash, typically HMAC-SHA256(server_seed, client_seed:nonce), and the output bytes are mapped to the format needed: a number between 0 and 99.99, a card from a shuffled deck or a multiplier. Neither side can steer the result. The service is bound by its commitment; the user's seed is unknown to the service when the commitment is made.

Verification is a few lines of code:

import hashlib, hmac

def verify(server_seed, commitment, client_seed, nonce):
    # 1. the revealed seed must match the hash published in advance
    assert hashlib.sha256(server_seed.encode()).hexdigest() == commitment
    # 2. recompute the outcome for this round
    digest = hmac.new(server_seed.encode(),
                      f"{client_seed}:{nonce}".encode(),
                      hashlib.sha256).hexdigest()
    # 3. map the first 8 hex characters to a number from 0 to 99.99
    return int(digest[:8], 16) % 10000 / 100

Real implementations differ in how they map bytes to outcomes, and a careful one avoids the slight statistical bias a simple modulo can introduce, but the structure is the same.

Where provably fair systems are used

On-chain randomness

Blockchains are deterministic, which makes randomness hard. Ethereum's proof-of-stake beacon chain uses a commit-reveal style mechanism (RANDAO) in which validators contribute values that are mixed together. Many smart contracts instead use a verifiable random function (VRF): an oracle produces a random value together with a cryptographic proof that it was generated correctly from a known key and input, and the contract checks the proof before using the number.

NFT mints and airdrops

Collections that assign rare traits at random, and protocols that select airdrop winners, often publish a commitment or rely on VRF so that holders can verify the team did not quietly reserve the best outcomes.

Online games and crypto gambling

The best-known application is in crypto-native gaming, where "provably fair" became a standard label for dice, crash and similar in-house games. Players can rotate their seed, receive the previous server seed and recompute every round. For a broader look at how that sector handles deposits, custody, licensing and tax, see our explainer on how crypto casinos work.

What "provably fair" does not prove

The label is often treated as a general guarantee of honesty. It is not. A correctly implemented scheme proves one thing: each outcome was determined by inputs fixed before the round, and those inputs were not changed. It does not prove:

  • That the odds are what they claim to be. The mapping from hash to outcome encodes the house edge or payout table. Verifying a result does not reveal whether that mapping matches what is advertised, unless the code is published and audited.
  • Solvency. A perfectly fair game says nothing about whether the service holds the funds it owes users, a question that custody and proof-of-reserves address separately.
  • Coverage. On many platforms only some products are provably fair. Content from third-party providers usually relies on externally certified random number generators instead.
  • Seed hygiene. If users never change the default client seed, or the server seed is reused improperly, the guarantees weaken.

Why it matters beyond gaming

Provably fair schemes are a small, approachable example of a larger trend: replacing institutional trust with cryptographic verification. The same building blocks of hashes, commitments, keyed functions and proofs underpin proof-of-reserves attestations, zero-knowledge identity, multi-party computation and verifiable audit trails in digital asset custody.

The lesson is consistent across all of them. Cryptography can make specific claims checkable. It is worth knowing exactly which claim is being proved, and which ones still rest on trust.

Key takeaways

  • A hash commitment lets a party lock in a secret value without revealing it.
  • Provably fair systems combine a committed server seed, a user-supplied client seed and a nonce so neither side can control the outcome.
  • Smart contracts use related tools such as commit-reveal schemes and verifiable random functions.
  • Verification proves an outcome was not altered, not that the odds, solvency or licensing of a service are sound.

Related articles