Fairness
How CivBet stays fair.
Every game on CivBethas a documented house edge. The rules engines are open source, all randomness comes from the operating system's cryptographic RNG, and every bet and payout lands in a permanent public ledger. The numbers below are pulled live from that ledger — not stage-managed.
By game
Each card shows the documented edge, a one-line description of the math, and the realised hold from the last 30 days. With enough rounds, realised should converge on documented — if it doesn't, something is off and we want to know about it.
Slots
Per cell: independent weighted draw (coal 38% → diamond 2%). 7 paylines, per-line stake = bet/7. Pays on 3/4/5 consecutive matches from the left.
One crypto.randomInt(0, 100) per cell (15 cells per spin), mapped onto symbol weights.
Roulette
European single-zero wheel (37 pockets). Every bet type has coverage × payout_multiplier = 36, so the house edge is exactly 1/37 across the board.
One crypto.randomInt(0, 37) per spin chooses the winning pocket.
Blackjack
Single deck, dealer hits soft 17, blackjack pays 3:2, no split / no insurance / no surrender. ~0.5% edge against optimal basic strategy.
Fisher–Yates shuffle of a 52-card deck driven by crypto.randomInt at the start of each hand.
Crash
3% instant-bust probability on the 1/(1-r) crash curve. Cash-out time is server-authoritative; multiplier is clamped to the round's crash point.
One crypto.randomInt(0, 1_000_000) per round seeds the crash point.
Mines
Multiplier = 0.99 × C(25, k) / C(25-m, k) where m is the mine count and k is the safe reveals. Floored to 2dp in the house's favour.
Partial Fisher–Yates over indices 0..24 places mines uniformly at random at bet time.
Coin Flip
Fair 50/50 coin. Winning bets pay 1.98× the stake (1% house edge baked into the payout, not into the coin).
One crypto.randomInt(0, 2) per flip selects heads or tails.
How the randomness works
- Cryptographic RNG. Every random draw comes from
node:crypto.randomInt— the same primitive used for generating cryptographic keys. JavaScript'sMath.randomis banned in the games directory and the test suite enforces it. - Server-authoritative. The client never decides outcomes. It sends your bet and your choice; the server independently rolls the result and writes both the stake and the payout to the ledger in a single atomic transaction.
- Per-round audit trail. Every completed round is inspectable from your History — click Auditon any row to see the post-round state (Crash point, mine layout, dealer cards, slot grid, etc.) and, for multi-step games, the server seed stored on the round's session row. The seed currently functions as a stable identifier; a commit-reveal upgrade on the roadmap will make it cryptographically tied to the outcome so anyone can replay and verify.
- Immutable ledger. Every bet and every payout lands as a row in our
transactionstable. The realised-hold numbers on this page are computed live from those rows; there's no separate “what we want to show” table.
Verify it yourself
Don't take our word for it — read the code. Each game's rules engine is a single small file, and the math above is right there in plain TypeScript.
| Game | Rules engine |
|---|---|
| Slots | slots-data.ts |
| Roulette | roulette-data.ts |
| Blackjack | blackjack.ts |
| Crash | crash.ts |
| Mines | mines.ts |
| Coin Flip | coinflip.ts |
| RNG | rng.ts |