Choose your move, hide it until both commit
Challenge a visible player with an equal stake and best-of 1, 3, 5, 7 or 9. Rock beats scissors, scissors beats paper and paper beats rock. A tied round awards no point and replays.
The browser commits a SHA-256 hash binding the move, a random 32-byte salt, program, match, player and round. A reveal is accepted only after both players have committed. A player cannot change a committed losing move after seeing the opponent’s choice.
Player choices, not an oracle roll
Solana verifies signed move authorizations, checks the revealed choice against the commitment and updates the match score. Fairness here comes from hidden commitments and enforced reveal rules; no paid randomness oracle chooses the winner.
The session authorization is scoped to moves in the match. It is not a general token withdrawal authority. Protect the original browser profile because it stores unrevealed move secrets.
Refusing to reveal cannot erase a loss
Commit and reveal phases have independent deadlines. A participating player can win by forfeit if the opponent fails to act; if neither acts, both stakes refund under the timeout rules. Keep the browser available for automatic reveal.
The winner receives 99% of the pot and the remaining 1% goes to the game bank. SOL processing costs are separate. Verify the final score and receipt rather than treating a sent challenge as a finished match.