← Back to Thimbly

How the fairness proofs work

Thimbly's trust rests on two zero-knowledge proofs. A zero-knowledge proof lets one side convince the other that a statement is true while revealing nothing else. Both of Thimbly's proofs — πA and πB — are built from one idea: a proof of OR.

The building block: a proof of OR

An OR-proof establishes “at least one of these N statements is true” — without revealing which. The trick: you genuinely prove the single statement you hold a secret for, and for the others you produce proofs that look every bit as convincing but are simulated. A shared challenge ties them into one bundle, so the verifier is convinced the disjunction holds yet can't tell the real branch from the fakes.

statement 1simulated
statement 2the one you can really prove
statement 3simulated
statement Nsimulated
↓ one proof: “at least one is true”which one? — hidden

That “hidden which” is the whole point. It lets each side prove they're playing honestly without giving away the one secret — the guess, or the winning thimble — that would spoil the game.

πB — your guess, proven but hidden

You pick one of the N thimbles. πB is your OR-proof that your claim is correctly built from exactly one real thimble — a single, genuine guess, not a fake or a hedge across several. Because it's an OR over all N, which thimble you chose stays secret. That matters twice: the dealer can't see your guess and adapt to it, and your choice stays private.

your guess1 of N thimbles → πB · OR over the N“my guess is one valid thimble” → a fair single guesswhich one — hidden

πA — the dealer's setup, proven honest

The dealer hides the ball under one thimble and encodes the payout so the key that decides the outcome is forced onto the chain when the pot is paid. πA is her OR-proof that exactly one thimble is the genuine winner, honestly encoded — she hasn't rigged it so you can't win, and she can't collect without publishing that deciding key. Again it's an OR over all N, so which thimble wins stays hidden until the reveal — otherwise there'd be no game.

the winning thimble1 of N → πA · OR over the N“exactly one is honestly encoded” → the dealer can't rig itwinner — hidden till reveal
Both proofs are exchanged before any coin moves. Once each side has checked the other's, neither can cheat — and neither the guess nor the winner is revealed until the bet settles. That's the whole trust model, with no third party.

This is the plain-language version. The exact constructions — the algebraic relation behind πA, and the sigma-protocol machinery underneath both — are in the protocol paper and the source.

← Back to Thimbly