Skip to documentation
Otherside Developers Back to casino

STONKS CASINO / TECHNICAL DOCUMENTATION

System design and launch status

Stonks Casino is designed to accept APE wagers on ApeChain and pay winning players in stock tokens on Robinhood Chain. This page contains the implementation details intentionally removed from the consumer experience.

CURRENT STATUS Free deterministic preview only. Real-money settlement, vault deposits, NFT claims, staking, and reward streaming remain disabled.
↗

BUILD MORE GAMES

Use the exact model handoff.

The Game Factory handbook defines the concept brief, payout math, deterministic randomness, component lifecycle, test matrix, asset rules, metadata, submission transformation, and final report required for every future Stonks Casino game.

Open the game creation handbook
01

ARCHITECTURE

APE in on ApeChain. Stocks out on Robinhood Chain.

01APECHAINRound quote

Ape Church accepts the wager and locks the edge, liquidity limit, prices, and round randomness.

02GAMEDeterministic result

Equity Bros consumes the supplied randomness. No browser randomness can affect a payout.

03CROSS-CHAINAuthenticated message

The approved bridge transports an idempotent, nonce-protected settlement record.

04ROBINHOOD CHAINStock settlement

The selected stock token is paid to the player’s same EVM address.

The required Ape Church public records are RoundQuote, RoundSettlement, VaultState, StakeActivation, and RewardStream. Exact ABI names and callback semantics will follow the official protocol specification; this project does not invent a mainnet interface.

02

GAME MECHANICS

What happens from wager to result

Both games use the same economic contract: choose a wager, play against a disclosed 5% house advantage, and either lose the wager or finish on a published multiplier. A multiplier tells the player how many times the original wager the winning preview returns. A 5 APE wager settled at 3x therefore displays a 15 APE payout.

01CHOOSESet the wager and rules

The player chooses the preview wager. Equity Bros also locks one of three risk modes; The Fed always uses its 25-sector board.

02COMMITLock the round data

A deterministic seed locks the economic outcome domains before the round unfolds. The interface cannot reroll a bad reveal.

03DECIDEContinue or cash out

Safe progress raises the multiplier. Continuing risks the entire wager; cashing out settles the current published rung.

04RESULTSettle and prove

A loss returns 0x. A win returns wager × multiplier and uniformly assigns one of five stock tickers in its own randomness domain.

CONDITIONAL CHANCEWhat happens next

The probability of surviving the next decision, assuming the player has already reached it.

CUMULATIVE REACHChance from round start

The probability that a new round reaches a particular payout rung without failing first.

EXPECTED RETURN95% at every exit

Reach probability × multiplier equals 0.95 at every permitted cash-out rung. The remaining 5% is the house edge.

Preview versus future settlement

The current games are free deterministic previews. They display APE-denominated results but send no wager, stock payout, bridge message, or wallet transaction. Production settlement remains disabled until the protocol gates below are complete.

03

EQUITY BROS / RULES VERSION 3

Build the deal, then sell before it breaks

Equity Bros is a press-your-luck game about a private-equity hold. The player chooses Safer, Risky, or Extreme before the round begins. Each mode has the same eight deal stages and 25x maximum, but a more aggressive opening multiplier makes the early survival chance lower. Passing a stage moves the deal to the next published rung. Failing any attempted stage loses the complete wager.

  1. Choose the capital structure.Safer uses the conservative ladder, Risky uses the base ladder, and Extreme uses the covenant-lite ladder.
  2. Complete the two mandatory quarters.The player cannot exit after Q1. Passing Q2 unlocks the first cash-out decision.
  3. Exit or risk everything.After Q2 through Q7, exit pays the current rung; continuing attempts the next stage and puts the entire wager at risk.
  4. Finish automatically at Q8.Passing the Exit Auction settles at 25x. A failure at any quarter settles at 0x.
