Stock Roast protocol documentation.

This document describes the full product and protocol design. Live deployment details will be published at launch.

01

Introduction

Stock Roast is an on-chain protocol where players lock a stake each round and pick a heat level - the minimum round multiplier they need to win. After the stake window closes, a single round multiplier (the heat point) is drawn from verified public randomness. If it reaches your heat, you COOKED (win). If not, you BURNED (lose).

Tokenised stock certificates heat up during the reveal - dramatizing a result already fixed on-chain before the animation starts. Wins settle as tokenized stock on Robinhood Chain - swapped via Uniswap, not paid as plain ETH.

Built for Robinhood Chain, Stock Roast keeps the timed-round loop familiar to players of other games - one shared outcome, instant resolution - while replacing opaque server rolls with verifiable public randomness and routing wins through a themed stock settlement layer.

Other gamesStock Roast
Server picks multiplier in secretMultiplier from drand after stakes close
Cash out mid-roundPick heat upfront; one shared round multiplier
ETH in / ETH outWins settle as tokenized stock via Uniswap (ETH fallback)
Trust the operatorVerify beacon + formula on-chain

Design principles

  1. Outcome before animation. The multiplier exists on-chain before the reveal. The UI never shows live odds.
  2. Untrusted operators. Anyone can relay randomness; contracts verify signatures.
  3. Player funds first. Withdrawals remain available even when the game is paused.
  4. Win-only fees. Protocol fees apply to gross winnings - never to losses or refunds.
This documentation describes protocol and product design ahead of mainnet beta. It will be updated as the beta opens - contract addresses, verified source on GitHub, network endpoints, deployment artifacts, and other operational details will be added here step by step.
02

The game

In Stock Roast, you commit upfront to a heat level (2× through 10×). One shared round multiplier is drawn for everyone - you do not cash out mid-round.

ConceptMeaning
RoundFixed time window on a global grid. One stake per player per round.
StakeNative ETH locked from your in-game balance.
Heat levelWin threshold (2-10×). Round multiplier must reach this.
Round multiplierThe drawn heat point - same for all players.
COOKEDWin - round multiplier ≥ your heat.
BURNEDLoss - round multiplier below your heat.
03

Round lifecycle

Rounds run on an absolute time grid. Each round id is derived from timestamp - no off-chain scheduler.

Timing model

Round ids are timestamp ÷ roundDuration. All phase boundaries derive from block.timestamp - no off-chain scheduler decides when a round starts or ends.

ParameterRole
Round durationFixed grid length (e.g. 75s). New round id every interval.
Stake windowFirst portion of the round - only time you can lock a stake.
Drand bufferGap after stake close before the eligible beacon round - ensures randomness does not exist while the stake window is open.
Refund timeoutIf no valid beacon is relayed within the limit, anyone can refund all stakes for that round.
PhaseOn-chainPlayer can
OpenAccepting stakesDeposit (if unpaused), lock stake
SealedMultiplier unknownWait
SettledMultiplier storedWatch reveal, claim when ready
RefundedBeacon timeoutClaim full stake return
04

Player journey

BalanceLocationPurpose
WalletYour addressSource for deposits; destination for withdrawals
In-gameGame contractOnly balance you can stake from
  1. Connect a wallet on desktop (extension or WalletConnect).
  2. Deposit native ETH in Robinhood Chain into in-game balance.
  3. Lock stake during the stake window - pick heat 2-10.
  4. Watch reveal - certificates heat toward the on-chain heat point.
  5. Claim tokenized stock on win, or refund when applicable.
  6. Withdraw in-game ETH anytime - even if paused.

Rules

  1. One stake per wallet per round.
  2. Claim unclaimed prior rounds before a new stake.
  3. Deposits require unpaused game; withdrawals do not.
  4. Stale chain data disables staking until refreshed.
05

Heat levels & payouts

Higher heat needs a higher round multiplier to win - but pays more gross if you COOKED. Higher risk, higher reward.

