Fair Play: Provably Fair Randomization in DeHub Games
By DeHub Team — 2021-10-04
Alongside the first prediction and raffle games in Q4 2021, we implemented provably fair randomisation.
The phrase gets used loosely, so here is what we mean by it and why it was worth building before the stakes justified it.
The problem with "trust us"
Any operator running a draw can, in principle, influence it. The player has no way to distinguish an honest operator from a dishonest one, because from the outside both produce a winner and an announcement.
That is not a reputational problem you can solve with reputation. It is structural. As long as the mechanism is private, the correct level of trust for a rational player is low, no matter how straight you have been.
What provable fairness means here
The standard we set was that the result must be verifiable by someone who assumes we are lying.
In practice:
- The rules are fixed and published before entry opens. Entry conditions, the draw method, and how ties or failures are handled. Nothing decided after the outcome is known.
- The randomness comes from a source we cannot choose or re-roll. If the operator can sample repeatedly and keep a result they prefer, the source does not matter.
- The outcome is checkable on-chain after the fact. Anyone can reconstruct the draw from public data and confirm the announced winner is the one the rules produce.
The key property is the third one combined with the first. Publishing the rule afterwards proves nothing — it is trivial to describe a rule that produces the result you already have.
Why do this at small stakes
Because it stops being possible to add later. A game that has run one unverifiable draw has an unverifiable history, and no subsequent transparency retroactively fixes it.
It also forces the design honestly while nobody is watching. Every awkward question — what happens if the source is unavailable, if entries tie, if a transaction lands in the same block — is much easier to answer well before there is a large prize and an audience waiting.
Where it ended up
Less than a year later the same approach was carrying on-chain verified raffle mechanics for a $1,000,000 house with more than 15,000 participants. At that size, "trust us" is not a policy anybody would have accepted, and there would have been no time to retrofit the machinery.
The arcade's on-chain leaderboards inherited the same assumption a quarter later: if a score decides a reward, the score has to be checkable by the people it is deciding against.
That is the general rule this quarter produced. Anywhere DeHub decides an outcome that has value attached, the deciding should be inspectable by the person who lost.
The trade-off we accepted
Verifiable systems are less flexible, and that cost is real rather than theoretical.
A published rule cannot be adjusted when it produces an outcome you dislike. We found that out properly the following year, when the $1,000,000 house raffle failed to reach its published minimum and the threshold was an on-chain condition rather than a line in the terms. There was no discretion available. Everyone was refunded.
That was expensive and it was the system working. A verification mechanism that only holds when the answer is convenient is not one, and the moment you carve out an exception you have retroactively removed the property from everything it ever covered.
Open DeHub