Provably Fair System
How punches.fun guarantees fairness using randomness, salts, signatures, and on-chain verification.
๐ Provably Fair System
Fairness is at the heart of punches.fun. Every game round is generated using a transparent, cryptographically secure commitโreveal system backed by on-chain signatures.
This ensures:
- The outcome cannot be changed after you start the game
- You can check every round yourself
No hidden logic. No manipulation. Everything is provable.
๐ฒ Step 1 โ Generating Randomness
Before a game begins, the system generates:
seedโ a random value used to derive the winning tilessaltโ a second random value that hides the seed until the game is overwinning_tilesโ the 5 winning positions (determined from the seed)
These values are never exposed to the player yet.
๐ง Step 2 โ Creating the Commitment (seed + salt)
To lock the outcome for the round, we combine:
commitment = SHA256(seed + salt)This commitment hash ensures:
- The seed is hidden
- The salt protects against reverse-engineering
- The outcome is fixed and cannot be changed later
This commit represents the โfuture resultโ of your game.
โ๏ธ Step 3 โ Signing & Posting On-Chain
When you start the game, the commitment is signed and posted on-chain.
We publish:
- The hash (commit)
- The signature proving it came from punches.fun
- The timestamp / on-chain record that freezes this commitment forever
Why on-chain?
- It guarantees we cannot alter or replace the commitment
- It makes the fairness publicly verifiable
- It prevents server-side tampering or manipulation
- It ensures transparency without trusting us
At this point:
The winning tiles for your round are already fixed โ even before you pick anything.
๐ฎ Step 4 โ You Play the Game
You pick your 5 tiles normally.
Your choices do not affect the predetermined outcome.
๐ Step 5 โ The Reveal (After Game Ends)
Once the round is over, we publish:
- The seed
- The salt
- The winning_tiles
Now anyone can recompute the commitment:
SHA256(seed + salt) == commitIf it matches โ the game was fair. If not โ the round would be invalid (but this should never occur).
๐งช Step 6 โ Verifying the Outcome Yourself
Verification formula:
seed + salt --> SHA256 --> commit_hash