HeatWin if ≥Payout multWin feeGross (0.002 ETH stake)
22.00×1.079×1.00%0.00216 ETH
33.00×1.274×1.05%0.00255 ETH
44.00×1.440×1.10%0.00288 ETH
55.00×1.659×1.22%0.00332 ETH
66.00×1.962×1.35%0.00392 ETH
77.00×2.368×1.50%0.00474 ETH
88.00×3.035×1.70%0.00607 ETH
99.00×4.300×2.20%0.00860 ETH
1010.00×7.000×3.00%0.01400 ETH

Payout multiplier is fixed per heat in the on-chain table (StockRoastMath). Win fee scales linearly from 1% at heat 2 to 3% at heat 10 based on the payout tier - never taken from your stake on a loss.

House edge is encoded in how often each multiplier band appears on the drand curve (edgeBps), not as an upfront cut when you lock a stake.

Gross payout comes from a fixed on-chain table, not stake × heat. House edge is baked into the multiplier curve - not an upfront cut from your stake.

06

Randomness & provably fair

The round multiplier is not chosen by Stock Roast. It comes from drand - a public beacon published on a fixed schedule after stakes close.

  1. Stakes close. Multiplier does not exist.
  2. Beacon published on drand schedule.
  3. Anyone relays on-chain. Verifier checks BLS signature - relayer untrusted.
  4. Multiplier computed from hashed beacon via deterministic on-chain formula.
  5. Reveal animates the stored value.
Stake window closes drand beacon Verify on-chain
Multiplier stored Reveal Claim / settle stakes

Drand quicknet

Stock Roast uses drand quicknet - a public randomness beacon with ~3 second cadence and BLS signatures verifiable on-chain via EIP-2537 precompiles. The eligible drand round number is derived from stake-close time plus the on-chain buffer.

A timing buffer between stake close and beacon eligibility is enforced on-chain so nobody can know the outcome while stakes are open.
07

System architecture

The web app is static - it reads chain state and submits user-signed transactions. Settlement assistance runs off-chain but cannot forge outcomes.

ComponentRole
Game engineBalances, stakes, rounds, settlement, claims, bankroll, pause
Math moduleMultiplier curve, payout table, win-fee gradation
Drand verifierValidates beacon before settlement
Stock routerSwaps net win ETH into tokenized stock via Uniswap
Fee contractSeparate on-chain contract that receives collected win fees
Wrapped nativeWrapped ETH paired against tokenized stocks in Uniswap pools
Uniswap poolWNATIVE / tokenized-stock liquidity per ticker
Tokenized stockOn-chain ERC-20 representing a listed equity on Robinhood Chain
KeeperRelays beacons, batch payouts, stale refunds
08

Stock settlement

Wins route through a stock payout layer into tokenized stocks on Robinhood Chain - on-chain ERC-20s backed by real listed equities. Each round is assigned one ticker from a static list of top-traded tokenized stocks on Robinhood Chain. The certificate theme matches that ticker; settlement is always the same tokenized asset for every player in the round.

  1. Round opens with an assigned stock ticker.
  2. On COOKED → gross payout from the heat table; win fee deducted.
  3. Net ETH is sent to the stock router, wrapped, and swapped on Uniswap.
  4. Claim delivers tokenized stock to your wallet.

If the Uniswap swap fails or liquidity is insufficient, net ETH is credited in-game - you are not left empty-handed.

Uniswap swap path

The game engine resolves wins in ETH terms (gross table minus win fee). Conversion into stock happens in a separate payout module so round logic stays independent of AMM pricing:

  1. Game contract sends net ETH to the stock payout router (only the game can call it).
  2. Router wraps native ETH into wrapped native currency (WNATIVE).
  3. Router swaps WNATIVE → tokenized stock through the configured Uniswap V2-style pool for that ticker.
  4. Tokenized stock is delivered to your wallet on claim.