SAFER / CONSERVATIVE31.67% reach the first available exit at Q2
QuarterDeal stageDecision after passMultiplierPass this quarterReach from start
Q1First Board PackMandatory continuation1.8x52.78%52.78%
Q2100-Day PlanCash out unlocks3x60.00%31.67%
Q3Pricing & Sales ExecutionExit or continue5x60.00%19.00%
Q4Working-Capital ImprovementExit or continue8x62.50%11.88%
Q5Add-On AcquisitionExit or continue12x66.67%7.92%
Q6Integration & SynergiesExit or continue18x66.67%5.28%
Q7Debt Paydown & RefiExit or continue22x81.82%4.32%
Q8Exit AuctionAutomatic final exit25x88.00%3.80%
RISKY / BASE CASE25.00% reach the first available exit at Q2
QuarterDeal stageDecision after passMultiplierPass this quarterReach from start
Q1First Board PackMandatory continuation2.2x43.18%43.18%
Q2100-Day PlanCash out unlocks3.8x57.89%25.00%
Q3Pricing & Sales ExecutionExit or continue6.5x58.46%14.62%
Q4Working-Capital ImprovementExit or continue10x65.00%9.50%
Q5Add-On AcquisitionExit or continue15x66.67%6.33%
Q6Integration & SynergiesExit or continue20x75.00%4.75%
Q7Debt Paydown & RefiExit or continue23x86.96%4.13%
Q8Exit AuctionAutomatic final exit25x92.00%3.80%
EXTREME / COVENANT-LITE19.00% reach the first available exit at Q2
QuarterDeal stageDecision after passMultiplierPass this quarterReach from start
Q1First Board PackMandatory continuation3x31.67%31.67%
Q2100-Day PlanCash out unlocks5x60.00%19.00%
Q3Pricing & Sales ExecutionExit or continue8x62.50%11.88%
Q4Working-Capital ImprovementExit or continue12x66.67%7.92%
Q5Add-On AcquisitionExit or continue17x70.59%5.59%
Q6Integration & SynergiesExit or continue21x80.95%4.52%
Q7Debt Paydown & RefiExit or continue23.5x89.36%4.04%
Q8Exit AuctionAutomatic final exit25x94.00%3.80%
P(reach Q1) = (1 − 0.05) ÷ firstMultiplier
P(pass Qk | reached Qk−1) = previousMultiplier ÷ nextMultiplier
P(reach Qk) = (1 − 0.05) ÷ multiplier(Qk)
P(reach any permitted cash-out) × its multiplier = 0.95
Expected multiplier at any cash-out rung = 0.95
04

THE FED / RULES VERSION 1

Hike until something breaks—or pivot first

The Fed is a mines-style game played across 25 economic sectors. Every board contains exactly six hidden breaks and nineteen safe sectors. Choosing a safe sector advances the policy path and unlocks a larger pivot multiplier. Choosing a break ends the round at 0x. Every unrevealed sector has the same chance before its hidden status is known.

  1. Lock the board.The round seed deterministically ranks all 25 sectors and fixes the six hidden break locations before the first selection.
  2. Reveal one sector.A safe sector adds 25 basis points and moves to the next payout rung. A hidden break immediately loses the wager.
  3. Pivot or hike again.After every safe reveal, the player may settle at the displayed multiplier or risk the full wager on another unrevealed sector.
  4. Stop at twelve safe reveals.The game ends automatically at the 98.04x maximum even though seven additional safe sectors remain on the full board.
THE FED PAYOUT LADDERSix hidden breaks · nineteen safe sectors · 5% house advantage
Safe revealsPolicy pathNext reveal safeSomething breaksReach from startPivot multiplier
1+25 BPS76.00%24.00%76.0000%1.25x
2+50 BPS75.00%25.00%57.0000%1.667x
3+75 BPS73.91%26.09%42.1304%2.255x
4+100 BPS72.73%27.27%30.6403%3.1x
5+125 BPS71.43%28.57%21.8859%4.341x
6+150 BPS70.00%30.00%15.3202%6.201x
7+175 BPS68.42%31.58%10.4822%9.063x
8+200 BPS66.67%33.33%6.9881%13.59x
9+225 BPS64.71%35.29%4.5217%21.01x
10+250 BPS62.50%37.50%2.8261%33.62x
11+275 BPS60.00%40.00%1.6957%56.03x
12+300 BPS57.14%42.86%0.9689%98.04x

