On-chain Tic-Tac-Toe

How it works

What this app actually does on the contract side.

The shape of it

Two smart contracts, deployed independently. They never call each other.

  • TicTacToe — player versus player. Holds both stakes in escrow.
  • SoloTicTacToe — practice against the contract. No stakes.

There is no server and no database. The board and the win check live on chain; this page only reads and writes them.

How the money moves

  1. The creator sends a stake. The contract holds it.
  2. An opponent matches it. The pot is now twice the stake.
  3. When the game is decided, the payout is credited inside the contract.
  4. Nothing is transferred until the winner calls withdraw.

That fourth step is deliberate. If settling a game also pushed the funds out, a winner whose wallet rejects incoming transfers would make the settlement itself fail — freezing the opponent's money too. Crediting first and paying on request keeps one player's problem from becoming everyone's.

Draws and abandoned games

A full board with no line refunds both stakes and takes no fee.

If an opponent simply walks away, the clock runs out and the waiting player claims the pot by forfeit. Without that, anyone facing a loss could freeze both stakes forever by doing nothing.

About the CPU games

Tic-tac-toe is a solved game: perfect play on both sides always draws. Betting against a perfect opponent can only break even at best, which is why practice games carry no stake.

Three difficulties. Normal only sees wins and immediate losses, so a fork — two threats at once — beats it. Hard implements the full strategy, and an exhaustive test proves it never loses.

Testnets only

This app does not connect to mainnet. It is absent from the list of networks the wallet is offered, so real funds can never be staked here.