Each ticker has its own WNATIVE / tokenized-stock pool on Uniswap. The router quotes expected output, applies an on-chain slippage limit, and reverts if the pool cannot fill at that bound. Pool liquidity and market price determine how many stock tokens you receive for a given win - the game table fixes your gross ETH payout; the swap rate is live AMM math.

The router is a payout rail, not a public trading front-end. It accepts swaps only from the game contract during win settlement - players do not route arbitrary trades through it.

Supported stocks

Stock Roast uses a fixed whitelist - the most actively traded tokenized stocks on Robinhood Chain. The list is set at deployment and does not change round to round; only which name is picked varies.

One ticker is assigned per round. Selection is deterministic from the round id (hash modulo list length), so the payout stock is fixed before anyone stakes and every player sees the same certificate theme for that round. The exact tickers and list size will be published at launch.

Each whitelisted ticker must have a wired Uniswap pool and sufficient liquidity before it can appear in rotation. Adding or removing names requires a contract configuration update - not a live UI toggle.

Refunds always return your full stake in ETH - tokenized stocks and Uniswap are win-path only. Losses never touch the swap layer.
09

Fees & bankroll

Service fees apply only on wins - a gradated 1-3% of gross payout by heat level. Losses and refunds pay no fee. Your full stake is always at risk on a loss; the fee is never taken upfront when you lock a stake.

PathSourceDestination
Loss stakePlayer stake on BURNEDGame bankroll - backs future winner payouts
Win fee1-3% of gross payoutAccrued in the game contract, then collected to a separate fee contract
Win principalNet after feeStock router (or ETH fallback)
RefundFull stakeReturned to in-game balance - no fee

Proof of bankroll

The bankroll is the ETH inside the game contract that backs winner payouts, separate from player in-game balances and reserved payouts. Losses and external funding grow it; stock swaps draw from it. The Stats view highlights bankroll size, fees collected, and stocks purchased - the same public metrics shown in the money-flow diagram.

Fee collection

Win fees accrue inside the game contract as rounds settle. They are kept separate from the bankroll and player balances. When enough has accumulated, anyone can trigger a withdrawal that sends the batch to a dedicated fee contract - a separate on-chain address from the game engine. At that point fees do not leave the protocol - they sit in the fee contract and will play an important role in the broader protocol economy. How that works is not public yet; details will be unveiled step by step.

10

Verification

Anyone can audit a settled round without trusting operators.

  1. Read the round record on-chain - multiplier and drand reference.
  2. Fetch the same drand beacon from the public network.
  3. Hash the signature with the contract's algorithm.
  4. Recompute the multiplier from the published formula.
  5. Compare to on-chain value - must match.
Provably fair panelShows
Round / statusPrevious round id and settlement state
Stake closesWhen the stake window ended
Heat pointRound multiplier drawn
Drand roundBeacon reference for lookup
StockRound payout ticker
11

Security

Trust model

  1. Randomness: drand + on-chain verification - operators cannot pick multipliers.
  2. Relayers: Anyone can submit beacons; invalid signatures revert.
  3. UI: Read-only sync - cannot alter stored multipliers.

Pause & upgrades

Administrative pause disables deposits and new stakes. Withdrawals always work. Logic upgrades use a timelocked proxy - players can withdraw during the wait.

Refund & exposure

If no beacon arrives within a timeout, anyone can trigger full stake refunds. Each round caps payout exposure as a fraction of bankroll (maxRoundExposureBps) so a single round cannot drain the entire bank.

Idempotency

Settlement, payout processing, and claims are designed so duplicate calls cannot double-pay or corrupt round state. Failed stock swaps fall back to ETH credit rather than leaving payouts stuck.

Upgrade safety

Logic lives behind a UUPS proxy with a timelocked upgrade path. Storage layout is append-only between versions. Players retain withdraw access throughout any upgrade delay.

12

Multiplier mathematics

The round multiplier is a deterministic function of verified drand randomness. The same beacon input always yields the same multiplier - on-chain and off-chain recomputation must agree.

  1. Hash the beacon. randomness = sha256(drand signature)
  2. Derive a tick. tick = keccak256(randomness) mod 1_000_000
  3. Map tick to multiplier. Piecewise linear bands from 1.00× upward.
  4. Compare to heat. Win when roundMultiplier ≥ heat × 100 (basis points).

