Architecture summary
RGS Engine
Server-side
/var/www/multibingo/keno/keno-engine.js — tick 1s, session lifecycle
keno-rng.js — HMAC-SHA256 seeded RNG (provably fair)
keno-paytables.js — Stake-v1 + Classic-Vegas-v1
keno-routes.js — 6 REST endpoints
Database (Postgres)
multibingo_distributor_prod
keno_rooms — 2 rooms seeded
keno_sessions — live
keno_bets — placed/settled/w2g_halted
keno_results — per-bet payout
keno_draw_log — ball-by-ball audit
Compliance
MN §349.211 + IRS W-2G
§349.211 cap: $2,000 max single payout
IRS W-2G threshold: $1,200+ halts payout
Hash chain per session (audit_hash + prev)
Server seed reveal post-draw
Fast (keno-fast)
Crypto-casino cycle · 40 nums · 10 drawn
60-second cycle for Stake / BC.Game layouts. Stake-v1 paytable (Low / Classic / Medium / High).
Cycle 60s
Pool 1–40
Drawn 10
Picks 1–10
Paytable stake-v1
Classic (keno-classic)
US-Lottery cycle · 80 nums · 20 drawn
240-second cycle for MA Lottery / Pragmatic / Caleta / Caveman layouts. Classic-Vegas-v1 paytable.
Cycle 240s
Pool 1–80
Drawn 20
Picks 1–10
Paytable classic-vegas-v1
Monte Carlo runner
Sim 10M spins per (paytable, risk, picks) → RTP convergence + volatility
The math sim runner from multibingo-v2/scripts/math-sim can be extended for Keno. Each combination of (paytable_id, risk, picks) gets a 10M-spin simulation reporting:
RTP — average payout / wager (target 96–99% per Stake industry)
Hit frequency — % of spins with non-zero payout
Volatility class — standard deviation of payouts
Max win observed — biggest payout in sample
▶ Run sim (stub) not started
Theoretical RTP (analytical)
Computed by summing P(hits=h | picks) × multiplier(h) over all h. Useful for cert pack baseline before running 10M sim.
Compute analytic RTP
Fast (keno-fast)
Classic (keno-classic)
Session # Status Opens Closes Players Stake Payout Balls drawn Seed hash
ID User Room Picks Stake Risk Layout Hits Multiplier Payout Status
Session # Server seed Client seed Nonce Balls Audit hash Prev hash
Bet ID User Hits Multiplier Payout (held) Settled at Status
Bet ID User Theoretical payout Capped to Excess Settled at
Form G1 (monthly)
MN charitable gaming form
Generate latest
LG861e (daily)
Daily activity report
Generate latest
IRS W-2G batch
Pending TIN-collected wins
Export CSV