Skip to handoff
Otherside Developers Back to docs

STONKS CASINO / GAME FACTORY

One exact standard for every new game

This is the model handoff for turning a finance concept into a deterministic, tested, Ape Church submission-ready casino game without inventing protocol behavior.

LAST VERIFIED August 7, 2026 · Re-check official Ape Church rules before every new game.
01

NON-NEGOTIABLE CONTRACT

Wager in. Multiplier out.

APEINPUTOne wager amount

Validated and submitted through the Ape Church host.

RANDOMNESSChain supplied

The game consumes protocol randomness and never creates payout randomness.

0x+OUTPUTOne multiplier

Zero for a loss or one declared, liquidity-bounded win multiplier.

5HOST LAYERStock payout

The approved Stonks host converts value into one of five stock tokens.

Stock conversion, price locking, reserves, bridging, and Robinhood Chain settlement stay outside the individual game. If Ape Church has not supplied an interface, the implementation must stop at a typed adapter and label the feature as unavailable.

02

EXECUTION ORDER

Concept to reviewed pull request

  1. Read current authority.Official build docs, template README and SKILL.md, submissions README, then the canonical handoff.
  2. Freeze the concept.Write the wager, player choices, outcomes, maximum multiplier, house edge, randomness inputs, and retail rule in one brief.
  3. Approve the math first.Produce exact probabilities, expected return, liquidity ceiling, and a deterministic simulation before UI work.
  4. Create a new template repository.Use the official GitHub template. Do not fork it and do not build the submission inside Trade Bangers.
  5. Implement the lifecycle.Typed state, guarded actions, exact replay, complete reset, and cleanup on unmount.
  6. Build the retail experience.Plain rules, visible odds, mobile controls, reduced motion, mute, and no fake near misses.
  7. Run every check.Exact math, deterministic replay, large seed samples, double clicks, cleanup, TypeScript, lint, build, assets, and console.
  8. Transform only allowed files.Components, assets, and metadata move into the three exact submission paths.
  9. Open one PR.One game only. Fix automated checks and reviewer feedback. A merge is preview approval, not a guaranteed live launch.
03

FAIRNESS

Hard games, disclosed math

DISCRETE OUTCOMESWeighted payout table
Σ(pᵢ × mᵢ) = 1 − houseEdge
Σpᵢ = 1
mᵢ ≥ 0
PROGRESSIVE GAMESEqual value at every exit
P(reach rung k) = (1 − h) ÷ mₖ
P(pass k | k−1) = mₖ₋₁ ÷ mₖ
P(reach k) × mₖ = 1 − h

Volatility may create frequent losses and rare large wins, but it may not hide a larger house edge. Every displayed probability must come from the exact configuration used by the deterministic resolver.

04

VERIFICATION

Submission-ready means proven

EXACTConfiguration

Edge, ladders, tables, limits, mandatory steps, and expected value at every outcome.

DETERMINISTICReplay

Same seed, choices, path, presentation, result, and multiplier with no new transaction.

STATISTICAL100k+ seeds

Observed results agree with theoretical probabilities within a declared tolerance.

ADVERSARIALActions

Double clicks, invalid phases, stale replay, protocol rejection, and settlement exactly once.

RUNTIMECleanup

Timers, frames, listeners, sound, refs, canvas, and WebGL resources are released.

PRODUCTEvery screen

Desktop, tablet, narrow mobile, keyboard, focus, reduced motion, mute, and no console errors.

npx tsc --noEmit
npm run lint
npm run build
# plus the template's current automated test command
05

THREE ALLOWED TREES

Nothing extra enters the PR

components/my-game/
  → components/games/<game-slug>/

public/my-game/
  → public/submissions/<game-slug>/

metadata.json
  → submissions/<team-slug>/<game-slug>/metadata.json

Rewrite every asset URL from /my-game/... to /submissions/<game-slug>/.... Card art must be 1:1, banner art 2:1, total assets below 10 MB, and audio MP3 or OGG only. Revenue shares must total exactly 100 and all addresses must be re-confirmed before submission.

06

MODEL INSTRUCTION

Start from the canonical Markdown

The complete handoff contains the concept schema, typed state model, lifecycle contracts, cleanup pattern, metadata example, exact test matrix, submission transformation, required delivery report, and a copy-paste prompt for another model.

Read the full machine-ready handoff