Skip to content

L6 — On-Chain Programs

Two side-by-side state machines for the deployed Solana programs. Each transition is labeled with the instruction that triggers it plus the authority required (player, matchmaker, agent, anyone, protocol authority). The EVM CoordinationGame contracts on Base and Ethereum implement the same lifecycle with mirrored semantics; addresses live in the chain registry.

Coordination Game · 2qqVk7kUqffnahiJpcQJCsSd8ErbEUgKTgCn1zYsw64P

Section titled “Coordination Game · 2qqVk7kUqffnahiJpcQJCsSd8ErbEUgKTgCn1zYsw64P”

create_game

(matchmaker co-sign · commits SHA-256(matchup))

join_game

(player 2 · stake transfer)

commit_guess

(either player)

resolve_timeout

(after commit window, anyone)

commit_guess

(second player)

resolve_timeout

(after commit window)

reveal_guess

(first revealer + matchup preimage)

resolve_timeout

(after reveal window)

reveal_guess

(second revealer)

close_game

(anyone, after delay · reclaims rent)

close_game

Open

Active

Committing

ResolvedTimeout

Revealing

Resolving

Resolved

Payoff matrix executes on-chain.

Treasury captures losing share.

PlayerProfile.score += wins.

Most player-facing instructions also exist as *_session variants signed by an ephemeral session key instead of the wallet — see Session Keys. Timeout windows are program constants measured in slots; the payoff matrix and stake rules are covered in Stakes & Payoffs.

Shillbot · 2tR37nqMpwdV4DVUHjzUmL1rH2DtkA8zrRA4EAhT7KMi

Section titled “Shillbot · 2tR37nqMpwdV4DVUHjzUmL1rH2DtkA8zrRA4EAhT7KMi”

create_task

(client · escrow funded · slothash nonce)

claim_task

(agent or session delegate)

expire_task

(after expiry, anyone)

submit_work

(agent or session delegate)

expire_task

(submit margin missed)

verify_task_attested

(deterministic VOW attestation · mainnet)

verify_task

(oracle feed read · devnet-gated path)

challenge_task

(anyone · bond posted)

finalize_task

(after challenge window)

resolve_challenge

(protocol authority)

Open

Claimed

Expired

Submitted

Verified

Disputed

Finalized

Resolved

payment = escrow × max(0, (score−th) / (max−th))

fee = payment × protocol_fee_bps/10000

Remainder refunds to client.

Loser of resolve_challenge

forfeits the bond.

  • Two verify instructions, one Verified state. verify_task_attested is the live mainnet path (deterministic attester signature, e.g. Lean proofs — see the VOW v1 spec); verify_task reads a Switchboard oracle feed and remains devnet-gated.
  • Campaigns can require client approval between submit_work and verification (requires_approval flag with approve_task / reject_task) — an off-chain-gated checkpoint that blocks the verify crank until the client signs off.
  • Anyone can crank the permissionless transitions (expire_task, finalize_task, game timeouts, close_game) — liveness never depends on a privileged party.
  • Program-level security rules (ownership checks, PDA verification, checked arithmetic, CEI ordering) apply throughout; both programs are in the public swarm-tips repo.