“Next reveal” is measured immediately before achieving the safe-reveal count shown. For example, after six safe reveals there are 13 safe sectors and six breaks among 19 unrevealed sectors, so the seventh reveal is safe with probability 13 ÷ 19.

After s safe reveals:
P(next sector is safe | s) = (19 − s) ÷ (25 − s)
P(next sector breaks | s) = 6 ÷ (25 − s)
P(reach safe rung k) = product of the first k conditional safe probabilities
multiplier(k) = 0.95 ÷ P(reach safe rung k)
05

FAIRNESS AND REPLAY

Player decisions matter. Presentation effects do not.

Deterministic means the same round seed and the same player decisions reproduce the same economic result. It does not remove player agency: an Equity Bros player chooses when to exit, while a The Fed player chooses which sector to reveal and when to pivot. It prevents animations, timing, refreshes, and browser randomness from secretly changing an already committed round. Domain-separated hashes keep survival, board layout, payout ticker, and presentation data independent even though they share one round seed.

ECONOMIC DOMAINSOutcome-bearing

Equity Bros survival checks, The Fed mine locations, cash-out rungs, and uniform payout-ticker selection determine the result.

PRESENTATION DOMAINSFlavor only

Headlines, voxel animations, adaptive music, alarms, haptics, reveal delays, desk reactions, and camera effects can never alter the board, survival path, multiplier, or ticker.

EXACT ROUND REPLAYVerification, not a reroll

Replay uses the stored seed, mode or board, reveal order, decisions, and terminal result. It cannot create a new payout or substitute a different outcome.

Equity Bros outcome domain: equity-bros:{mode}:outcome:{quarter}
The Fed board domain:       the-fed:v1:mine-layout:{tile}
Payout ticker domain:       separate from every survival or board domain
Presentation domain:        never read by payout calculation
06

ANALYTICS, SHARING, AND SUPPORT

Auditable traction without hidden surveillance

Stonks Casino uses explicit, versioned product events—not unrestricted page autocapture. Before a visitor opts in, no analytics visitor identifier is created and PostHog is not initialized. Global Privacy Control automatically keeps both analytics and replay off. Analytics and masked session replay have separate choices, can be withdrawn at any time, and include a client-held credential for anonymous deletion.

D1 SOURCE OF TRUTHFirst-party, qualified counts

Every accepted event is schema-checked, idempotent, time-bounded, rate-limited, and stored with separate raw, qualified, and verified states. Public reporting reads D1, even if PostHog is unavailable.

SERVER VERIFICATIONMath checked again

The seed service issues a round ID and tamper-evident token. A completion counts publicly only when the server recomputes the engine result and confirms the mode, decisions, outcome, multiplier, and uniformly selected stock.

SHARINGExact preview challenges

A public share ID contains no seed. The challenge API privately resolves it and issues a new session-bound preview token for the same seed. Identical decisions reproduce the round; different decisions may end differently.

Canonical event lifecycle

JourneyCanonical eventsWhat qualifies
Acquisitioncasino_viewed, game_opened, casino_cta_selectedConsented, non-internal, non-development, non-bot activity.
Roundround_started, round_stage_completed, cashout_selected, round_completed, round_replayed, play_again_selectedPublic completion requires a valid server token and exact engine recomputation.
Shareshare_attempted, share_created, share_handoff_succeeded, share_copy_succeeded, share_channel_openedA handoff only means the native or social composer opened; it never claims a post was published.
Referralchallenge_landed, challenge_started, challenge_completedReferral activation requires a verified completion within seven days of the share.
Supportpartner_form_viewed, partner_form_started, partner_lead_submittedLead fields are AES-GCM encrypted and never included in analytics or PostHog.
Qualityclient_error, web_vitalOnly sanitized categories, metric names, numeric values, and allowlisted performance context.

