SHOOK / OFFICIAL PROTOCOLDocumentation
MAINNET EDITIONOpen SHOOK
Games / SHOOK

Tic-Tac-Toe

Matched SHOOK wagers, signed moves, and an onchain path when cooperation fails.

Escrow and starting

The creator registers an ephemeral EOA session signer and escrows a wager. A second main wallet joins within five minutes, registers a different session signer, and matches the wager. Official wagers range from 1 to 10,000,000 SHOOK per player.

Joining fixes a drand round at or after the join timestamp plus one minute. Either participant can call start or startWithSignature before the start deadline, five minutes after the round’s scheduled time. The randomness coordinator accepts public relays, but these game start calls themselves require a participant wallet.

Gasless ordinary moves

Registered session signers sign EIP-712 game states instead of asking the main wallet to send a transaction for every move. A state includes the game ID, sequence, board, last cell, next player, outcome, and parent digest. Both participants can acknowledge the same state.

The onchain game verifies session signatures and deterministic board rules for settlement or disputes. The relay transports messages; it cannot manufacture valid signatures. Keep access to the session key and signed checkpoint while a game is open.

Board rules

The 3×3 board stores two bits per cell. A is mark 1 and B is mark 2; 0 is empty. The contract checks move counts, starter parity, next player, last mover, valid cell replacement, parent state hash, and absence of an earlier winning line. A line of three ends the game; nine filled cells without a line is a draw.

Cooperative settlement

A valid terminal state signed by both session signers can be submitted through settleCooperative. A decisive result leaves the winner the combined pot less a 1% game fee. Both players’ wagers count as lottery weight through the fee router. A draw refunds one wager to each player and creates no game fee or lottery weight.

For two wagers of 1,000 SHOOK, the decisive payout is 1,980 SHOOK, with 10 SHOOK to reserve and 10 SHOOK to the lottery. The winner separately calls claimWinnings; draws and cancellations use claimRefund.

Without cooperation

A signed terminal move can be proposed from an agreed checkpoint and finalized after a five-minute response window. Either participant can open an onchain dispute from an agreed ongoing checkpoint. Subsequent valid signed moves can be relayed by anyone. Timeouts, resignation, and equivocation proofs provide terminal paths. See Disputes and recovery.

Unjoined or unstarted games

Anyone can cancel an unjoined game after its join deadline. Anyone can cancel a matched but unstarted game after its start deadline. The relevant participants then claim their escrowed wagers. Unlike Coinflip’s timely-authentication rule, Tic-Tac-Toe must actually start within its participant start window.

Source reference

Checked against the source shipped with this documentation. Contract calls and units are detailed in the contract reference.

Imported source files 31

Supporting contracts, interfaces, and libraries imported by the sources above, including their dependencies.

SHOOK docs Official protocol · Mainnet parameters