Some rounds resolve at exactly 1.00× - a valid outcome where every heat level above 2 BURNED. The curve is public; only the drand input is unknown until after the stake window.

13

UI & reveal experience

The web client is static - it reads chain state over RPC and submits wallet-signed transactions. It cannot influence the stored multiplier; the reveal is pure presentation.

Client-side phases

On-chain settlement can finish before the stage moves to reveal. The UI deliberately holds "stakes closed" until a dramatization window elapses, then plays certificate heat animation, then the stock pick sequence. These timings are client-only - the outcome is already fixed.

Platform notes

  • Desktop: Full wallet connect (browser extension or WalletConnect), deposit, stake, claim, withdraw.
  • Mobile: Blocked for now - desktop with a wallet extension is required to play.
  • Stale RPC: Staking disabled until fresh chain poll - prevents acting on outdated round phase.
  • Skipped round: Connected but no stake → stage shows "No stake locked" during reveal.

Stage vocabulary

LabelMeaning
COOKEDYou won - round multiplier reached your heat
BURNEDYou lost - multiplier below your heat
Heat pointThe drawn round multiplier on the certificate trail
Win columnFixed gross payout for your heat if COOKED
14

Player operations

Every player action is a wallet-signed transaction to the game contract. No custodial backend holds funds.

ActionEffectWhen allowed
deposit()Move ETH from wallet → in-game balanceGame unpaused
withdraw(amount)Move in-game ETH → walletAlways
stake(roundId, amount, heat)Lock stake for current roundStake window open, one per wallet
claim(roundId)Receive stock tokens (or ETH fallback) for a win; or refundAfter round settled/refunded

Anyone can call settle(roundId, signature) with a valid drand beacon - the relayer is not trusted. A keeper process typically batches settlement, payout processing, and stale refunds, but players are never required to wait for it to claim.

Wallet ETH deposit In-game balance stake Round stake
Round stake Settle + win/loss claim Tokenized stock
15

Glossary

TermDefinition
BankrollETH backing winner payouts inside the game contract
BURNEDLoss - multiplier below your heat
COOKEDWin - multiplier at or above your heat
Heat levelWin threshold 2-10× and payout tier
Heat pointRound multiplier drawn for the round
In-game balanceETH credited inside the game contract
KeeperOff-chain process relaying beacons and batch ops
StakeETH locked for a round
Tokenized stockOn-chain ERC-20 equity token received on win via Uniswap
Stock whitelistStatic list of top-traded tokenized stocks on Robinhood Chain
Uniswap poolWNATIVE / tokenized-stock pair used by the payout router
Win feeGradated fee on gross payout - wins only
Drand bufferOn-chain delay ensuring beacon eligibility after stake close
Edge bpsHouse edge parameter baked into multiplier distribution
Payout modeETH or STOCK - frozen per round at creation
Round idtimestamp / roundDuration - global grid identifier
WNATIVEWrapped native currency used as pool base asset
Provably fair panelIn-app readout of previous round audit fields
16

Disclaimer

The Stock Roast web app is a visualization and interface for an autonomous on-chain protocol. Rounds, stakes, settlement, and payouts are enforced by smart contracts on Robinhood Chain - not by the website operator.

The app and this documentation are provided as is, without warranties of any kind. Displayed amounts, timings, animations, and copy may lag, simplify, or omit on-chain detail. Do not rely on the UI alone when deciding to stake or claim.

You are responsible for verifying everything yourself: contract addresses, transaction calldata, round state, multiplier derivation, fee math, and payout delivery. Use the chain explorer, contract source, and the verification steps in this documentation before trusting any outcome or balance shown in the app.

Nothing here is financial, legal, or investment advice. Tokenized stocks and on-chain gaming carry risk - only participate with funds you can afford to lose.