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

  1. The creator's browser picks a random 32-byte salt and posts only its hash: keccak256(abi.encode(chainId, arena, creator, 0, salt)).
  2. The rival joins with a fresh random 32-byte seed of their own, in the open.
  3. The creator reveals the salt. The contract checks it against the hash, then computes randomWord = keccak256(abi.encode(salt, seed)).
  4. 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

  1. The creator posts keccak256(abi.encode(chainId, arena, creator, move, salt)) — a hash that hides the move.
  2. The rival picks a move in the open.
  3. The creator reveals move and salt; the contract rehashes them and rejects anything that doesn't match.
  4. If the creator doesn't reveal in time, the rival wins.