Public metric definitions

Public visitor and cohort cells below 10 display <10. Public pages never expose wallet, lead, visitor, session, or raw-event records. “Preview APE” is simulated play volume only: it is not revenue, deposits, TVL, or gambling turnover. Raw analytics are retained for 180 days, replay recordings for 30 days, inactive identifiers for 13 months, share attribution for 24 months, and closed partner leads for 24 months unless deleted sooner. Privacy-safe daily aggregates are retained for lifetime reporting.

PostHog receives consented events only after D1 persistence and is used for deeper funnels, cohorts, and a 10% sample of separately consented replay sessions. Replay masks all inputs and configured sensitive text, and is completely disabled on administration, NFT application, wallet-signature, and partner-interest states. No analytics record contains a raw IP address, full user agent, URL query string, wallet signature, wallet address, seed, mine layout, lead field, or free-form game text.

PREVIEW BOUNDARY Challenges and every metric on the traction page are hard-gated to the free deterministic preview. Shared seeds and results can never enter future real-money settlement.
07

PAYOUT SETTLEMENT

Uniform, value-neutral stock assignment

A winning round selects one ticker uniformly from NVDA, AAPL, GOOG, TSM, and AMZN. APE/USD and all five stock-token prices are locked when the wager is accepted.

stockTokenAmount =
wagerAPE × lockedAPEPriceUSD × payoutMultiplier ÷ lockedStockTokenPriceUSD

New rounds must pause if any marketed ticker is inactive, halted, stale, undergoing an unresolved corporate action, or lacks sufficient reserved liquidity. Maximum wager is constrained by the least-liquid possible random ticker.

08

STONKS HOUSE VAULT

Solvency before utilization

Required controls include fresh canonical oracles, explicit slippage limits, corporate-action multipliers, per-ticker reserves, free-liquidity accounting, replay protection, retries, message ordering, and finality rules.

09

NFT AND REWARDS

ApeChain eligibility, Robinhood Chain earnings

ELIGIBILITY10 / 3 / 1 weights

Dreamweavers token IDs 0–3 receive 10x weight. Future tokens from the same contract receive 3x. Staked Equity Bros NFTs receive 1x.

Only Dreamweavers from 0xe1df77bcaa64e0cbcd8fbd19ac7c228b03ae0552 qualify.

REWARD STREAM80% / 20%

80% of realized net creator revenue funds NFT rewards; 20% funds operations. Net excludes protocol fees, bridge and swap costs, and required reserves.

Each funded hour buys equal value of all five stock tokens and streams that basket over 60 minutes by active weight.

Equity Bros NFTs hard-stake in ApeChain escrow. Dreamweavers register non-custodially because their ERC-5192 tokens cannot transfer. Cross-chain activation and deactivation require authenticated acknowledgements. Accrued rewards remain claimable after deactivation.

10

CONFIGURATION

Addresses and current deployment state

ADMIN / REVENUE0x191f77208F6EaB1ab223EE402DC32863AC212ACE
DREAMWEAVERS ERC-51920xe1df77bcaa64e0cbcd8fbd19ac7c228b03ae0552
EQUITY BROS ERC-721Not deployed
APE CHURCH STONKS VAULTOfficial specification pending

Initial administration uses two-step ownership transfer so control can later move to a Safe or stronger signer. Submission contact: Telegram sixtheplug.

11

PRODUCTION GATES

No implicit mainnet switch

No mainnet vault, bridge adapter, staking escrow, or reward-streaming contract will be deployed until the missing protocol interfaces are approved.