← blog

mintrr notes

How commit-reveal makes a game outcome checkable after the fact

· technical

Each hand commits first and reveals after, against a block that did not exist at commit time. Anyone can recompute any outcome.

you asked for freeze and cap checked in source and compiled Both found, so it ships Either missing and nothing is written at all.
Every promise is checked against the code before you see it.
commit revealfairnesscasinoverifiable randomnessblock hash

A casino game has a trust problem that no slogan fixes. When the hand is over and the house won, the player has exactly one question: was that real? Any answer the house gives from its own mouth is worthless. The answer has to be checkable by the player, after the fact, from records the house cannot rewrite. mintrr builds that checkable answer into the game itself.

Two moments, in an order that matters

Commit-reveal splits a hand into two moments, and the ordering is the whole mechanism.

First the commit: the player funds the pot, and both sides fix their seeds. Nothing about the outcome is decided yet, but the inputs are locked. Neither side can change its seed once the commitment stands.

Then the reveal: the outcome is computed from the two seeds plus the hash of a block that did not exist when the commitment was made. The future block is the part nobody could have known at commit time. The seeds are the part anybody can re-check after.

The future block is the key. If the outcome depended only on the seeds, the house could pick its seed after seeing the player's and win on purpose. By mixing in a block hash that did not exist yet, neither side can steer the result at the moment it commits.

After the hand, verification is arithmetic

This is where the design earns its name. Anyone, including the player, can recompute the result.

Take the recorded player seed, the recorded house seed, and the recorded block hash. Run the same outcome function the contract used, and compare with the recorded outcome. Every input sits in the evidence record next to the transaction that anchors it on chain, so the inputs and the result cannot be edited without the chain saying so.

If a player recomputes and disagrees, they have proof of cheating, not a suspicion of it. If the house publishes all three inputs and stands behind the recomputation, it has nothing left to hide behind. The record is the guarantee, and the guarantee is arithmetic anyone can redo.

The design is the product

mintrr builds the commit-reveal game as a set of contracts, and checks that the check is really in the code before it ships. That is the pattern: not "trust us, the game is fair", but a game whose outcome a stranger can re-verify from a published record.

The same shape generalizes past games. Anywhere two parties need a result that neither can manipulate and both can audit (a lottery, a draw, an allocation, a leader election) the commit-reveal structure gives the honest answer. The casino is the clearest demonstration because the stakes are obvious.

What this does not claim

The honest limits matter, so here they are.

A block hash is public and miners see it coming, so this gives checkability, not unpredictability against every adversary. It does not claim the game's mathematics favor the player: the house edge is published separately, and the reveal only proves the edge was applied honestly, not that it is zero. And it does not remove the house: someone has to fund the pot and run the table.

What it claims is narrow and exactly as strong as it sounds. After the fact, anyone can recompute any hand, using a record the house cannot rewrite. That is the whole of casino fairness that software can deliver, and it is enough.

Why this matters beyond the casino

Checkability after the fact is the property most on-chain products promise and few deliver. mintrr treats it as a build requirement: if a result is going to be disputed, the record that settles the dispute has to exist before the dispute does. Commit-reveal is one instance of that discipline, and the money layer and the evidence trail around it are the same discipline applied to a business.

If you have a use case where two parties settle on a result, and you want that result auditable by a third party later, that is a conversation worth having. Start it from the contact page.