Ape Church accepts the wager and locks the edge, liquidity limit, prices, and round randomness.
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.
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 handbookARCHITECTURE
APE in on ApeChain. Stocks out on Robinhood Chain.
Equity Bros consumes the supplied randomness. No browser randomness can affect a payout.
The approved bridge transports an idempotent, nonce-protected settlement record.
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.
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.
The player chooses the preview wager. Equity Bros also locks one of three risk modes; The Fed always uses its 25-sector board.
A deterministic seed locks the economic outcome domains before the round unfolds. The interface cannot reroll a bad reveal.
Safe progress raises the multiplier. Continuing risks the entire wager; cashing out settles the current published rung.
A loss returns 0x. A win returns wager × multiplier and uniformly assigns one of five stock tickers in its own randomness domain.
The probability of surviving the next decision, assuming the player has already reached it.
The probability that a new round reaches a particular payout rung without failing first.
Reach probability × multiplier equals 0.95 at every permitted cash-out rung. The remaining 5% is the house edge.
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.
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.
- Choose the capital structure.Safer uses the conservative ladder, Risky uses the base ladder, and Extreme uses the covenant-lite ladder.
- Complete the two mandatory quarters.The player cannot exit after Q1. Passing Q2 unlocks the first cash-out decision.
- 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.
- Finish automatically at Q8.Passing the Exit Auction settles at 25x. A failure at any quarter settles at 0x.
| Quarter | Deal stage | Decision after pass | Multiplier | Pass this quarter | Reach from start |
|---|---|---|---|---|---|
| Q1 | First Board Pack | Mandatory continuation | 1.8x | 52.78% | 52.78% |
| Q2 | 100-Day Plan | Cash out unlocks | 3x | 60.00% | 31.67% |
| Q3 | Pricing & Sales Execution | Exit or continue | 5x | 60.00% | 19.00% |
| Q4 | Working-Capital Improvement | Exit or continue | 8x | 62.50% | 11.88% |
| Q5 | Add-On Acquisition | Exit or continue | 12x | 66.67% | 7.92% |
| Q6 | Integration & Synergies | Exit or continue | 18x | 66.67% | 5.28% |
| Q7 | Debt Paydown & Refi | Exit or continue | 22x | 81.82% | 4.32% |
| Q8 | Exit Auction | Automatic final exit | 25x | 88.00% | 3.80% |
| Quarter | Deal stage | Decision after pass | Multiplier | Pass this quarter | Reach from start |
|---|---|---|---|---|---|
| Q1 | First Board Pack | Mandatory continuation | 2.2x | 43.18% | 43.18% |
| Q2 | 100-Day Plan | Cash out unlocks | 3.8x | 57.89% | 25.00% |
| Q3 | Pricing & Sales Execution | Exit or continue | 6.5x | 58.46% | 14.62% |
| Q4 | Working-Capital Improvement | Exit or continue | 10x | 65.00% | 9.50% |
| Q5 | Add-On Acquisition | Exit or continue | 15x | 66.67% | 6.33% |
| Q6 | Integration & Synergies | Exit or continue | 20x | 75.00% | 4.75% |
| Q7 | Debt Paydown & Refi | Exit or continue | 23x | 86.96% | 4.13% |
| Q8 | Exit Auction | Automatic final exit | 25x | 92.00% | 3.80% |
| Quarter | Deal stage | Decision after pass | Multiplier | Pass this quarter | Reach from start |
|---|---|---|---|---|---|
| Q1 | First Board Pack | Mandatory continuation | 3x | 31.67% | 31.67% |
| Q2 | 100-Day Plan | Cash out unlocks | 5x | 60.00% | 19.00% |
| Q3 | Pricing & Sales Execution | Exit or continue | 8x | 62.50% | 11.88% |
| Q4 | Working-Capital Improvement | Exit or continue | 12x | 66.67% | 7.92% |
| Q5 | Add-On Acquisition | Exit or continue | 17x | 70.59% | 5.59% |
| Q6 | Integration & Synergies | Exit or continue | 21x | 80.95% | 4.52% |
| Q7 | Debt Paydown & Refi | Exit or continue | 23.5x | 89.36% | 4.04% |
| Q8 | Exit Auction | Automatic final exit | 25x | 94.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
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.
- Lock the board.The round seed deterministically ranks all 25 sectors and fixes the six hidden break locations before the first selection.
- Reveal one sector.A safe sector adds 25 basis points and moves to the next payout rung. A hidden break immediately loses the wager.
- 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.
- 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.
| Safe reveals | Policy path | Next reveal safe | Something breaks | Reach from start | Pivot multiplier |
|---|---|---|---|---|---|
| 1 | +25 BPS | 76.00% | 24.00% | 76.0000% | 1.25x |
| 2 | +50 BPS | 75.00% | 25.00% | 57.0000% | 1.667x |
| 3 | +75 BPS | 73.91% | 26.09% | 42.1304% | 2.255x |
| 4 | +100 BPS | 72.73% | 27.27% | 30.6403% | 3.1x |
| 5 | +125 BPS | 71.43% | 28.57% | 21.8859% | 4.341x |
| 6 | +150 BPS | 70.00% | 30.00% | 15.3202% | 6.201x |
| 7 | +175 BPS | 68.42% | 31.58% | 10.4822% | 9.063x |
| 8 | +200 BPS | 66.67% | 33.33% | 6.9881% | 13.59x |
| 9 | +225 BPS | 64.71% | 35.29% | 4.5217% | 21.01x |
| 10 | +250 BPS | 62.50% | 37.50% | 2.8261% | 33.62x |
| 11 | +275 BPS | 60.00% | 40.00% | 1.6957% | 56.03x |
| 12 | +300 BPS | 57.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)
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.
Equity Bros survival checks, The Fed mine locations, cash-out rungs, and uniform payout-ticker selection determine the result.
Headlines, voxel animations, adaptive music, alarms, haptics, reveal delays, desk reactions, and camera effects can never alter the board, survival path, multiplier, or ticker.
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
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.
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.
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.
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
| Journey | Canonical events | What qualifies |
|---|---|---|
| Acquisition | casino_viewed, game_opened, casino_cta_selected | Consented, non-internal, non-development, non-bot activity. |
| Round | round_started, round_stage_completed, cashout_selected, round_completed, round_replayed, play_again_selected | Public completion requires a valid server token and exact engine recomputation. |
| Share | share_attempted, share_created, share_handoff_succeeded, share_copy_succeeded, share_channel_opened | A handoff only means the native or social composer opened; it never claims a post was published. |
| Referral | challenge_landed, challenge_started, challenge_completed | Referral activation requires a verified completion within seven days of the share. |
| Support | partner_form_viewed, partner_form_started, partner_lead_submitted | Lead fields are AES-GCM encrypted and never included in analytics or PostHog. |
| Quality | client_error, web_vital | Only sanitized categories, metric names, numeric values, and allowlisted performance context. |
Public metric definitions
- Activated player: a consented visitor completing a first server-verified preview round.
- Retention: an activated player starting another verified round on day 1, 7, or 30.
- Share rate: activated players creating at least one share divided by activated players.
- Referral activation: a challenge landing that completes a verified round within seven days.
- Viral coefficient: average valid challenge landings per activated sharer multiplied by landing-to-activation conversion.
- Partner conversion: valid partner leads divided by qualified unique visitors.
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.
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.
STONKS HOUSE VAULT
Solvency before utilization
- LPs deposit APE on ApeChain through a new Ape Church product, not the existing House Pool.
- The approved bridge converts deposits into an equal-value five-stock basket on Robinhood Chain.
- LP shares track combined stock-market P&L and casino P&L in USD NAV terms.
- Settled and in-flight player payouts are reserved before any LP redemption.
- Redemptions return the maximum available pro-rata in-kind basket without consuming payout reserves.
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.
NFT AND REWARDS
ApeChain eligibility, Robinhood Chain earnings
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.
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.
CONFIGURATION
Addresses and current deployment state
0x191f77208F6EaB1ab223EE402DC32863AC212ACE0xe1df77bcaa64e0cbcd8fbd19ac7c228b03ae0552Not deployedOfficial specification pending
Initial administration uses two-step ownership transfer so control can later move
to a Safe or stronger signer. Submission contact: Telegram sixtheplug.
PRODUCTION GATES
No implicit mainnet switch
- Brutal v3 deterministic preview, replay, and statistical tests
- Otherside Developers consumer experience and attendee workflow
- Five-stock availability monitoring
- Official Ape Church vault, bridge, quote, and settlement specification
- Source-reviewed stock-token deployments, router, and oracle policy
- ApeChain and Robinhood Chain testnet implementation
- Independent contract, economic, bridge, and frontend security reviews
- Required eligibility policy and capped production pilot approval
No mainnet vault, bridge adapter, staking escrow, or reward-streaming contract will be deployed until the missing protocol interfaces are approved.