Provably fair
Nobody — not your rival, not Rivl — can choose or see a result in advance. There is no oracle and no operator: every result comes from the two players alone. You don't have to trust us: every number below comes from the chain, and this page recomputes each result in your browser.
Coinflip & Dice: two secrets, one result
- The creator's browser picks a random 32-byte salt and posts only its hash:
keccak256(abi.encode(chainId, arena, creator, 0, salt)). - The rival joins with a fresh random 32-byte seed of their own, in the open.
- The creator reveals the salt. The contract checks it against the hash, then computes
randomWord = keccak256(abi.encode(salt, seed)). - The creator locked the salt before seeing the seed; the rival chose the seed without knowing the salt. If the creator doesn't reveal in time, the rival wins — so hiding a losing result doesn't help.
Suit: commit–reveal
- The creator posts
keccak256(abi.encode(chainId, arena, creator, move, salt))— a hash that hides the move. - The rival picks a move in the open.
- The creator reveals move and salt; the contract rehashes them and rejects anything that doesn't match.
- If the creator doesn't reveal in time, the rival wins.