
Dice
Independent verification, backed by open-source code.
- Live Bets Verified
- 6,700
- Parity Rate
- 100%
- Simulated RoundsSimulated RTP 99.922%
- 98M
- Simulated RTP 99.922%
- Proven RTP · base tier
- 99.9%
- Base stake tier
Verification pipeline
Real bets. Independently reproduced.
Placed anonymously at Duel.com. We rebuilt the game logic from scratch and matched all 6,700 recorded outcomes.
The casino result, reproduced.
- Casino outcome
- 36.01 · Win
- Our reproduction
- 36.01 · Win
- Recorded payout
- $0.0116
- Seed Hash IntegrityPass
- Commitment ChainPass
- Hash ConsistencyPass
- Result RecomputationPass
- Client Seed InfluencePass
- Payout MathPass
- Win Condition & RangePass
- Multiplier FormulaPass
- Win Chance FormulaPass
- Population & PhasesPass
- Dataset Hash & DomainsPass
- Anti-Circularity + ClaimPass
- Epoch SizePass
- Client Seed VariationPass
- Simulation Pass 1Pass
- Cherry-Pick Test (Pass 2)Pass
- Configuration CoveragePass
- Draw Bias BoundPass
- Multiplier MonotonicityPass
- Live-Sample FitPass
The repo is the credential. Every finding ships as code. At release v1.3.1, npm test runs 20 unit tests and all 21 scored steps against the 6,700 captured bets, then compares the fresh results with the committed ones. It prints 20 PASS + 1 capture-origin FLAG, 0 hard fails, REPRODUCED, and exits 0.
PROVABLY FAIR — Full Pass. We captured 6,700 real Dice bets on Duel.com on 11 April 2026 and recomputed every roll and payout with our own implementation, written from the specification. 20 of 21 steps pass, with one capture flag (four nonces our capture script missed, not a Duel issue) and no hard fails. Certified under ProvablyFair.org Framework 1.1 at release v1.3.1.
Audit Verdict
| Check | Result | Evidence |
|---|---|---|
| Overall Status | Pass | PROVABLY FAIR — Full Pass. 20 of 21 steps pass, 1 capture flag, 0 hard fails (Framework 1.1, release v1.3.1). The capture flag is Step 4: limited by our capture script, not a Duel issue. Covers roll-over bets at the base stake tier. |
| Proven RTP | Pass | 99.9000% at the base stake tier: the win chance from the 10,001-value roll range times the published multiplier is 0.999 (Step 13). RTP claim (RTP-CLAIM 1.2.0): Duel's game settings state a 0.1% edge for the base tier; 0 of 9,997 targets beyond the ±0.1 pp band: PASS (Step 13). Simulated: 99.922% over 98M rounds |
| Live ↔︎ Verifier Parity | Pass | 6,700 / 6,700 rolls reproduced (Step 5). Both ProvablyFair.org verifiers, this site's and the main site's, and Duel's Verify-tab code, run unmodified as a cross-check, reproduce all 6,700 (Step 5) |
| Commit-Reveal System | Pass | 134 / 134 revealed server seeds hash to their commitments; 138 promotions and 137 forward links plus the pre-capture link are consistent (Steps 1–3). That each commitment was shown before its bets rests on the capture's records |
| Nonce Audit | Capture flag | 130 / 134 epochs complete as captured, no repeats, none out of order. Four nonces were missed when our capture script retried a request: limited by our capture script, not a Duel issue (Step 4) |
| Client Seed | Pass | A genuine HMAC input: a wrong client seed changes 670 / 670 sampled rolls, and an empty one leaves 1 of 6,700 unchanged against a chance bound of 5.76 (Step 6); the 500 Phase D bets recompute under 10 player-set seeds (Step 15). Duel's default seed is generated in the browser and players can set their own |
| RNG Analysis | Pass | Our own HMAC-SHA256 implementation, written from the specification, reproduces every roll; rejection sampling leaves a bias of exactly 0, since the accepted values are 429,453 × 10,001 (Steps 5, 19) |
| Payout Logic | Pass | 2,519 wins and 4,181 losses settled exactly on the served 18-decimal grid, no tolerance; every served multiplier equals 0.999 / win chance rounded to 18 decimals, and every win chance matches to 14 decimal places (Steps 7, 9, 10) |
| Scaling House Edge | Info | Every captured bet was priced at the 0.1% tier. Duel's 5 October 2026 config raises the edge with stake, up to 1.0%, above a per-range threshold ($5.01 at target 9,998 to $2,750,308.34 at targets 2–99). Explained from the config, not certified |
| Anti-Circularity | Pass | The win probability comes from a literal tally of the 10,001 roll values on all 3,862 served targets, not the casino's win_chance field; RTP = 0.999 at all 9,997 targets, within 1.11 × 10⁻¹⁶ (Step 13) |
| Integrity Checks | Pass | 15 standard fairness integrity tests — 14 pass, 1 N/A (single-step game) |
| Determinism | Pass | Every roll recomputes from (serverSeed, clientSeed, nonce); the target and stake are not inputs to the roll (Step 5) |
| Reproducibility | Pass | npm test at v1.3.1: REPRODUCED, exit 0. Runs write to outputs/run/ and are compared with the committed results |
Overall StatusPass
v1.3.1). The capture flag is Step 4: limited by our capture script, not a Duel issue. Covers roll-over bets at the base stake tier.Proven RTPPass
Live ↔︎ Verifier ParityPass
Commit-Reveal SystemPass
Nonce AuditCapture flag
Client SeedPass
RNG AnalysisPass
Payout LogicPass
Scaling House EdgeInfo
Anti-CircularityPass
win_chance field; RTP = 0.999 at all 9,997 targets, within 1.11 × 10⁻¹⁶ (Step 13)Integrity ChecksPass
DeterminismPass
ReproducibilityPass
npm test at v1.3.1: REPRODUCED, exit 0. Runs write to outputs/run/ and are compared with the committed resultsWhat Was Audited
✓ Audited
- Every roll is set by the server seed, client seed and nonce, and recomputes exactly (6,700 / 6,700)
- Your target and stake are not inputs to the roll
- Revealed server seeds match their commitments (134 / 134), and the 138 seed records fit together
- Your client seed is a genuine input: changing it changes the roll
- Every payout is exact, and every served multiplier equals 0.999 / win chance
- Theoretical RTP is 99.9000% at every roll-over target, matching the 0.1% edge Duel's game settings state for the base stake tier
- The roll is the same at $0.01 and $10
- Players can check every bet
What Audit Excludes
- Scaling house edge above the base stake tier (up to 1.0%) — explained from the config in S4.5
- Max win
- Rakeback, Zero Edge and promotions — 99.9% is the proven RTP; these are operator-side
- Cross-account sampling
- Duel's server code and seed generation — outcomes are verified from the captured rounds and their commitments
- Infrastructure or server security
- Wallet, payments, or operational systems outside game logic
What Audit Covers
| Area | Description |
|---|---|
| Commit-Reveal System | SHA-256 server seed hashing, the forward commitment chain, reveal on rotation |
| Client Seed Origin | Browser-generated default, player-customisable; the capture's own seeds disclosed |
| Seed Handling | Client seed control, nonce lifecycle, seed pair rotation |
| RNG Analysis | HMAC-SHA256 with rejection sampling over 10,001 values, written from the specification; bias bound |
| Payout Logic | Win condition, exact 18-decimal multipliers and payouts, win chance formula, stake invariance (Phase C) |
| Live Parity | Our recomputation, Duel's Verify-tab code (cross-check) and both ProvablyFair.org verifiers against every live bet |
| RTP Validation | Anti-circularity (lattice tally), RTP claim rule, 98M-round simulation, cherry-pick test (Pass 2) |
| Fairness Integrity | Standard integrity matrix — 15 tests across nonce, seed commitment, determinism, isolation, and payout enforcement |
| Game Profile Coverage | All 30 Dice profile checks mapped to a step, a package check, or n/a |
What Audit Guarantees
- Outcomes are deterministic and reproducible from the recorded inputs
- Live results match our recomputation for every captured bet (6,700 / 6,700)
- At the base stake tier, theoretical RTP is 99.9000% at every roll-over target, from the roll range and the multiplier formula alone
- Duel's stated edge holds under the RTP claim rule: 0 of 9,997 targets beyond ±0.1 pp
- The client seed is a genuine input: a wrong seed changes 670 / 670 sampled rolls
- Your target and stake are not inputs to the roll
References
Dice — Game Rules7 sections▶
Dice is a variable-odds betting game: pick a target and a direction (Roll Over or Roll Under), and win if the result lands on your side. Higher risk means lower win probability and higher payouts.
Game Rules
Dice is a single-outcome betting game. The player chooses a target and a direction: Roll Over (win if the result is greater than the target) or Roll Under (win if it is less). The result is an integer from 0 to 10,000, 10,001 equally likely values, set by one HMAC-SHA256 computation with bias-free rejection sampling. The further the target is from the middle, the lower the win chance and the higher the payout. This audit covers Roll Over.
How to Play
1. Choose direction — Pick Roll Over (win if result is greater than target) or Roll Under (win if result is less than target). Toggling direction mirrors the win zone on the slider.
2. Choose target — Select a target value. The game shows it as target / 100, for example Roll Over 50.05 for target 5005. The further the target is from the middle, the lower the win chance and the higher the payout.
3. Enter bet amount — Choose how much to wager.
4. Place the bet — The platform generates a dice result from the committed server seed, your client seed, and the current nonce.
5. Outcome — If the result is on your chosen side of the target, you win. Payout = bet amount × multiplier.
Win Conditions
The win condition in Dice is a simple threshold comparison against the chosen direction.
| Direction | Win Condition | Example |
|---|---|---|
| Roll Over | result > target | target=5000, result=7234 → Win at 1.998× |
| Roll Under | result < target | target=5000, result=3100 → Win at 1.998× |
Risk vs Reward
The core mechanic of Dice is the tradeoff between target distance and payout size.
- Target controls probability — targets near the middle mean about 50% win chance and about 2× payout; targets far from it mean a lower win chance and higher payouts
- RTP is the same at the base tier — every roll-over target returns 99.9% there (0.1% house edge)
- Variance grows with distance from the middle — a 2% win chance / about 50× setting (Roll Over 98.00) is far more volatile than an 80% / about 1.25× setting (Roll Over 20.00)
Parameters
| Parameter | Value | Notes |
|---|---|---|
| Target | 200–9998 in the capture | Duel's config defines an edge for 2–9,998; the UI shows target / 100 |
| Bet Type | over | Result must exceed the target; the only mode captured |
| House Edge | 0.1% at the base tier | Rises in 0.01% steps with stake, to 1.0% at most (4.5) |
| Theoretical RTP | 99.9% (base tier) | Derived for every roll-over target 2–9,998 |
| RNG Algorithm | HMAC-SHA256 | One HMAC call per bet; key = hex-decoded server seed |
| RANGE | 10001 | Results 0–10,000; it cancels out of the RTP, so the edge comes from the 0.999 factor |
Seed Formats
Every Dice bet uses three cryptographic inputs to generate the result.
| Seed Type | Format | Example | Purpose |
|---|---|---|---|
| Server Seed | 64-char hex (32 bytes) | 528555039caf67c0… | Casino-provided randomness |
| Client Seed | Alphanumeric string | bRNvtSn0hp2uVFRe | Player-contributed entropy |
| Nonce | Integer from 0 | 23 | One per bet within an epoch |
Win Chance & Multiplier Formulas
Win chance and multiplier are fixed mathematical functions of the target. The 0.999 factor in the multiplier formula is the source of the 0.1% house edge.
win_chance = (10000 − target) / 10001
multiplier = 0.999 / win_chance| Target | Win Chance | Multiplier | RTP |
|---|---|---|---|
| 200 | 97.9902% | 1.0195× | 99.9% |
| 2000 | 79.9920% | 1.2489× | 99.9% |
| 5000 | 49.9950% | 1.9982× | 99.9% |
| 9000 | 9.9990% | 9.9910× | 99.9% |
| 9800 | 1.9998% | 49.9550× | 99.9% |
| 9998 | 0.0200% | 4995.4995× | 99.9% |
Why Provably Fair Matters▶
Traditional online casinos require players to trust that games are fair. Provably fair systems eliminate this trust requirement by allowing players to mathematically verify that outcomes were not manipulated. In a Provably Fair system:
- The casino commits to a result before the player bets
- The player contributes randomness that the casino cannot predict
- Anyone can verify the outcome after the fact
High-Level Overview7 sections▶
Checklist Reference
Based on the ProvablyFair.org Audit Execution Checklist, here are the tests covered under this audit document.
1. Commit-Reveal System & Seed Handling
| Test | Description |
|---|---|
| Server seed commit exists before play | SHA-256 hash shown to player before betting |
| Server seed reveal matches commit | SHA-256(hexDecode(revealed)) = committed hash |
| Client seed control | Player can set/change client seed via rotation UI |
| Nonce increments correctly | Starts at 0, +1 per bet, resets at epoch boundary |
| Full determinism | Same inputs → same result |
2. Randomness & Entropy Model
| Test | Description |
|---|---|
| RNG depends only on seeds + nonce | No external inputs — self-contained HMAC-SHA256 |
| No mixed entropy sources | No timestamps, Math.random, etc. |
| Unbiased mapping | Rejection sampling: the accepted values are a whole multiple of 10,001, so bias is exactly 0 |
| No state leakage | Each bet uses unique HMAC message (clientSeed:nonce) |
3. Verifier ↔︎ Live Parity
| Test | Description |
|---|---|
| Live outcomes match verifier | 6,700 / 6,700 rolls recomputed with 0 mismatches |
| Multi-phase verification | Phases A (all targets), B (deep sample), C (bet-size check), D (client seed) |
| Bet-size invariance | $10 bets produce same RNG as $0.01 bets |
4. Game Logic & RTP Validation
| Test | Description |
|---|---|
| Anti-circularity (Step 13) | Win probability tallied from the 10,001 rolls; the casino's win_chance compared, never used |
| House edge audit | 0.1% at the base tier: effective_edge 0.1 on every captured bet; higher tiers explained from the config (4.5) |
| Payout rules correctness | Win amount equals stake × the exact multiplier at the 18th decimal (no tolerance) |
| Simulated RTP convergence | 98M rounds average 99.922%, consistent with 99.9% |
| Cherry-pick detection | Early-window return z = +1.120 across 134 casino seeds — no sign of seed pre-selection |
| RTP claim rule (RTP-CLAIM 1.2.0) | Duel's stated 0.1% base-tier edge held at all 9,997 targets, scored on Step 13 with a ±0.1 pp band — PASS |
5. Fairness Integrity & Player Verification
| Test | Description |
|---|---|
| Player can reproduce results offline | Using seeds + nonce |
| Verifier logic matches live logic | Our RNG (written from the spec), Duel's Verify-tab code and both ProvablyFair.org verifiers agree on all 6,700 bets |
| Verifier publicly accessible | ProvablyFair.org verifier — no login required |
| No reliance on private APIs | Fully client-side verification |
| 15 fairness integrity tests | Nonce, seed commitment, determinism, isolation, payout enforcement |
High-Level Flow
To get an overview of how the process works, here is a high-level breakdown:
1. Player Bets — Selects a target (2–9,998 in Duel's config; 200–9,998 in the capture) and bet amount
2. Seeds Combined — HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce)
3. RNG Output — 4-byte hash chunks scanned; rejection sampling with RANGE=10001
4. Result Determination — result = chunk % 10001, integer in [0, 10000]
5. Win Check — win if result > target; multiplier = 0.999 / win_chance
6. Payout Result — win_amount = bet_amount × multiplier
Provably Fair Model
Provably fair gambling systems use cryptographic primitives so outcomes can be checked after the fact. The model relies on three components: a server seed committed via hash before play, a player-controlled client seed, and an incrementing nonce. These inputs are combined using HMAC-SHA256 to produce deterministic, verifiable results. This section documents the global provably fair architecture used by almost all casinos and all relevant games.
Commit-Reveal Model
The Commit-Reveal model is integral to ensuring fairness and transparency in online gambling. This model involves several key phases:
Commit Phase:
Before any bets are placed, the casino generates a random server seed and sends the player only the SHA-256 hash of the hex-decoded seed. The player can't know the seed beforehand, but can check it once it is revealed.
Bet Phase:
The player places their bet. The server combines the server seed with the player's client seed via HMAC-SHA256 to compute the dice result. Each epoch uses the same server seed and client seed pair.
Reveal Phase:
When the player rotates the seed pair, the server reveals the plaintext server seed. The player can now check SHA-256(hexDecode(serverSeed)) against the hash saved before betting.
Verify Phase:
Anyone can recompute every bet's result from the revealed server seed, client seed, and nonce using the published HMAC-SHA256 rejection sampling algorithm.
Player-Controlled Client Seed
The player's client seed is generated by the browser and submitted to the server via the seed rotation UI. Players can set their own client seed at any time. This ensures:
- The casino cannot predict the full RNG input
- Players contribute entropy that they control
- Results depend on both parties' inputs
Nonce Lifecycle
The nonce is a counter that increments with each bet within an epoch:
- Starts at 0 for each new server seed
- Increments by exactly 1 per bet
- Never reused within the same seed epoch
- Resets to 0 when you rotate the seed pair
Seed Epoch: (serverSeed, clientSeed) Bet 1: nonce = 0 → Result ABet 2: nonce = 1 → Result BBet 3: nonce = 2 → Result C ...[Player rotates seed — epoch complete]Next bet: nonce = 0 → Result X (new seed pair)Determinism Guarantee
Given identical inputs, the output is always identical:
key = hex_decode(serverSeed)message = clientSeed + ":" + noncehash = HMAC-SHA256(key, message)scan 4-byte chunks → reject if ≥ MAX_FAIR (4294959453)result = chunk % 10001 → integer [0, 10000]win = (result > target)Technical Glossary8 categories▶
Framework 1.1
| Term | Definition |
|---|---|
| Framework 1.1 | The ProvablyFair.org audit framework this report is certified under (October 2026). It adds the RTP claim rule, capture flags, the base-stake-tier rule, the standard S5 matrix and game profile coverage. |
| Capture flag | A flag caused by our capture, not by the casino — here, four nonces our capture script missed on retried requests. Disclosed and counted, and verdict-neutral. |
| RTP claim rule | RTP-CLAIM 1.2.0. Holds the audited RTP to the figure the casino publishes (game page, fairness page, help page, bet panel, rules or game settings) within ±0.1 pp. A house-side miss makes the verdict RTP FIGURE OVERSTATED (exit 5). |
| Base stake tier | The lowest tier of Duel's stake-scaled pricing: the 0.1% tier of each win-chance range, up to a ceiling from $5.01 to $2,750,308.34. Every captured bet was priced here, and the audit's guarantees apply here. |
Core Concepts
| Term | Definition |
|---|---|
| Provably Fair | A cryptographic system that allows players to mathematically verify that game outcomes were not altered. Relies on commit-reveal schemes and deterministic algorithms. |
| Commit-Reveal Protocol | A two-phase process in which the casino commits to a result (by showing its hash) before the player bets, then reveals the actual value after the bet. |
| Determinism | The property that identical inputs always produce identical outputs. Same server seed, client seed, and nonce must always generate the same dice result. |
| Client Seed Origin | The method by which the client seed is generated. Full Pass: browser-generated default + player customizable seed. Conditional Pass: server-assigned default + player customizable seed. Hard Fail: player cannot set own seed. |
Seed System
| Term | Definition |
|---|---|
| Server Seed | A random 32-byte value generated by Duel.com, transmitted as a 64-character hex string. Hashed and shown to players before betting, revealed after epoch rotation. |
| Client Seed | A random value controlled by the player, generated by the browser. Players can change it at any time via the seed rotation UI. |
| Nonce | A sequential counter from 0 that rises by 1 per bet within an epoch. Resets to 0 when you rotate the seed pair. |
| Hashed Server Seed | SHA-256(hexDecode(serverSeed)) — the commitment hash shown before betting. After rotation, players verify the revealed seed produces this hash. |
| Epoch | The bets placed under one (serverSeed, clientSeed) pair, until the player rotates it. Our capture rotated every 50 bets. |
Cryptographic Functions
| Term | Definition |
|---|---|
| HMAC-SHA256 | Hash-based Message Authentication Code using SHA-256. Duel Dice uses HMAC-SHA256 with the hex-decoded server seed as key and clientSeed:nonce as message. One call per bet. |
| Rejection Sampling | A technique to eliminate modulo bias. Hash chunks in the biased zone ([4294959453, 4294967295]) are discarded and the next chunk is tried. Ensures all 10001 outcomes are equally probable. |
| SHA-256 | Secure Hash Algorithm 256-bit. Used for server seed commitment: SHA-256(hexDecode(serverSeed)) = serverSeedHashed. |
| Hex Decoding | Converting a 64-character hex string to 32 raw bytes. Critical for the HMAC key — using the hex string as UTF-8 produces wrong outputs. |
Verification Terms
| Term | Definition |
|---|---|
| Verifier | A tool that recomputes the roll from the seeds and nonce. The ProvablyFair.org verifier's code is the file Step 5 runs on all 6,700 bets. |
| Parity | Degree of matching between verifier and live game results. 100% parity = every result matches. This audit: 6,700/6,700 exact match. |
| Anti-Circularity | Proof that RTP derives from first principles, not the casino's own figures. For Dice: the win probability is counted from the 10,001 possible rolls on every served target, and the multiplier matches the published formula on all 6,700 bets (Steps 9, 13). |
| Cherry-Pick Detection | A test for selective seed use. Pass 2 replays all 134 revealed seeds for 10,000 nonces and checks whether the early window, where the bets were placed, returned less than expected. |
Game Mechanics
| Term | Definition |
|---|---|
| Target | Player-selected threshold: 2–9,998 in Duel's config, 200–9998 in the capture. On a roll-over bet the result must exceed it to win. Higher targets mean a lower win chance and a higher multiplier. |
| Result | The integer output of the RNG, in [0, 10000]. 10,001 equally probable values produced by HMAC-SHA256 with rejection sampling. |
| Win Chance | The probability of winning: (10000 − target) / 10001. Exact for all targets. |
| Multiplier | The payout ratio for a winning bet: 0.999 / win_chance at the base tier. The 0.999 factor is the 0.1% house edge. |
| RANGE | The number of possible results, 10,001 (0 to 10,000). It sets the win chance but cancels out of the RTP; the edge comes from the 0.999 factor in the multiplier. |
Audit Terms
| Term | Definition |
|---|---|
| Seed Pair | A (serverSeed, clientSeed) combination used for a sequence of bets. Our capture used each pair for 50 bets. |
| Phase | A structured data collection segment. Phase A: random targets (200–9998). Phase B: fixed target 9800. Phase C: $10 bet-size check. Phase D: custom client seed. |
| Scored Step | One of the 21 checks behind the verdict: PASS, FLAG or FAIL. Here 20 pass and 1 is a capture flag. |
| Informational Context | Statistical observations reported for transparency but not scored — live-bet chi-squared, serial independence, and empirical RTP are underpowered at sample sizes below ~100K. |
Data Formats
| Term | Definition |
|---|---|
| dice-master-6700bets.json | The 6,700-bet dataset used throughout this audit. Contains all bets and 138 seed entries across four phases. SHA-256: 3550ffca07a6f7825f96cdd4e3d8c3cd57898b5b5238b9739753a754cff056d6. |
| verification-results.json | Output of the 21-step verification suite: every step result, profile coverage and the verdict. |
| simulation-results.json | Two-pass simulation output: Pass 1 (2M-roll census and 98M rounds on pinned seeds) and Pass 2 (134 casino seeds × 10,000 nonces). |
Seed, Nonce & Determinism
Can the casino change your outcome after you bet?
Every Dice bet on Duel.com comes from three inputs: server seed, client seed and nonce. Duel commits to the server seed by showing its SHA-256 hash before you bet, and reveals the seed when you rotate. Your target and stake are not inputs, so the roll is fixed before the dice animation plays. A hash match shows the records are consistent; the proof of timing is a copy of the hash you saved before betting.
What we verified
- Every revealed server seed hashes to its commitment (134 / 134)
- The 138 seed records fit together: 138 promotions, 137 forward links, plus the pre-capture link
- That each commitment was shown before its bets rests on the capture's records
- Nonces: 130 / 134 epochs complete as captured, no repeats, none out of order; 4 nonces missed by our capture script
- Identical inputs always produce the same roll (6,700 / 6,700)
- Your client seed is a genuine input: a wrong seed changes 670 / 670 sampled rolls
What this means for you
- Once a server seed is committed, the casino can't swap it for another
- The roll is fixed by the seeds and nonce before the dice animation plays
- Save the hashed server seed before you bet: your saved copy is what proves the timing
- Setting your own client seed adds your input to every roll
- Any bet can be recomputed after you rotate your seed
- Every revealed server seed hashes to its commitment (134 / 134)
- The 138 seed records fit together: 138 promotions, 137 forward links, plus the pre-capture link
- That each commitment was shown before its bets rests on the capture's records
- Nonces: 130 / 134 epochs complete as captured, no repeats, none out of order; 4 nonces missed by our capture script
- Identical inputs always produce the same roll (6,700 / 6,700)
- Your client seed is a genuine input: a wrong seed changes 670 / 670 sampled rolls
- Once a server seed is committed, the casino can't swap it for another
- The roll is fixed by the seeds and nonce before the dice animation plays
- Save the hashed server seed before you bet: your saved copy is what proves the timing
- Setting your own client seed adds your input to every roll
- Any bet can be recomputed after you rotate your seed
Seed hash integrityPass
Commitment linkagePass
Hash consistency within epochPass
Nonce sequencingCapture flag
Deterministic outputPass
Client seed participationPass
Client seed originPass
crypto.getRandomValues, and players can set their own (E11, E12). The capture's own seeds are disclosed in 1.4All 134 revealed seeds hash to their commitments and the 138 seed records fit together. Every roll recomputes from (serverSeed, clientSeed, nonce). When each commitment was shown rests on the capture's records. Step 4 is a capture flag: four nonces our capture script missed, disclosed and verdict-neutral.
| Check | Result | Evidence |
|---|---|---|
| Seed hash integrity | Pass | 134 / 134 revealed seeds hash to their commitments; the 4 seeds never revealed carry no bets (Step 1) |
| Commitment linkage | Pass | 138 / 138 promotions and 137 / 137 forward links recomputed, plus the pre-capture link (Step 2). A consistency check: the timing rests on the capture's records |
| Hash consistency within epoch | Pass | Epochs taken from capture order, not from the hash under test: one commitment per epoch, 134 epochs to 134 distinct commitments (Step 3) |
| Nonce sequencing | Capture flag | 130 / 134 epochs complete as captured, one client seed per epoch, no repeats, 0 out of order. 4 nonces missed on retried requests: limited by our capture script, not a Duel issue (Step 4) |
| Deterministic output | Pass | 6,700 / 6,700 rolls recomputed from (serverSeed, clientSeed, nonce) (Step 5) |
| Client seed participation | Pass | A wrong client seed changes 670 / 670 sampled rolls; an empty one leaves 1 of 6,700 unchanged, against a chance bound of 5.76 (Step 6). The 500 Phase D bets recompute under 10 player-set seeds (Step 15) |
| Client seed origin | Pass | Duel's default seed is browser-generated with crypto.getRandomValues, and players can set their own (E11, E12). The capture's own seeds are disclosed in 1.4 |
Seed hash integrityPass
Commitment linkagePass
Hash consistency within epochPass
Nonce sequencingCapture flag
Deterministic outputPass
Client seed participationPass
Client seed originPass
crypto.getRandomValues, and players can set their own (E11, E12). The capture's own seeds are disclosed in 1.4All 134 revealed seeds hash to their commitments and the 138 seed records fit together. Every roll recomputes from (serverSeed, clientSeed, nonce). When each commitment was shown rests on the capture's records. Step 4 is a capture flag: four nonces our capture script missed, disclosed and verdict-neutral.
How It Works — Seed, Nonce & Determinism7 sections
1.1Server Seed Commitment
Before any bet, Duel commits to a secret server seed by showing its SHA-256 hash. The server seed is a 64-character hex string (32 bytes), and the commitment is SHA-256(hexDecode(serverSeed)). When you rotate, Duel reveals the seed and anyone can check that it hashes to the commitment. A match shows the two are consistent. The proof that the seed was fixed before you bet comes from a copy of the hash you saved before betting.
export function verifyHash(serverSeed: string, serverSeedHashed: string): boolean { if (typeof serverSeed !== 'string' || !SEED_HEX.test(serverSeed)) return false; if (typeof serverSeedHashed !== 'string' || !SEED_HEX.test(serverSeedHashed)) return false; const commitment = createHash('sha256').update(Buffer.from(serverSeed, 'hex')).digest('hex'); return commitment === serverSeedHashed.toLowerCase();}Real Example from Live Data:
// data/dice-master-6700bets.json// bets[0] — the seed fields bet 50120986 carries (nonce 0):"server_seed_hashed": "91afc2eb50c2c801865a533f7b2a3177fc46bda00fcb500bd290ff73f09e1832","client_seed": "bRNvtSn0hp2uVFRe","nonce": 0,// seeds[1] — the next rotation reveals the server seed:"serverSeed": "528555039caf67c0219c9537cf6626c63cb0bfa384b72571410e522773270eb5","revealedFrom": {"transactionId": 519926108}Verification:
const crypto = require('crypto'); const serverSeed = "528555039caf67c0219c9537cf6626c63cb0bfa384b72571410e522773270eb5"; const hashedServerSeed = crypto .createHash("sha256") .update(Buffer.from(serverSeed, 'hex')) .digest("hex"); console.log(hashedServerSeed);// Output: 91afc2eb50c2c801865a533f7b2a3177fc46bda00fcb500bd290ff73f09e1832 ✅1.2Commitment Linkage (Next-Seed Promotion)
At every rotation Duel shows the hash of the seed it will activate next ("Next server seed (Hashed)"). Step 2 recomputes all 138 promotions from the raw hashes, then walks the chain: each record's nextServerSeedHash must equal the next record's serverSeedHashed, 137 links in all. The first epoch's hash must already be the one outstanding as "next" when the capture opened. The links show the 138 records fit one order, not when each hash was shown. That rests on the capture's records, each made before its epoch's first bet.
let linksChecked = 0, linksOk = 0;for (let i = 0; i < seeds.length - 1; i++) { linksChecked++; if (seeds[i].seed.nextServerSeedHash === seeds[i + 1].seed.serverSeedHashed) linksOk++; else chainFailures.push( `link ${i}→${i + 1}: seeds[${i}].nextServerSeedHash ≠ seeds[${i + 1}].serverSeedHashed — the records do not chain in one order`, );} const first = seeds[0];const preCaptureLink = first !== undefined && first.nextSeedPromotion !== undefined && first.nextSeedPromotion.previousNextHash === first.seed.serverSeedHashed;1.3Hash Consistency Within Epoch
The capture holds 138 seed records, one for every rotation. 134 carry bets, 50 each (Step 14). The other 4 are end-of-phase rotations with no bets, and their seeds are never revealed.
Step 3 takes each epoch from the capture order (the nonce returning to 0), not from the hash being tested, and checks that every bet in it carries the same server_seed_hashed. A mid-epoch seed change would put two hashes in one epoch. The 134 epochs must also match 134 distinct commitments.
const runs: DiceBet[][] = [];let currentRun: DiceBet[] = [];for (const b of bets) { if (b.response.nonce === 0 && currentRun.length) { runs.push(currentRun); currentRun = []; } currentRun.push(b);}if (currentRun.length) runs.push(currentRun); runs.forEach((runBets, i) => { const hashes = new Set(runBets.map(b => b.response.server_seed_hashed)); if (hashes.size !== 1) { s3Failures.push( `Epoch ${i} (nonces ${runBets[0].response.nonce}–${runBets[runBets.length - 1].response.nonce}): ` + `${hashes.size} distinct server_seed_hashed among ${runBets.length} bets`, ); }});1.4Client Seed Origin & Control
Duel generates the default client seed in your browser: 16 characters from a 63-character alphabet, drawn with rejection-sampled crypto.getRandomValues, and filled in by the seed-rotation panel (E12). On rotation the browser sends the new seed, and the server only echoes it back (E11). You can replace it with your own at any time. The client seed is in every HMAC message, so changing it changes the roll.
The capture used its own seeds. Phases A–C took 124 seeds from the capture script's Math.random(). Phase D used 10 auditor seeds such as pfauditmnugzvwf, built from a timestamp. These are choices on our side; they don't change what Duel's server does with a seed.
07tNQYRfsrSPJ69E0p8VGIwVeOcA4HmwbRNvtSn0hp2uVFRepfauditmnugzvwfpfauditmnuh1gzz
1.5Nonce Incrementation
The nonce starts at 0 for each server seed and rises by 1 per bet. Duel reveals a server seed only when you rotate. Our capture rotated every 50 bets; that 50-bet epoch is our schedule, not Duel's.
Step 4 checks every epoch for one client seed, a first nonce of 0, and no gap, repeat or reorder. In four epochs our capture script retried a request and missed one round each: nonce 13 in epoch 5f79e835, nonce 47 in 1fd2437d and nonce 25 in 8cd64681 (Phase A), and nonce 8 in aea0d32e (Phase B). Each of those epochs runs to nonce 50. The revealed seed fixes the roll at each missed nonce, so those four rounds are reconstructed from it rather than witnessed live. Limited by our capture script, not a Duel issue.
const hasNonce50 = nonces.includes(EXPECTED_EPOCH_SIZE);const missingNonces = Array.from({ length: EXPECTED_EPOCH_SIZE + 1 }, (_, i) => i).filter(i => !nonces.includes(i));const isRetryPattern = hasNonce50 && missingNonces.length === 1 && nonces.length === EXPECTED_EPOCH_SIZE; if (isRetryPattern) { const missedNonce = missingNonces[0]; const serverSeed = seedMap.get(hash); const clientSeedVal = sorted[0].response.client_seed; if (serverSeed) { const computedResult = computeResult(serverSeed, clientSeedVal, missedNonce); retroVerified.push({ epoch: shortHash, missedNonce, computedResult }); captureArtifacts.push( `Epoch ${shortHash}: capture-retry — nonce ${missedNonce} missed; retroactively verified: result=${computedResult}` ); } else { captureArtifacts.push(`Epoch ${shortHash}: capture-retry — nonce ${missedNonce}; server seed unrevealed`);1.6Deterministic Mapping
The roll is fully deterministic: the same server seed, client seed and nonce always give the same result. Our src/rng.ts was written from the specification (docs/ALGORITHM.md) by an implementer who never opened Duel's code. The server seed is hex-decoded to 32 bytes for the HMAC key, and the message is clientSeed:nonce. The 32-byte digest is read as eight big-endian 4-byte numbers, and the first one below 4,294,959,453 gives result = value % 10001, an integer from 0 to 10,000. Values at or above that limit are skipped, so no result is favoured.
export function computeResultFromBuffer(keyBuffer: Buffer, clientSeed: string, nonce: number): number { if (!Buffer.isBuffer(keyBuffer)) { throw new TypeError('keyBuffer must be a Buffer'); } if (typeof clientSeed !== 'string') { throw new TypeError('clientSeed must be a string'); } // §2 Step 1 (UTF-8 encoding: §6 O6). const message = Buffer.from(`${clientSeed}:${nonceToDecimal(nonce)}`, 'utf8'); const digest = createHmac('sha256', keyBuffer).update(message).digest(); // §2 Step 2: chunk offsets 0, 4, ..., 28. for (let i = 0; i + 4 <= digest.length; i += 4) { const v = digest.readUInt32BE(i); if (v < MAX_FAIR) { return v % RANGE; } } throw new Error('all 8 digest chunks rejected: continuation is unspecified (§6 O1)');}(serverSeed, clientSeed, nonce); no drand or other external input.Real Bet Verified:
// data/dice-master-6700bets.json · bet 50120996 (Phase A, target 4253, nonce 1)"request": {"amount": "0.01", "target": 4253, "bet_type": "over"}"response": {"id": 50120996, "result": 9793, "is_win": true, "multiplier": "1.738472072385592483", "amount_won": "0.017384720723855925", "nonce": 1, "client_seed": "bRNvtSn0hp2uVFRe", "server_seed_hashed": "91afc2eb50c2c801865a533f7b2a3177fc46bda00fcb500bd290ff73f09e1832"}// revealed server seed (seeds[1]): 528555039caf67c0219c9537cf6626c63cb0bfa384b72571410e522773270eb5Verification:
// computeResult("528555039caf67c0...", "bRNvtSn0hp2uVFRe", 1) // message = "bRNvtSn0hp2uVFRe:1"// digest = HMAC-SHA256(hexDecode("528555..."), message)// = 040798187b921e0524484516fd2db284caecc1f6f30a1c341d95d24ab634067f // First 4-byte value: 0x04079818 = 67,606,552// 67,606,552 < 4,294,959,453 → accepted// result = 67,606,552 % 10001 = 9793 ✅ // Win: 9793 > 4253 = true ✅// Multiplier: 0.999 / ((10000 − 4253) / 10001) = 1.738472072385592483 (18 dp) ✅// Payout: 0.01 × multiplier = 0.017384720723855925 ✅1.7Client Seed Influence
To confirm the client seed is a genuine HMAC input, Step 6 recomputes 5 bets from each of the 134 epochs (670) with a deliberately wrong client seed (wrong-client-seed-test), and all 6,700 bets with an empty one. With 10,001 possible rolls, a different seed leaves a roll unchanged by chance about once in 10,001 bets, so a few matches are allowed: at most 2.36 of 670 and 5.76 of 6,700. A roll that ignored the client seed would match every time. Separately, the 500 Phase D bets used 10 auditor-set seeds and all recompute (Step 15).
for (const [hash, epochBets] of byEpoch) { const ss = seedMap.get(hash); if (!ss) continue; const key = Buffer.from(ss, 'hex'); for (const b of epochBets.slice(0, SAMPLE_PER_EPOCH)) { tested++; expectedCollisions += P_COLLIDE; collisionVariance += P_COLLIDE * (1 - P_COLLIDE); const correct = computeResultFromBuffer(key, b.response.client_seed, b.response.nonce); const wrong = computeResultFromBuffer(key, WRONG_CLIENT, b.response.nonce); if (correct !== wrong) changed++; else collisions++; }}Technical Evidence & Verification5 sections
1.8Evidence Coverage Summary6 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Seed hash integrity (Step 1) | 134 / 134 revealed seeds; 3 phase-start records repeat the reveal before them; 4 unrevealed, none with bets | Pass |
| Commitment linkage (Step 2) | 138 / 138 promotions, 137 / 137 forward links + the pre-capture link | Pass |
| Hash consistency (Step 3) | 134 epochs from capture order, 134 distinct commitments | Pass |
| Nonce audit (Step 4) | 130 / 134 complete as captured; 4 capture-retry gaps (limited by our capture script) | Capture flag |
| Result recomputation (Step 5) | 6,700 / 6,700 | Pass |
| Client seed influence (Step 6) | 670 / 670 (wrong seed); 1 of 6,700 unchanged (empty seed), bound 5.76 | Pass |
1.9Code References7 source files
| File | Purpose |
|---|---|
| tests/verify.ts | 21 scored steps (Steps 1–6 cover S1) and the reproduction gate |
| tests/steps/commitment.ts | Steps 1–4: commit-reveal and nonce checks |
| tests/steps/determinism.ts | Steps 5–6: result recomputation and client seed influence |
| src/rng.ts | HMAC-SHA256 roll with rejection sampling, written from docs/ALGORITHM.md |
| docs/ALGORITHM.md | The written specification the roll code was built from |
| src/loader.ts | Dataset loading, hash check and the capture plan |
| capture/capture-auto.reference.js | Reference record of the capture script |
1.10Datasets UsedSource artifacts
| Property | Value |
|---|---|
| Source | Live Dice bets on Duel.com, 11 April 2026 |
| Total Records | 6,700 bets across 134 epochs (138 seed records) |
| SHA-256 | 3550ffca07a6f7825f96cdd4e3d8c3cd57898b5b5238b9739753a754cff056d6 |
Fields used: serverSeed, serverSeedHashed, nextServerSeedHash, client_seed, nonce, target, result, is_win, multiplier, win_chance, amount_won. One value is not capture output: the plaintext on seeds[0] was copied from seeds[1], which revealed it. No step uses that copy.
1.11Verified Invariants8 invariants
| Invariant | Result |
|---|---|
| SHA-256(hexDecode(serverSeed)) = serverSeedHashed for all 134 revealed seeds | Pass |
| Forward commitment chain consistent over all 137 links, plus the pre-capture link | Pass |
| server_seed_hashed constant within each of the 134 epochs | Pass |
| One client seed per epoch; no repeated or out-of-order nonce | Pass |
| Nonce gaps only where our capture script retried a request (4) | Capture flag |
| Same inputs produce the same roll for all 6,700 bets | Pass |
| A wrong client seed changes 670 / 670 sampled rolls; an empty one stays within its chance bound | Pass |
| Duel's default client seed is browser-generated (E11, E12) | Pass |
1.12Reproduction InstructionsRun locally
Clone the repository at the release tag, install, and run the verifier:
git clone https://github.com/ProvablyFair-org/duel-dice.gitcd duel-dice && git checkout v1.3.1npm cinpm run verifyExpected output, as run at v1.3.1 (lines for this section):
[PASS] Step 1 — Seed Hash Integrity
[PASS] Step 2 — Next-Seed Promotion + Forward Commitment Chain
[PASS] Step 3 — Hash Consistency Within Epoch
[FLAG⚑] Step 4 — Nonce Audit
[PASS] Step 5 — Result Recomputation (RNG + drand absent)
[PASS] Step 6 — Client Seed InfluenceRNG & Entropy Model
Is the randomness genuinely random, or could it be rigged?
Our RNG is our own implementation, written from the specification without opening Duel's code. It reproduces every one of the 6,700 captured rolls, and Duel's own Verify-tab code, run unmodified, agrees as a cross-check. Each roll takes one HMAC-SHA256 value with rejection sampling, so all 10,001 results are exactly equally likely.
What we verified
- Our RNG is written from the specification, without opening Duel's code, and reproduces all 6,700 rolls
- Duel's own Verify-tab code, run unmodified as a cross-check, gives the same roll on all 6,700
- Only disclosed inputs: server seed, client seed and nonce. No target, stake, timestamps or outside randomness
- Rejection sampling makes all 10,001 results exactly equally likely: bias 0
- 2M simulated rolls fit a uniform spread and show no sign of serial dependence
- A wrong client seed changes 670 / 670 sampled rolls
What this means for you
- Each roll is generated fairly and can't be skewed toward any result
- All 10,001 results, 0.00 to 100.00, are equally likely
- No hidden randomness or server-side state decides the roll
- Past results don't affect future rolls
- The roll depends only on seeds you can check
- Our RNG is written from the specification, without opening Duel's code, and reproduces all 6,700 rolls
- Duel's own Verify-tab code, run unmodified as a cross-check, gives the same roll on all 6,700
- Only disclosed inputs: server seed, client seed and nonce. No target, stake, timestamps or outside randomness
- Rejection sampling makes all 10,001 results exactly equally likely: bias 0
- 2M simulated rolls fit a uniform spread and show no sign of serial dependence
- A wrong client seed changes 670 / 670 sampled rolls
- Each roll is generated fairly and can't be skewed toward any result
- All 10,001 results, 0.00 to 100.00, are equally likely
- No hidden randomness or server-side state decides the roll
- Past results don't affect future rolls
- The roll depends only on seeds you can check
RNG derived only from disclosed inputsPass
HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce); the roll takes (key, clientSeed, nonce) only (Step 5)Written from the specificationPass
src/rng.ts rebuilt from docs/ALGORITHM.md by an implementer who never opened Duel's code; 79 / 79 spec checks (unit test)Operator code cross-checkPass
Modulo biasPass
Key encodingPass
Uniformity & serial independencePass
Client seed influencePass
Our own implementation, written from the specification, reproduces every live roll, and Duel's Verify-tab code agrees as a cross-check. All 10,001 results are exactly equally likely. 2M simulated rolls find no sign of bias or serial dependence, and the client seed changes the roll.
| Check | Result | Evidence |
|---|---|---|
| RNG derived only from disclosed inputs | Pass | HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce); the roll takes (key, clientSeed, nonce) only (Step 5) |
| Written from the specification | Pass | src/rng.ts rebuilt from docs/ALGORITHM.md by an implementer who never opened Duel's code; 79 / 79 spec checks (unit test) |
| Operator code cross-check | Pass | Duel's Verify-tab code, run unmodified: same roll on 6,700 / 6,700, same 10,001 range and limit (Step 5) |
| Modulo bias | Pass | The accepted values are exactly 429,453 × 10,001, so every result has the same count: bias exactly 0 (Step 19) |
| Key encoding | Pass | Server seed hex-decoded to 32 bytes; the text form gives different results on all 7 known vectors (unit test) |
| Uniformity & serial independence | Pass | 2,000,000 simulated rolls: chi² 99.151 (df 99, p 0.477); lag-1 z 2.643 and runs z −2.034, both inside the α/3 screen (Step 16) |
| Client seed influence | Pass | A wrong client seed changes 670 / 670 sampled rolls; an empty one stays within its chance bound (Step 6) |
RNG derived only from disclosed inputsPass
HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce); the roll takes (key, clientSeed, nonce) only (Step 5)Written from the specificationPass
src/rng.ts rebuilt from docs/ALGORITHM.md by an implementer who never opened Duel's code; 79 / 79 spec checks (unit test)Operator code cross-checkPass
Modulo biasPass
Key encodingPass
Uniformity & serial independencePass
Client seed influencePass
Our own implementation, written from the specification, reproduces every live roll, and Duel's Verify-tab code agrees as a cross-check. All 10,001 results are exactly equally likely. 2M simulated rolls find no sign of bias or serial dependence, and the client seed changes the roll.
How It Works — RNG & Entropy Model7 sections
2.1RNG Function Implementation
Each Dice bet takes one HMAC-SHA256: the key is the server seed hex-decoded to 32 bytes, the message is clientSeed:nonce. The 32-byte digest is read as eight big-endian 4-byte values. The first value below LIMIT = floor(2^32 / 10001) × 10001 = 4,294,959,453 gives result = value % 10001, an integer from 0 to 10,000. Values at or above the limit are skipped and the next one is tried.
| Component | Detail |
|---|---|
| Hash function | HMAC-SHA256 |
| Key | hexDecode(serverSeed): 32 bytes |
| Message | clientSeed:nonce, nonce in plain decimal |
| Extraction | Eight 4-byte big-endian values, in order |
| Rejection | value < 4,294,959,453 (= 429,453 × 10,001) |
| Reduction | value % 10001 → integer 0 to 10,000 |
| Output range | 10,001 equally likely values, shown as 0.00 to 100.00 |
export function computeResultFromBuffer(keyBuffer: Buffer, clientSeed: string, nonce: number): number { if (!Buffer.isBuffer(keyBuffer)) { throw new TypeError('keyBuffer must be a Buffer'); } if (typeof clientSeed !== 'string') { throw new TypeError('clientSeed must be a string'); } // §2 Step 1 (UTF-8 encoding: §6 O6). const message = Buffer.from(`${clientSeed}:${nonceToDecimal(nonce)}`, 'utf8'); const digest = createHmac('sha256', keyBuffer).update(message).digest(); // §2 Step 2: chunk offsets 0, 4, ..., 28. for (let i = 0; i + 4 <= digest.length; i += 4) { const v = digest.readUInt32BE(i); if (v < MAX_FAIR) { return v % RANGE; } } throw new Error('all 8 digest chunks rejected: continuation is unspecified (§6 O1)');}docs/ALGORITHM.md by an implementer who never opened Duel's code, and its self-test runs the specification's 79 vector and property checks (79 / 79).2.2Entropy Sources
All randomness derives exclusively from the deterministic HMAC-SHA256 function combining three cleanly separated inputs:
| Source | Controlled By | Purpose |
|---|---|---|
| Server Seed | Casino | Base randomness (committed via SHA-256 hash before betting) |
| Client Seed | Player | Player-contributed input |
| Nonce | System | One per bet; rises by 1 within each epoch |
How we know: all 6,700 bets were recomputed from these inputs alone. A hidden input would make recomputation fail; it does not. The roll function takes only (key, clientSeed, nonce), so your target and stake never reach it. All 6,700 bets carry drand_round: null: no outside randomness beacon.
No timestamps, external APIs or server-side state: only HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce).
2.3Modulo Bias Analysis
Each roll is value % 10001, where value is a 4-byte number. 2^32 is not a whole multiple of 10,001 (4,294,967,296 % 10,001 = 7,843), so a plain modulo would favour the lowest results slightly. The roll removes this with rejection sampling: only values below LIMIT = floor(2^32 / 10001) × 10001 are used, and that window is a whole multiple of 10,001.
2^32 = 4,294,967,296
2^32 % 10,001 = 7,843
LIMIT = 4,294,967,296 − 7,843 = 4,294,959,453
Accepted values: 0 … 4,294,959,452 → 4,294,959,453 values
4,294,959,453 / 10,001 = 429,453 (exact, no remainder)
Each of the 10,001 results maps to exactly 429,453 accepted values.
Rejection chance per value: 7,843 / 2^32 ≈ 1.83 × 10⁻⁶A roll reads up to eight values; all eight being rejected has a probability of about 10⁻⁴⁶. The specification leaves that case open, so our code stops rather than invent a rule. Duel's Verify-tab code uses the same limit, written as 0xFFFFFFFF − (0xFFFFFFFF % 10001). Every one of the 6,700 captured bets used its first value.
2.4RNG Isolation
Each bet uses its own nonce in the HMAC message (clientSeed:nonce), so every bet gets its own HMAC output. HMAC-SHA256 is a pseudorandom function: one output tells you nothing practical about another. No state is shared between bets or epochs.
Evidence: computeResultFromBuffer in 2.1 is a pure function: no module state, no external calls, no memory between bets. It takes (keyBuffer, clientSeed, nonce) and returns the roll. Same inputs, same output.
2.5Monte Carlo Simulation (98M Rounds + 2M-Roll Census)
The simulation checks the roll at scale, with pinned seeds independent of any casino data. A census of 2,000,000 rolls from one pinned seed pair tests uniformity and serial independence. Then 98 targets, roll over 2.00 to 99.00 in steps of 1.00, each play 1,000,000 bets on their own pinned seed pair: 98 million rounds.
| Metric | Value |
|---|---|
| Average simulated RTP (98 targets) | 99.922% |
| Average theoretical RTP | 99.900% |
| Targets within 5 SE of 99.9% | 98 / 98 (largest 2.52 SE, target 3600) |
| Census uniformity (100 bins) | chi² 99.151, df 99, p 0.477 |
| Census roll range | 0 to 10,000, the full range |
| Serial independence (α/3) | lag-1 z 2.643, runs z −2.034: both pass |
export const SIM_UNIFORMITY_DRAWS = 2_000_000; // ≥ 2,000,000 (DICE-20 floor)export const SIM_UNIFORMITY_BINS = 100; // df = 99export const SIM_EDGE_BETS = 1_000_000; // ≥ 1,000,000 per band (DICE-20 floor)export const SIM_EDGE_TARGETS: readonly number[] = Object.freeze(Array.from({ length: 98 }, (_, i) => (i + 2) * 100));Methodology: chi-squared on 100 bins of the 2,000,000 census rolls; lag-1 autocorrelation and a Wald–Wolfowitz runs test on the same rolls, each screened at α/3 so the step's overall level is 0.01. For each target, the simulated RTP from its win count must lie within 5 standard errors of 99.9%. Step 16 re-derives every statistic from the stored counts, except the lag-1 correlation itself, which needs the full sequence and is checked against its screen.
2.6Serial Independence
Serial independence means consecutive results are not correlated: one roll does not shape the next. Two checks run on the 2,000,000 census rolls, each at α/3 = 0.0033:
Lag-1 autocorrelation: Correlation between consecutive rolls. Expected r ≈ 0 for an independent sequence; z = r × √n must stay below 2.935 in size. Measured z = 2.643.
Wald–Wolfowitz runs test: Counts runs of rolls above and below the midpoint, 5,000. Measured 998,563 runs, z = −2.034, p = 0.042, above the 0.0033 cut-off.
sumX += roll; sumXsq += roll * roll;if (n > 0) sumAdj += prevRoll * roll;const side = roll >= MID ? 1 : 0;if (side === 1) n1++;if (n === 0) { runsCount = 1; } else if (side !== prevSide) { runsCount++; }// …const uVar = sumXsq / uN - uMean * uMean;const uLag1 = uVar > 0 ? (sumAdj / (uN - 1) - uMean * uMean) / uVar : 0;const uLag1Z = uLag1 * Math.sqrt(uN);2.7Worked Example — Full RNG Trace
Real bet from the dataset: bet 50121005, target 1831, nonce 2. From dice-master-6700bets.json:
serverSeed = 528555039caf67c0219c9537cf6626c63cb0bfa384b72571410e522773270eb5
clientSeed = bRNvtSn0hp2uVFRe
nonce = 2
target = 1831| Step | Operation | Value |
|---|---|---|
| 1 | Key | hex_decode("528555039caf67c0...") → 32 bytes |
| 2 | Message | "bRNvtSn0hp2uVFRe:2" |
| 3 | HMAC-SHA256 | e5ff26928918c5736fcaa46aea8d9327102d14bb8b502a2a9200252babff96cc |
| 4 | First value (bytes 0–3) | 0xe5ff2692 = 3,858,704,018 |
| 5 | Limit check | 3,858,704,018 < 4,294,959,453 → accepted |
| 6 | Result | 3,858,704,018 % 10001 = 8187 |
| 7 | Win check | 8187 > 1831 = true |
| 8 | Multiplier | 0.999 / ((10000 − 1831) / 10001) = 1.223038193169298568× |
result = 8187 matches the recomputation exactly. Win: 8187 > 1831. Payout: 0.01 × 1.223038193169298568 = 0.012230381931692986, the served amount.Technical Evidence & Verification5 sections
2.8Evidence Coverage Summary6 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Roll recomputation (Step 5) | 6,700 / 6,700 bets | Pass |
| Spec self-test (unit test) | 79 / 79 vector and property checks | Pass |
| Operator code cross-check (Step 5) | 6,700 / 6,700, same range and limit | Pass |
| Key encoding (unit test) | Hex-decoded key reproduces the 7 known rolls; the text form does not | Pass |
| Draw bias bound (Step 19) | Accepted values a whole multiple of 10,001: bias 0 | Pass |
| Census uniformity and serial checks (Step 16) | chi² p 0.477; lag-1 z 2.643; runs z −2.034 | Pass |
2.9Code References8 source files
| File | Purpose |
|---|---|
| src/rng.ts | HMAC-SHA256 roll and draw-bias bound, written from docs/ALGORITHM.md |
| tests/dice/RngSpecTests.ts | The specification's 79 vector and property checks |
| src/simulate.ts | Monte Carlo: 2M-roll census, 98 targets × 1M bets (Pass 1), Pass 2 |
| src/sim-config.ts | The pinned simulation design |
| src/stats.ts | Chi-squared, runs test, normal tails |
| tests/steps/determinism.ts | Steps 5–6: roll recomputation, operator cross-check, client seed influence |
| tests/steps/bias.ts | Step 19: draw bias bound |
| tests/steps/simulation.ts | Steps 16–17: simulation re-derived and cherry-pick test |
2.10Verified Invariants8 invariants
| Invariant | Result |
|---|---|
| Recomputed roll matches the live roll for all 6,700 bets | Pass |
| Key is hex-decoded (not UTF-8); the wrong encoding gives wrong results | Pass |
| Rejection sampling leaves exactly 0 modulo bias for 10,001 results | Pass |
| No external entropy needed: drand_round null on all 6,700 bets | Pass |
| 2M census rolls span 0 to 10,000 and pass the uniformity screen | Pass |
| Lag-1 and runs checks pass at α/3 on the census | Pass |
| All 98 simulated targets within 5 SE of 99.9% | Pass |
| A wrong client seed changes 670 / 670 sampled rolls | Pass |
2.11Datasets UsedSource artifacts
2.12Reproduction InstructionsRun locally
Clone the repository at the release tag, install, and run the verifier:
git clone https://github.com/ProvablyFair-org/duel-dice.gitcd duel-dice && git checkout v1.3.1npm cinpm run verifyExpected output, as run at v1.3.1 (lines for this section):
[PASS] Step 5 — Result Recomputation (RNG + drand absent)
[PASS] Step 16 — Simulation Results — Pass 1 Integrity
[PASS] Step 19 — Draw Bias Bound (Sampling Uniformity)Verifier Parity
Does the live game actually follow its own rules?
The verifier must produce the exact same roll as the live game for every bet, and the payout must follow from it exactly. Four implementations check every bet: ours, Duel's Verify-tab code and both ProvablyFair.org verifiers.
What we verified
- Every bet recomputed from its seeds: the roll itself, not just the payout
- Every payout exact on the served 18-decimal grid, with no tolerance
- Win condition, multiplier and win chance checked against their formulas on all 6,700 bets
- Four implementations agree on every roll: ours, Duel's Verify-tab code and both ProvablyFair.org verifiers
- All four capture phases recompute the same way, at $0.01 and at $10
What this means for you
- The verifier isn't a simulation: it produces the exact roll the live game served
- Every bet you play can be recomputed by anyone
- Your stake doesn't change the roll
- The live game follows the published rules on every captured bet
- Every bet recomputed from its seeds: the roll itself, not just the payout
- Every payout exact on the served 18-decimal grid, with no tolerance
- Win condition, multiplier and win chance checked against their formulas on all 6,700 bets
- Four implementations agree on every roll: ours, Duel's Verify-tab code and both ProvablyFair.org verifiers
- All four capture phases recompute the same way, at $0.01 and at $10
- The verifier isn't a simulation: it produces the exact roll the live game served
- Every bet you play can be recomputed by anyone
- Your stake doesn't change the roll
- The live game follows the published rules on every captured bet
Result recomputationPass
Verifier parityPass
Payout correctnessPass
Win condition integrityPass
is_win = result > target on all 6,700 bets; a tie (result = target) is a loss, and the capture holds one (Step 8)Multiplier formulaPass
Win chance formulaPass
win_chance = (10000 − target) / 10001 within 1 × 10⁻¹⁴ on all 6,700 bets (Step 10)Bet-size independencePass
All 6,700 bets match the recomputation exactly, across all four capture phases. Four implementations agree on every roll. Payouts, the win condition, the multiplier and the win chance all follow the published formulas, compared exactly on the served grid.
| Check | Result | Evidence |
|---|---|---|
| Result recomputation | Pass | 6,700 / 6,700 rolls recomputed exactly, as integers 0 to 10,000 (Step 5) |
| Verifier parity | Pass | Duel's Verify-tab code (cross-check), this site's verifier and the main site's verifier each reproduce all 6,700 rolls; pinned by SHA-256 (Step 5) |
| Payout correctness | Pass | 2,519 wins equal stake × the exact multiplier at the nearest 18th decimal; 4,181 losses credit exactly 0; no tolerance (Step 7) |
| Win condition integrity | Pass | is_win = result > target on all 6,700 bets; a tie (result = target) is a loss, and the capture holds one (Step 8) |
| Multiplier formula | Pass | Served multiplier = 0.999 / ((10000 − target) / 10001), rounded to 18 decimals, on all 6,700 bets: integer equality (Step 9) |
| Win chance formula | Pass | Served win_chance = (10000 − target) / 10001 within 1 × 10⁻¹⁴ on all 6,700 bets (Step 10) |
| Bet-size independence | Pass | The 200 $10 bets recompute like the $0.01 bets, and target 9700 is served one multiplier at both stakes (Step 7) |
Result recomputationPass
Verifier parityPass
Payout correctnessPass
Win condition integrityPass
is_win = result > target on all 6,700 bets; a tie (result = target) is a loss, and the capture holds one (Step 8)Multiplier formulaPass
Win chance formulaPass
win_chance = (10000 − target) / 10001 within 1 × 10⁻¹⁴ on all 6,700 bets (Step 10)Bet-size independencePass
All 6,700 bets match the recomputation exactly, across all four capture phases. Four implementations agree on every roll. Payouts, the win condition, the multiplier and the win chance all follow the published formulas, compared exactly on the served grid.
How It Works — Verifier Parity8 sections
3.1Why Parity Matters
If the verifier gives a different result from the live game, players can't rely on verification at all. Parity has to be 100%: a single mismatch would mean a bug in the verifier, a change in the live game, or an RNG that doesn't match its description. A player must be able to take the revealed seeds, run them through an independent verifier, and get the exact roll they saw.
3.2Four-Phase Collection Design
Data was collected across four structured phases, each designed to test a specific fairness property. The phases are complementary — together they cover target range breadth, statistical depth, bet-size invariance, and client seed verification.
| Phase | Bets | Config | Bet Amount | Purpose |
|---|---|---|---|---|
| A — Target coverage | 5,000 | Random targets (200–9998), 3,860 distinct | $0.01 | Check the full target range |
| B — Statistical validation | 1,000 | Target 9800 (fixed) | $0.01 | Deep sample on a high target |
| C — Elevated stake | 200 | Target 9700 (fixed) | $10.00 | Check the stake is not in the roll |
| D — Client seed variation | 500 | Target 9700 (fixed) | $0.01 | Check player-set client seeds are used |
3.3Result Recomputation (Step 5)
For every bet, the verifier recomputes the roll with computeResultFromBuffer(key, clientSeed, nonce) and compares it with the served result as an integer. The same step runs three other implementations on every bet, each from a copy pinned by SHA-256: Duel's own Verify-tab code (copied 25 September 2026, run unmodified as a cross-check), the verifier on this site, and the verifier on www.provablyfair.org. A bet that can't be recomputed fails the step rather than being skipped.
let mismatches = 0;let skipped = 0;for (const b of bets) { const ss = seedMap.get(b.response.server_seed_hashed); if (!ss) { skipped++; continue; } const key = Buffer.from(ss, 'hex'); const computed = computeResultFromBuffer(key, b.response.client_seed, b.response.nonce); if (computed !== b.response.result) mismatches++;}0.999 / winChance and shows it to 4 decimals. On 593 of the 2,519 wins its value is one unit in the last binary place from ours, and on 2 wins whose served multiplier sits exactly on a 4-decimal half it shows the lower last digit (67.5067× for 67.50675). The served multiplier itself is checked exactly in Step 9.3.4Payout Math (Step 7)
Every money figure Duel serves is a decimal string with at most 18 decimals, so it is a whole number of 10⁻¹⁸ units. Step 7 compares those integers exactly, with no tolerance. A win must equal stake × 0.999 · 10001 / (10000 − target), rounded to the nearest unit, and be within half a unit of stake × the served multiplier. A loss must credit exactly 0.
for (const b of bets) { const amt = parseGridUnits(b.request.amount); const mult = parseGridUnits(b.response.multiplier); const won = parseGridUnits(b.response.amount_won); if (amt === null || mult === null || won === null) { unparseable++; continue; } if (b.response.is_win) { winsChecked++; const rule = exactPayoutUnits(amt, b.request.target); if (rule.tie) settlementTies++; const dev = won * GRID - amt * mult; // in units of 1e-36 const absDev = dev < 0n ? -dev : dev; if (2n * absDev === GRID) productHalfUnits++; if (won !== rule.units || 2n * absDev > GRID) payoutErrors++; } else { lossesChecked++; if (won !== 0n) lossErrors++; }3.5Win Condition (Step 8)
For every bet, the win condition is recomputed as result > target and compared with the served is_win. A result equal to the target is a loss. The capture shows both sides of that line: one bet rolled exactly its target and lost (bet 50147522), and one rolled one above and won (bet 50133010). Every recorded roll is an integer from 0 to 10,000; two rolled 0, and the top value, 10,000, appears in the 2M-roll census.
for (const b of bets) { const expected = b.response.result > b.request.target; if (expected !== b.response.is_win) condErrors++; const r = b.response.result; if (!Number.isInteger(r) || r < ROLL_MIN || r > ROLL_MAX) rangeErrors++; if (r === b.request.target) { tieCount++; if (b.response.is_win) tieAllLose = false; } if (r === b.request.target + 1 && b.response.is_win) straddleWinCount++;}result > target, 0 errors. The strict rule is confirmed by a live tie and a live just-above-tie.3.6Multiplier & Win Chance Formulas (Steps 9–10)
For every bet, the multiplier is recomputed from the target alone as the exact fraction 999 · 10001 / (1000 · (10000 − target)), rounded to 18 decimals, and must equal the served string as an integer. The win chance (10000 − target) / 10001 is compared with the served win_chance. The casino's own fields are compared, never used to derive anything.
let multErrors = 0, multUnparseable = 0, multTies = 0;for (const b of bets) { const served = parseGridUnits(b.response.multiplier); if (served === null) { multUnparseable++; multErrors++; continue; } const exp = exactMultiplierUnits(b.request.target); if (exp.tie) multTies++; if (served !== exp.units) multErrors++;} let wcErrors = 0;for (const b of bets) { const target = b.request.target; const expected = theoreticalWinChance(target); const actual = parseFloat(b.response.win_chance); if (Math.abs(expected - actual) > 1e-14) wcErrors++;}3.7Phase C — Bet-Size Equivalence
Phase C placed 200 bets at $10 on target 9700, the same target as Phase D's 500 bets at $0.01. All 200 rolls recompute from the revealed seeds, and the stake is not an input to the roll function. Both stakes were served the same multiplier, 33.30333×, and the 5 Phase C wins each paid $333.0333 by the same exact rule as every $0.01 win.
3.8Worked Example — Full Parity Verification
Real bet from Phase C: bet 50157310, target 9700, $10 stake, nonce 31. From dice-master-6700bets.json:
serverSeed = b0ec2ba42759cc0368488642ab663ba527255dd0e7fd0dc81ca76883471069ec
clientSeed = 6RCe8mGoswFFojub
nonce = 31
target = 9700
bet amount = $10.00| Step | Process | Output |
|---|---|---|
| 1 | HMAC-SHA256(hexDecode(serverSeed), "6RCe8mGoswFFojub:31") | d5be73c59778355f... |
| 2 | First 4-byte value: 0xd5be73c5 | 3,586,028,485 |
| 3 | Limit check: 3,586,028,485 < 4,294,959,453 | Accepted |
| 4 | result = 3,586,028,485 % 10001 | 9919 — matches live game ✅ |
| 5 | Win check: 9919 > 9700 | true ✅ |
| 6 | Multiplier: 0.999 / ((10000 − 9700) / 10001) | 33.30333× |
| 7 | Payout: $10 × 33.30333 | $333.0333 ✅ |
// computeResult("b0ec2ba427...", "6RCe8mGoswFFojub", 31)//// message = "6RCe8mGoswFFojub:31"// digest = HMAC-SHA256(hexDecode("b0ec2ba4..."), message)// = d5be73c59778355f8c21352d82c35e6d025e5706825e3705ff914fdd91173f59//// First 4-byte value: 0xd5be73c5 = 3,586,028,485// 3,586,028,485 < 4,294,959,453 → accepted// result = 3,586,028,485 % 10001 = 9919 ✅//// Win: 9919 > 9700 = true ✅// Multiplier: 0.999 / ((10000 − 9700) / 10001) = 33.30333 ✅// Payout: 10 × 33.30333 = 333.0333 ✅Technical Evidence & Verification5 sections
3.9Evidence Coverage Summary8 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Result recomputation (Step 5) | 6,700 / 6,700 bets, exact integers | Pass |
| Verifier parity (Step 5) | Duel's Verify-tab code, this site's and the main site's verifiers: 6,700 / 6,700 each | Pass |
| Payout math (Step 7) | 6,700 / 6,700, exact on the 18-decimal grid | Pass |
| Win condition (Step 8) | 6,700 / 6,700; tie and just-above-tie witnessed | Pass |
| Multiplier formula (Step 9) | 6,700 / 6,700, integer equality at 18 decimals | Pass |
| Win chance formula (Step 10) | 6,700 / 6,700, within 10⁻¹⁴ | Pass |
| Phase C ($10) | 200 / 200 rolls; one multiplier at both stakes | Pass |
| Population (Step 11) | 6,700 bets, 138 seed records, phases A–D as planned | Pass |
3.10Code References6 source files
| File | Purpose |
|---|---|
| tests/steps/determinism.ts | Step 5: result recomputation and the three cross-checks |
| tests/steps/payouts.ts | Steps 7–10: payout math, win condition, multiplier, win chance |
| tests/steps/dataset.ts | Steps 11–15: population, dataset hash, anti-circularity, epoch size, Phase D |
| src/rng.ts | HMAC-SHA256 roll, formulas and exact 18-decimal arithmetic |
| src/operator-verifier.ts | Runs Duel's Verify-tab code unmodified (cross-check) |
| src/site-verifier.ts | Loads the pinned ProvablyFair.org verifiers |
3.11Datasets UsedSource artifacts
3.12Verified Invariants8 invariants
| Invariant | Result |
|---|---|
| Computed result matches the live result for all 6,700 bets | Pass |
| Duel's Verify-tab code and both ProvablyFair.org verifiers agree on all 6,700 rolls | Pass |
| Every win settles exactly on the 18-decimal grid; every loss credits 0 | Pass |
| is_win = (result > target) for all 6,700 bets; a tie loses | Pass |
| Multiplier = 0.999 / ((10000 − target) / 10001) at 18 decimals for all 6,700 bets | Pass |
| win_chance = (10000 − target) / 10001 within 10⁻¹⁴ for all 6,700 bets | Pass |
| Phase C ($10) rolls follow the same rule as $0.01 rolls: 200 / 200 | Pass |
| Phase D: 500 / 500 rolls recompute under 10 player-set client seeds | Pass |
3.13Reproduction InstructionsRun locally
Clone the repository at the release tag, install, and run the verifier:
git clone https://github.com/ProvablyFair-org/duel-dice.gitcd duel-dice && git checkout v1.3.1npm cinpm run verifyExpected output, as run at v1.3.1 (lines for this section):
[PASS] Step 5 — Result Recomputation (RNG + drand absent)
[PASS] Step 7 — Payout Math
[PASS] Step 8 — Win Condition (result > target) & Outcome Range
[PASS] Step 9 — Multiplier Formula (0.999 / win_chance)
[PASS] Step 10 — Win Chance Formula ((10000 − target) / 10001)RTP & Payout Logic
Is the house edge what the casino claims?
The theoretical RTP is derived from first principles: the win probability, counted from the 10,001 possible rolls, times the published multiplier gives 99.9000% at every roll-over target at the base stake tier, with no casino probability data. Duel's game settings state a 0.1% edge for this tier, and the RTP claim rule finds all 9,997 targets on it: PASS. Above each range's threshold the edge scales with stake; that is explained from the config, not certified.
What we verified
- Theoretical RTP is 99.9000% at every roll-over target, 2 to 9,998, at the base stake tier
- Derived from first principles: the win probability is counted from the 10,001 possible rolls, not taken from the casino
- RTP claim rule: Duel's game settings state a 0.1% edge for this tier; 0 of 9,997 targets beyond ±0.1 pp — PASS
- 98M simulated rounds average 99.922%, consistent with 99.9%
- Pass 2 finds no sign of server-seed cherry-picking, at its stated power
What this means for you
- At the base tier the house keeps 0.1% over the long run, whatever target you pick
- Above each range's threshold, Duel's edge rises in 0.01% steps to as much as 1.0%. Explained from the config, not certified
- The RTP figure is derived independently, not taken from the casino
- The 0.1% edge comes from the 0.999 factor in the published multiplier
- Theoretical RTP is 99.9000% at every roll-over target, 2 to 9,998, at the base stake tier
- Derived from first principles: the win probability is counted from the 10,001 possible rolls, not taken from the casino
- RTP claim rule: Duel's game settings state a 0.1% edge for this tier; 0 of 9,997 targets beyond ±0.1 pp — PASS
- 98M simulated rounds average 99.922%, consistent with 99.9%
- Pass 2 finds no sign of server-seed cherry-picking, at its stated power
- At the base tier the house keeps 0.1% over the long run, whatever target you pick
- Above each range's threshold, Duel's edge rises in 0.01% steps to as much as 1.0%. Explained from the config, not certified
- The RTP figure is derived independently, not taken from the casino
- The 0.1% edge comes from the 0.999 factor in the published multiplier
Anti-circularityPass
win_chance is compared, never used; negative control rejected (Step 13)Theoretical RTPPass
RTP claim (RTP-CLAIM 1.2.0)Pass
house_edge 0.001). 9,997 targets: 0 beyond ±0.1 pp (Step 13). A miss would read RTP FIGURE OVERSTATED (exit 5)Captured edge fieldPass
effective_edge 0.1 on all 6,700 bets, at $0.01 and $10; every served multiplier at the 0.1% tier's price (Step 9)Payout exactnessPass
Simulation (Pass 1)Pass
Cherry-pick test (Pass 2)Pass
Stake tiersInfo
The win probability, counted from the 10,001 possible rolls, times the published multiplier gives 99.9000% at every roll-over target, computed exactly, not estimated. Duel's stated edge holds under the RTP claim rule. Payouts are exact on every captured bet, and the simulation and cherry-pick test find no sign of bias. Tiers above the base tier are explained from the config, not certified.
RTP claim (RTP-CLAIM 1.2.0): Duel states a 0.1% edge for this tier; 0 of 9,997 targets beyond ±0.1 pp, PASS.
| Check | Result | Evidence |
|---|---|---|
| Anti-circularity | Pass | Win probability from a literal tally of the 10,001 rolls on all 3,862 served targets; the casino's win_chance is compared, never used; negative control rejected (Step 13) |
| Theoretical RTP | Pass | 99.9000% at all 9,997 roll-over targets: win chance × multiplier = 0.999 exactly, within 1.11 × 10⁻¹⁶ in floating point (Step 13) |
| RTP claim (RTP-CLAIM 1.2.0) | Pass | Claim: flat 99.9%, from Duel's game settings (the first tier of all 122 win-chance ranges has house_edge 0.001). 9,997 targets: 0 beyond ±0.1 pp (Step 13). A miss would read RTP FIGURE OVERSTATED (exit 5) |
| Captured edge field | Pass | effective_edge 0.1 on all 6,700 bets, at $0.01 and $10; every served multiplier at the 0.1% tier's price (Step 9) |
| Payout exactness | Pass | 2,519 wins and 4,181 losses exact on the 18-decimal grid (Step 7) |
| Simulation (Pass 1) | Pass | 98 targets × 1M rounds, average 99.922%; all 98 within 5 SE of 99.9% (Step 16) |
| Cherry-pick test (Pass 2) | Pass | 134 casino seeds × 10,000 nonces: early-window return z = +1.120, one-sided p 0.869; 71 epochs below, 63 above; 80% power for a 16.3 pp per-bet shortfall (Step 17) |
| Stake tiers | Info | 10,712 tiers in Duel's 5 October 2026 config. Above a per-range threshold ($5.01 to $2,750,308.34) the edge rises 0.01% per tier, to 1.0% at most. Explained from the config, not certified |
Anti-circularityPass
win_chance is compared, never used; negative control rejected (Step 13)Theoretical RTPPass
RTP claim (RTP-CLAIM 1.2.0)Pass
house_edge 0.001). 9,997 targets: 0 beyond ±0.1 pp (Step 13). A miss would read RTP FIGURE OVERSTATED (exit 5)Captured edge fieldPass
effective_edge 0.1 on all 6,700 bets, at $0.01 and $10; every served multiplier at the 0.1% tier's price (Step 9)Payout exactnessPass
Simulation (Pass 1)Pass
Cherry-pick test (Pass 2)Pass
Stake tiersInfo
The win probability, counted from the 10,001 possible rolls, times the published multiplier gives 99.9000% at every roll-over target, computed exactly, not estimated. Duel's stated edge holds under the RTP claim rule. Payouts are exact on every captured bet, and the simulation and cherry-pick test find no sign of bias. Tiers above the base tier are explained from the config, not certified.
How It Works — RTP & Payout Logic10 sections
4.1Anti-Circularity (Step 13)
The anti-circularity check derives the 99.9% RTP without using the casino's probability data. The win probability comes from the roll range and the win rule alone: of the 10,001 possible rolls, those above the target win. Step 13 counts them one by one on every target the capture served and checks the count against (10000 − target) / 10001. The multiplier is the published formula, which Step 9 matched on all 6,700 bets. The proof has three parts:
| Component | Formula | Source |
|---|---|---|
| Win probability | win_chance = (10000 − target) / 10001 | Tally of the 10,001 rolls under roll > target: counting, not casino data |
| Multiplier | multiplier = 0.999 / win_chance | Published formula; equals every served multiplier (Step 9) |
| RTP | win_chance × multiplier | Independent probability × verified multiplier |
| Result | = 0.999 for all 9,997 targets | Computed exactly, not estimated |
| Target | Win Chance | Multiplier | RTP |
|---|---|---|---|
| 200 | 97.9902% | 1.01949× | 99.9000% |
| 2000 | 79.9920% | 1.248875× | 99.9000% |
| 5000 | 49.9950% | 1.9982× | 99.9000% |
| 9000 | 9.9990% | 9.990999× | 99.9000% |
| 9800 | 1.9998% | 49.954995× | 99.9000% |
| 9998 | 0.0200% | 4995.4995× | 99.9000% |
const enumWinCount = (target: number): number => { let c = 0; for (let d = 0; d < RANGE; d++) if (d > target) c++; // win rule: roll > target return c;};const distinctTargets = [...new Set(bets.map(b => b.request.target))];let enumMismatches = 0;let firstEnumMismatch = '';for (const t of distinctTargets) { const tally = enumWinCount(t); const closed = Math.round(theoreticalWinChance(t) * RANGE); // == 10000 − t exactly if (tally !== closed) { enumMismatches++; if (!firstEnumMismatch) firstEnumMismatch = `target ${t}: tally ${tally} vs closed-form ${closed}`; }}Why this is non-circular: the win probability comes from counting rolls above the target, a property of the game, not of Duel's data. The casino's win_chance field is compared (Step 10), never used. The multiplier is the only casino input, and it matches the published formula on every captured bet. The edge comes from the 0.999 factor: the 10,001 in the win chance appears in the multiplier too, so it cancels out.
4.2House Edge Mechanism
The 0.1% house edge comes from the 0.999 factor in the multiplier. The roll range of 10,001 sets the win chance, (10000 − t) / 10001, but the multiplier is computed from that same win chance, so the range cancels out of the RTP. Within the base tier the edge is the same at every target.
Every captured bet response carries effective_edge 0.1 (percent), at both captured stakes, $0.01 and $10, and every served multiplier is the 0.1% tier's price (Step 9). Duel's Dice bet panel is labelled "Zero Edge" while the base edge is 0.1%. That label is noted, not tested.
win_chance = (10000 − t) / 10001
multiplier = 0.999 / win_chance
RTP = win_chance × multiplier = 0.999 (exactly, for every t)
House edge = 1 − 0.999 = 0.1%effective_edge.4.3Full RTP Table — All Targets
Dice uses one formula for every target, so the theoretical RTP is 99.900% everywhere. The table shows 14 of the 98 simulated targets, 1,000,000 rounds each; all 98 are in outputs/simulation-results.json.
| Target | Win Chance | Multiplier | Theoretical RTP | Simulated RTP | Deviation |
|---|---|---|---|---|---|
| 200 | 97.99% | 1.0195× | 99.900% | 99.895% | −0.005% |
| 500 | 94.99% | 1.0517× | 99.900% | 99.918% | +0.018% |
| 1000 | 89.99% | 1.1101× | 99.900% | 99.873% | −0.027% |
| 2000 | 79.99% | 1.2489× | 99.900% | 99.847% | −0.053% |
| 3000 | 69.99% | 1.4273× | 99.900% | 100.019% | +0.119% |
| 4000 | 59.99% | 1.6652× | 99.900% | 99.827% | −0.073% |
| 5000 | 50.00% | 1.9982× | 99.900% | 99.851% | −0.049% |
| 6000 | 40.00% | 2.4977× | 99.900% | 99.971% | +0.071% |
| 7000 | 30.00% | 3.3303× | 99.900% | 99.842% | −0.058% |
| 8000 | 20.00% | 4.9955× | 99.900% | 99.816% | −0.084% |
| 9000 | 10.00% | 9.9910× | 99.900% | 99.676% | −0.224% |
| 9500 | 5.00% | 19.9820× | 99.900% | 99.083% | −0.817% |
| 9800 | 2.00% | 49.9550× | 99.900% | 99.515% | −0.385% |
| 9900 | 1.00% | 99.9100× | 99.900% | 100.599% | +0.699% |
4.4RTP Claim Rule (RTP-CLAIM 1.2.0)
Framework 1.1 holds the audited RTP to the figure the casino publishes. The rule looks for a claim in six places: the game page, fairness page, help page, bet panel, rules or game settings. For Dice, Duel's game settings (the Dice config, as fetched on 5 October 2026) give the first tier of every one of its 122 win-chance ranges house_edge 0.001. So the claim is a flat 99.9% at the base tier. Duel's fairness page states no figure.
The claim is scored on Step 13 against a ±0.1 pp band, for every roll-over target from 2 to 9,998. A figure more than 0.1 pp below the claim, on the house side, makes the verdict RTP FIGURE OVERSTATED (exit 5). It never makes it NOT PROVABLY FAIR, because the rolls themselves pass.
The bet panel's "Zero Edge" label is noted, not tested. The scaled tiers above the base tier are not scored.
| Rows | Settings | Exact RTP | Beyond the band |
|---|---|---|---|
| Roll-over targets 2–9,998, 0.1% tier | 9,997 | 99.900000% | 0 |
rtp-claim: ENFORCED — PASSrtp-claim: claim flat 99.900000% — source: game settings (Duel's dice config, GET /api/v2/dice/config, as fetched 2026-10-05 …; E14) …rtp-claim: band ±0.10 pp · 9,997 settings · true min 99.900000% (target=2 over) · true max 99.900000% (target=2 over)rtp-claim: house side beyond band: 0 · player-favourable beyond band: 0 · worst target=2 over at 0.000000 pprtp-claim: outcome PASS · minimal fix: none — the claim holds for every setting it states a figure forrtp-claim: committed table outputs/rtp-claim-table.json: equals this run; sha256 e64b30bd61642193… matches the pinoutputs/rtp-claim-table.json, pinned by SHA-256.4.5House Edge & Stake Tiers (5 October 2026 config)
Duel's Dice config as fetched on 5 October 2026 (E14) splits the targets into 122 win-chance ranges and gives each a list of contiguous stake tiers, 10,712 in all. Each list starts with a 0.1% tier from $0. Above the range's threshold the edge rises in 0.01% steps, to 1.0% (99.0% RTP) in 114 ranges. In the 8 ranges for targets 2–799 the $3,000,000 maximum bet ends the ladder first, at 0.11% to 0.93%.
The config holds stake bounds and an edge per tier, no multiplier. Its tier boundaries fit a multiplier of (1 − edge) / win_chance, which would make the RTP at a tier 1 minus its edge. The roll is the same at every tier; only the payout changes.
This audit certifies the 0.1% tier, where every captured bet was priced. Read against this config, the closest captured stake, $10 at target 9700, is 1.55% of the way to that range's $644.25 ceiling. No bet on a scaled tier was captured, and the config is from 177 days after the capture.
Tier selection: A bet's range is the one whose bounds hold 10000 − target, and its tier the one whose min_bet and max_bet bracket the stake. The config doesn't say how Duel's server picks them; this is our reading.
Ceilings: The base-tier ceiling runs from $5.01 (target 9,998) to $2,750,308.34 (targets 2–99). Priced at (1 − edge) / win_chance at the range's longest odds, each tier's max_bet sits at a potential profit of about $25,000,000 × the tier's edge.
| Bet range (target 5,000) | House edge | RTP | Multiplier, if (1 − edge) / win chance |
|---|---|---|---|
| $0 – $24,071.71 | 0.1% | 99.9% | 1.9982× |
| $24,071.71 – $26,484.09 | 0.11% | 99.89% | 1.9980× |
| $118,862.22 – $121,312.00 | 0.5% | 99.5% | 1.9902× |
| $242,551.47 – $245,050.49 | 1.0% | 99.0% | 1.9802× |
| Target | Range (10000 − target) | Tiers | Base-tier ceiling | Edge range |
|---|---|---|---|---|
| 9,998 | 2 | 91 | $5.01 | 0.1% – 1.0% |
| 9,900 | 91–100 | 91 | $229.80 | 0.1% – 1.0% |
| 9,800 (Phase B) | 181–200 | 91 | $461.26 | 0.1% – 1.0% |
| 9,700 (Phases C, D) | 251–300 | 91 | $644.25 | 0.1% – 1.0% |
| 5,000 | 4901–5000 | 91 | $24,071.71 | 0.1% – 1.0% |
| 1,000 | 8901–9000 | 91 | $204,151.56 | 0.1% – 1.0% |
| 100 | 9801–9900 | 13 | $1,289,612.05 | 0.1% – 0.22% |
| 2 | 9901–9998 | 2 | $2,750,308.34 | 0.1% – 0.11% |
4.6Simulation Pass 1 — Pinned Seeds (Step 16)
The derivation in 4.1 gives 99.9% exactly. The simulation checks that the roll code behaves that way in practice: 98 targets, roll over 2.00 to 99.00, 1,000,000 rounds each on its own pinned seed pair, plus a 2,000,000-roll census for uniformity and serial independence. None of it uses casino data.
Edge bands: Each target's simulated RTP, from its win count, must lie within 5 standard errors of 99.9%. 98 / 98 do; the largest is 2.52, at target 3600.
Uniformity and serial independence: On the census: chi² 99.151 (df 99, p 0.477), lag-1 z 2.643, runs z −2.034, each inside its α/3 screen (2.6).
RTP: Average simulated RTP 99.922% against 99.900% theoretical, consistent with sampling variance.
for (let n = 0; n < SIM_EDGE_BETS; n++) { const roll = computeResultFromBuffer(key, client, n); if (roll > target) { wins++; payout += mult; } if (markIdx < SIM_CONVERGENCE_MARKS.length && (n + 1) === SIM_CONVERGENCE_MARKS[markIdx]) { markRtps[markIdx].push((payout / (n + 1)) * 100); markIdx++; }}What the simulation adds. Each round computes a roll from scratch with the same HMAC-SHA256 code used to check the live bets, then pays it by the formula. A return consistent with 99.9% over millions of rounds shows the code and the math agree. npm test re-derives every statistic from the committed counts; npm run test:full reruns the simulation.
4.7Cherry-Pick Detection — Pass 2 (Step 17)
Could the casino have chosen server seeds that start badly for players? Pass 2 takes every server seed Duel actually used, 134 of them, plays each for 10,000 nonces at the targets its epoch served, and compares the return in the early window (nonces 0–49, where the capture bet) with its exact expectation.
Why the early window: A casino that picked seeds against players would make the first rounds, the ones actually played, return less than they should. The test rejects only on that side, at α = 0.01.
False-alarm rate: On a fair game the rule fires with probability 0.0036, measured by a 1,000,000-replicate simulation; the cap is 0.01.
| Measure | Value |
|---|---|
| Seeds tested | 134 |
| Nonces per seed | 10,000 (early window 0–49, reference 50–9,999) |
| Statistic | Payout-weighted return of the served targets, standardized by its exact per-bet mean and variance |
| Early-window return | 7,078.53 against 6,693.30 expected: z = +1.120 |
| One-sided p (lower tail) | 0.869 — no sign of a shortfall |
| Direction split | 71 epochs below expectation, 63 above |
| Detection power | 80% for a per-bet return shortfall of 16.3 percentage points |
const totalEarlyReturn = perEpoch.reduce((a, r) => a + r.earlyReturn, 0);const totalEarlyExpected = perEpoch.reduce((a, r) => a + r.earlyExpected, 0);const totalEarlyVar = perEpoch.reduce((a, r) => a + r.earlyVar, 0);const aggEarlyZ = totalEarlyVar > 0 ? (totalEarlyReturn - totalEarlyExpected) / Math.sqrt(totalEarlyVar) : 0;const aggEarlyP = normalLowerTailP(aggEarlyZ); // one-sided lower tailconst below = perEpoch.filter(r => r.earlyReturn < r.earlyExpected).length;const above = perEpoch.length - below;4.8Bet-Size Equivalence (Phase C)
Phase C placed 200 bets at $10 on target 9700, a target also played at $0.01 in Phase D. All 200 rolls recompute from the revealed seeds through the same HMAC-SHA256 path; the stake is not an input to the roll. Both stakes were served the same multiplier. On Duel's live config a larger stake can select a higher-edge tier (4.5), which changes the multiplier, never the roll.
| Metric | Phase D ($0.01) | Phase C ($10) |
|---|---|---|
| Target | 9700 | 9700 |
| Bets | 500 | 200 |
| Rolls verified | 500 / 500 | 200 / 200 |
| Served multiplier | 33.30333× | 33.30333× |
| Wins | 15 | 5 |
4.9Informational Items (Not Scored)
Reported for transparency, not scored. They show the return observed during the capture. A sample this size can't resolve a 0.1% edge in a game whose top targets pay about 5,000×; the derivation in 4.1 is the RTP evidence.
| Item | Value | Context |
|---|---|---|
| Phase A observed return | 103.304% | 5,000 bets at $0.01, random targets |
| Phase B observed return | 124.887% | 1,000 bets at $0.01, target 9800 |
| Phase C observed return | 83.258% | 200 bets at $10, target 9700 |
| Phase D observed return | 99.910% | 500 bets at $0.01, target 9700 |
| Overall observed return | 83.9856% | 6,700 bets, $2,065 wagered; Phase C is most of the money |
| Live-sample fit (Step 21) | KS p 0.156 | The 6,700 live rolls against a uniform 0–10,000; lag-1 z 1.873, runs p 0.0335 |
| Live win rates | p 0.259 and 0.825 | Targets 9800 (25 / 1,000 wins) and 9700 (20 / 700 wins) against their win chance |
4.10Worked Example — Payout Verification
Real bet from Phase A: bet 50120996, target 4253, nonce 1. From dice-master-6700bets.json:
serverSeed = 528555039caf67c0219c9537cf6626c63cb0bfa384b72571410e522773270eb5
clientSeed = bRNvtSn0hp2uVFRe
nonce = 1
target = 4253Step 1 — Result: computeResult(serverSeed, clientSeed, 1) → HMAC-SHA256 → value % 10001 = 9793
Step 2 — Win check: 9793 > 4253 = true → win
Step 3 — Multiplier: 0.999 / ((10000 − 4253) / 10001) = 1.738472072385592483× at 18 decimals
Step 4 — Payout: 0.01 × 1.738472072385592483 = 0.017384720723855925
| Step | Process | Output |
|---|---|---|
| 1 | HMAC-SHA256 → rejection sampling | result = 9793 ✅ |
| 2 | Win check: 9793 > 4253 | true ✅ |
| 3 | RTP: win_chance × multiplier | (5747 / 10001) × 1.738472… = 0.999 |
| 4 | Payout: 0.01 × 1.738472072385592483 | 0.017384720723855925 ✅ |
// Target 4253 — RTP in exact arithmetic// win_chance = (10000 − 4253) / 10001 = 5747 / 10001// multiplier = 0.999 × 10001 / 5747//// RTP = (5747 / 10001) × (0.999 × 10001 / 5747) = 0.999 (99.9%)//// The 10001 and the 5747 cancel; the 0.999 factor is the 0.1% edge.Technical Evidence & Verification5 sections
4.11Evidence Coverage Summary7 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Anti-circularity (Step 13) | 3,862 served targets tallied; negative control; 9,997 targets at 99.9% | Pass |
| RTP claim (Step 13) | 9,997 targets, 0 beyond ±0.1 pp | Pass |
| Captured edge field | effective_edge 0.1 on 6,700 / 6,700 | Pass |
| Stake tiers (5 October 2026 config) | 10,712 tiers, 0.1%–1.0%; explained from the config | Info — see 4.5 |
| Simulation Pass 1 (Step 16) | 98M rounds; 98 / 98 within 5 SE; census passes | Pass |
| Simulation Pass 2 (Step 17) | 134 seeds × 10,000 nonces; z = +1.120 | Pass |
| Bet-size invariance (Step 7) | 200 / 200 Phase C at $10; one price at both stakes | Pass |
4.12Code References7 source files
| File | Purpose |
|---|---|
| tests/steps/dataset.ts | Step 13: anti-circularity and the RTP identity |
| src/rtp-claim.ts | Framework rule RTP-CLAIM 1.2.0 |
| src/rtp-settings.ts | The flat claim, its source, and the RTP claim table |
| scripts/dice-config-tiers.mjs | Prints the stake-tier figures from E14 (informational) |
| tests/steps/simulation.ts | Steps 16–17: simulation re-derived and cherry-pick test |
| src/simulate.ts | Monte Carlo: 2M-roll census, 98M rounds (Pass 1), Pass 2 |
| src/rng.ts | Win chance, multiplier and exact 18-decimal arithmetic |
4.13Datasets UsedSource artifacts
4.14Verified Invariants8 invariants
| Invariant | Result |
|---|---|
| win_chance × multiplier = 0.999 for all roll-over targets 2–9,998 (non-circular) | Pass |
| Tally of the 10,001 rolls equals the closed-form win chance on all 3,862 served targets | Pass |
| Every RTP-claim row within ±0.1 pp of 99.9% | Pass |
Every captured bet priced at the 0.1% tier (effective_edge 0.1) | Pass |
| Simulated RTP average 99.922% across 98M rounds | Pass |
| 98 / 98 targets within 5 SE of 99.9% | Pass |
| Pass 2 within its declared threshold across 134 casino seeds | Pass |
| Phase C ($10) bets follow the same roll and price as $0.01 | Pass |
4.15Reproduction InstructionsRun locally
Clone the repository at the release tag, install, and run the verifier:
git clone https://github.com/ProvablyFair-org/duel-dice.gitcd duel-dice && git checkout v1.3.1npm cinpm run verifyExpected output, as run at v1.3.1 (lines for this section):
[PASS] Step 7 — Payout Math
[PASS] Step 9 — Multiplier Formula (0.999 / win_chance)
[PASS] Step 13 — Probability Independence (Anti-Circularity)
[PASS] Step 16 — Simulation Results — Pass 1 Integrity
[PASS] Step 17 — Simulation Results — Pass 2 Cherry-Pick TestFairness Integrity Testing
Does the implementation maintain fairness under non-standard conditions?
Sections 1–4 prove the game is mathematically fair. Section 5 proves the implementation maintains integrity under non-standard conditions. We applied 15 standard fairness integrity tests covering nonce integrity, seed commitment, outcome determinism, cross-player isolation, and payout integrity. 14 tests passed and 1 is not applicable to this game type.
What we verified
- Nonce tampering — can the sequence be forced, replayed, or skipped?
- Seed injection — can server or client seed fields be overridden via API?
- Outcome replay — can a completed bet be replayed for duplicate payouts?
- Cross-player isolation — can one player's seeds or outcomes affect another's?
- Payout tampering — can multiplier or payout values be injected client-side?
- Parameter limits — can invalid target values or bet types be submitted?
What this means for you
- Across the 15 tests we ran, no API path allowed outcomes to be altered, replayed, or injected — by player or casino
- Once a bet is placed, the result cannot be changed or replayed
- Each bet is cryptographically unique and isolated
- Your results are independent of every other player
- The server rejects malformed, out-of-range, and duplicate requests
- Nonce tampering — can the sequence be forced, replayed, or skipped?
- Seed injection — can server or client seed fields be overridden via API?
- Outcome replay — can a completed bet be replayed for duplicate payouts?
- Cross-player isolation — can one player's seeds or outcomes affect another's?
- Payout tampering — can multiplier or payout values be injected client-side?
- Parameter limits — can invalid target values or bet types be submitted?
- Across the 15 tests we ran, no API path allowed outcomes to be altered, replayed, or injected — by player or casino
- Once a bet is placed, the result cannot be changed or replayed
- Each bet is cryptographically unique and isolated
- Your results are independent of every other player
- The server rejects malformed, out-of-range, and duplicate requests
Nonce integrityPass
Seed commitment integrityPass
Outcome determinismPass
Round & player isolationPass
Payout integrityPass
15 standard fairness integrity tests: 14 pass, 1 N/A (single-step game).
Category Coverage
| Check | Result | Evidence |
|---|---|---|
| Nonce integrity | Pass | Sequential, server-controlled, no duplicates across 134 seed pairs; 4 nonces missed on retried requests (capture script, not Duel) |
| Seed commitment integrity | Pass | Locked at bet acceptance, unique per seed pair — 134/134 verified |
| Outcome determinism | Pass | Identical inputs produce identical outcomes — 6,700/6,700 confirmed |
| Round & player isolation | Pass | Per-user seeds, serial independence confirmed (2M-roll census: lag-1 and runs inside α/3) |
| Payout integrity | Pass | Parameter limits enforced (5/5 invalid rejected); injected payout fields ignored (0 honoured); server-computed multiplier consistent across all probes |
Nonce integrityPass
Seed commitment integrityPass
Outcome determinismPass
Round & player isolationPass
Payout integrityPass
15 standard fairness integrity tests: 14 pass, 1 N/A (single-step game).
How It Works — Fairness Integrity Testing2 sections
5.1Framework Overview
Testing follows the ProvablyFair.org Fairness Integrity Framework — a structured methodology derived from real, historically observed failures in provably fair systems. Five categories target specific fairness properties. Scope boundary: S5 tests whether fairness guarantees hold under non-standard API interaction. Platform-level implementation testing falls outside standard certification.
| Category | Tests | What It Catches |
|---|---|---|
| Nonce Integrity | 4 | Sequence gaps, server-side nonce manipulation, session continuity |
| Seed Commitment | 5 | Mid-epoch seed changes, seed reuse, predictable seed generation |
| Outcome Determinism | 2 | Non-deterministic outputs, outcome replay |
| Player Isolation | 2 | Cross-round correlation, cross-user outcome dependence |
| Payout Integrity | 2 | Parameter enforcement, server-side computation verification |
5.2Severity Framework & Hard Fail Criteria
Findings are classified by severity. Hard fail criteria — any one triggers a NOT PROVABLY FAIR verdict.
| Severity | Meaning | Action |
|---|---|---|
| PASS | Test passed — no issue detected | None |
| N/A | Test not applicable to this game type | None |
| FLAG | Anomaly detected, documented for transparency | Disclosed |
| HARD FAIL | Fairness guarantee cannot be confirmed | Certification blocked until remediated |
| Condition | Consequence |
|---|---|
| Nonce gap or duplicate within epoch | Outcome sequence integrity broken |
| Server seed changed mid-epoch | Commit-reveal guarantee broken |
| Result recomputation mismatch | Undisclosed inputs affecting outcomes |
| Client seed not used in HMAC | Player has no influence on outcomes |
15 tests · 14 pass · 1 N/A
Nonce Integrity4/4
FI-NONCE-001PassEach bet increments the nonce sequentially with no gaps, repeats, or resets — preventing the server from skipping unfavourable outcomes
FI-NONCE-002PassNonce progression is server-controlled — the client cannot inject, skip, or replay a nonce value via the API
S1, Step 4 — server controls nonce assignment. Client bet requests do not include a nonce field.
FI-NONCE-003PassSubmitting an invalid or out-of-sequence nonce does not produce a game outcome — the server rejects the request
API probe — 7 adversarial nonce values (−1, 0, 999999999, 'abc', INT32_MAX, INT32_MAX+1, 9e18) injected in request body. All 7 silently ignored; server assigned valid sequential nonces. Continuity preserved (baseline 72 → post-test 80); no stack traces leaked.
FI-NONCE-004PassNonce sequence continues correctly after disconnect/reconnect — no reset to zero mid-epoch
Seed Commitment5/5
FI-SEED-001PassEmpty, null, or invalid client seeds are handled deterministically — the server enforces input requirements
API probe — 6/6 invalid client seeds rejected (empty, null, special chars, emoji, CJK, whitespace-only). Oversized seed (>1000 chars) accepted — permissive but safe (long entropy). All Dice bets after each rejection remained functional; no stack traces leaked.
FI-SEED-002PassOnce a bet is accepted, the seed pair is locked for the epoch — no mid-epoch mutation of server or client seed is possible
FI-SEED-003PassEach epoch uses a unique server seed — no seed is reused across epochs or sessions
S1, Step 1 — 134 distinct revealed server seeds, 0 reuse detected.
FI-SEED-004PassNo shared seed pool across users — each player's seeds are independently generated and isolated
API probe — 10 concurrent seed rotations on Account A and 10 on Account B. Zero hash collisions across 20 rotations; all hashes within each account distinct. Full account isolation confirmed.
FI-SEED-005PassServer seeds show no correlation with timestamps, sequential patterns, or other predictable inputs
API probe — 10 rotations spaced 5 seconds apart over ~52 seconds. All 10 server seed hashes distinct; no two shared 6+ leading hex characters. Time-correlated derivation ruled out.
Outcome Determinism2/2
FI-OUTCOME-001PassGiven identical inputs (serverSeed, clientSeed, nonce), the game always produces the same result — verified across all 6,700 live bets
S3, Step 5 — 6,700/6,700 bets independently recomputed from seeds, 0 mismatches.
FI-OUTCOME-002N/AA completed bet cannot be replayed via the API to generate a duplicate payout
Dice auto-resolves — single-step game with no separate cashout action. Nonce increments server-side after each bet. No replay surface exists.
Player Isolation2/2
FI-ISO-001PassRNG state is fully independent across rounds — no carry-over from one bet to the next. Each nonce produces a fresh HMAC-SHA256 computation
FI-ISO-002PassOne player's seeds, nonces, and outcomes cannot be observed or influenced by another player — complete cross-user isolation
Follows from seed uniqueness (FI-SEED-003) — if each user has a unique server seed, outcomes are isolated by construction. Confirmed by FI-SEED-004 — zero hash collisions across 20 cross-account rotations.
Payout Integrity2/2
FI-PAYOUT-001PassGame parameters cannot exceed defined limits — valid target values within 0–10000 and bet types over or under are accepted; out-of-range targets, 0% win configurations, and unknown bet_type values rejected HTTP 400
API probe — 3 valid control bets accepted (target=5000 over, target=100 under, target=9900 over). All 5 invalid parameter combinations rejected HTTP 400: target=10001 (above max), target=−1 (below min), target=0 under (0% win chance), bet_type='invalid' (unknown), and target=10001 as numeric type. Recovery control bet accepted. No out-of-range values silently coerced.
FI-PAYOUT-002PassMultiplier and payout fields in the API request are ignored — the server computes all values from its own formula, not from client-supplied values
API probe — 5 injected fields (payout_multiplier=1000, roll_result=0, multiplier='99999', is_win=true with result=0, win_chance='1' with effective_edge=−99) all silently ignored. Server computed its own outcome on every bet at consistent 1.9982× multiplier. noInjectionHonoured=true.
Technical Evidence & Verification4 sections
5.3Coverage Summary15 checks
| Test ID | Category | Verification Source | Status |
|---|---|---|---|
| FI-NONCE-001 | Nonce | S1, Step 4 (data-driven) | Pass |
| FI-NONCE-002 | Nonce | S1, Step 4 (data-driven) | Pass |
| FI-NONCE-003 | Nonce | API probe | Pass |
| FI-NONCE-004 | Nonce | S1, Step 4 (data-driven) | Pass |
| FI-SEED-001 | Seed | API probe | Pass |
| FI-SEED-002 | Seed | S1, Steps 3 & 6 (data-driven) | Pass |
| FI-SEED-003 | Seed | S1, Step 1 (data-driven) | Pass |
| FI-SEED-004 | Seed | API probe | Pass |
| FI-SEED-005 | Seed | API probe | Pass |
| FI-OUTCOME-001 | Determinism | S3, Step 5 (data-driven) | Pass |
| FI-OUTCOME-002 | Determinism | Structural — single-step game | N/A |
| FI-ISO-001 | Isolation | S2, Step 16 (simulation) | Pass |
| FI-ISO-002 | Isolation | Structural — seed uniqueness | Pass |
| FI-PAYOUT-001 | Payout | API probe | Pass |
| FI-PAYOUT-002 | Payout | API probe | Pass |
5.4Additional Integrity Evidence (S1–S4)6 records
| Property | Source | Finding |
|---|---|---|
| 134/134 seed hashes verified | S1, Step 1 | Commit-reveal chain intact |
| 138/138 next-seed promotions | S1, Step 2 | Seed rotation chain intact |
| 6,700/6,700 exact parity | S3, Step 5 | No post-RNG conditional logic |
| Anti-circularity proven | S4, Steps 9–10 + 13 | Live formulas verified on all 6,700 bets; 0.1% edge follows in closed form |
| Early-window return z = +1.120 (one-sided p 0.869) | S4, Step 17 | No seed pre-selection bias |
| 100% client seed influence | S1, Step 6 | Player entropy is genuine |
5.5Scope
This certification covers the 15 standard fairness integrity tests listed above — the minimum required to verify that the provably fair implementation holds up under non-standard conditions. This is not a penetration test. It focuses specifically on the provably fair implementation — not the operator's broader platform security.
Standard scope: The 15 tests above are our standard fairness integrity matrix. The list is applied to every game we audit, with per-game adaptations where a test does not apply (e.g. multi-step replay tests are N/A on auto-resolving single-step games like this one).
No infrastructure testing: Server security, network-level protections and operational controls fall under platform-level security, not game-level fairness, and sit outside this certification.
Point-in-time: Results apply to the game configuration and codebase at the time of audit. Post-audit changes require re-certification.
5.6Reproduction InstructionsRun locally
Data-driven tests (8 of 15): Fully reproducible from the open-source repo. These tests run against the captured dataset and produce deterministic results.
API probe tests (6 of 15): Verified by issuing live adversarial requests against the running game. Per-test evidence (HTTP status codes, server-assigned nonces, seed hashes, server-computed multipliers) is retained in our private adversarial-testing archive and summarised in the integrity test review document. The testing harness itself is kept private so it can't be reused against the game.
git clone https://github.com/ProvablyFair-org/duel-dice.gitcd duel-dice && git checkout v1.3.1npm cinpm run verifyExpected output, as run at v1.3.1 (S5-related steps, mapping added):
[PASS] Step 1 — Seed Hash Integrity → FI-SEED-003
[PASS] Step 3 — Hash Consistency Within Epoch → FI-SEED-002
[FLAG⚑] Step 4 — Nonce Audit → FI-NONCE-001, 002, 004
[PASS] Step 5 — Result Recomputation (RNG + drand absent) → FI-OUTCOME-001
[PASS] Step 6 — Client Seed Influence → FI-SEED-002
[PASS] Step 16 — Simulation Results — Pass 1 Integrity → FI-ISO-001API Probe Tests (completed):
[PASS] FI-NONCE-003 — Invalid nonce handling → 7/7 invalid nonces ignored (HTTP 200)[PASS] FI-SEED-001 — Invalid client seed handling → 6/6 invalid seeds rejected; oversized accepted[PASS] FI-SEED-004 — Cross-user seed pool check → 0/20 collisions across 2 accounts[PASS] FI-SEED-005 — Seed timing analysis → 10 distinct hashes, no time correlation[PASS] FI-PAYOUT-001 — Invalid parameter handling → 5/5 boundary violations rejected (HTTP 400)[PASS] FI-PAYOUT-002 — Multiplier field handling → 0 injections honoured (1.9982× consistent)Player Verification
Can a player verify their own bets without trusting anyone?
Every Dice bet can be checked from public inputs. Save the hashed server seed before you bet. After you rotate, compare the revealed seed's hash with your saved copy, then recompute the roll. This section walks through it, with the ProvablyFair.org verifier, whose code is pinned in the package and run on all 6,700 captured bets.
Key principles
- Save the hashed server seed before you bet: your saved copy is what proves the timing
- Every bet can be reproduced from the server seed, client seed and nonce
- If your recomputed roll matches the game's, the roll was the committed one
- Payouts use the edge of your stake's tier; every captured bet was at the 0.1% tier
What you need
- Server Seed — revealed after seed rotation (casino entropy)
- Client Seed — your player-controlled seed
- Nonce — the bet number in sequence (ensures uniqueness)
- Your target and stake — to check the win and the payout
- Save the hashed server seed before you bet: your saved copy is what proves the timing
- Every bet can be reproduced from the server seed, client seed and nonce
- If your recomputed roll matches the game's, the roll was the committed one
- Payouts use the edge of your stake's tier; every captured bet was at the 0.1% tier
- Server Seed — revealed after seed rotation (casino entropy)
- Client Seed — your player-controlled seed
- Nonce — the bet number in sequence (ensures uniqueness)
- Your target and stake — to check the win and the payout
Player can access all required inputsPass
Client seed origin transparentPass
crypto.getRandomValues (E12); the server only echoes it back (E11); players can set their ownVerification steps documentedPass
SHA-256(hexDecode(serverSeed)), the roll, the win rule, the payoutCasino UI exposes verification panelPass
Independent verifier availablePass
Manual recomputation possiblePass
No hidden or proprietary stepsPass
Only disclosed inputs are used, and identical inputs always give the same roll. Save the hashed seed before you bet, so the timing rests on your own record.
- 1
Save the Commitment
Before your first bet on a seed pair, open the Provably Fair panel and copy the hashed server seed. Keep it outside Duel.
- 2
Bet, Then Rotate
Place your bets. When you're done, rotate the seed pair to reveal the server seed.
- 3
Open a Past Bet
Open the bet from Transactions. Its Verify tab shows the client seed, the revealed server seed and the nonce.
- 4
Check and Recompute
Check that SHA-256 of the hex-decoded server seed equals the hash you saved, not one shown after the reveal. Then recompute the roll and compare it with the game's.
Verify a real bet, step by stepVerify a real bet · Swipe for all 4 steps →
Verify with ProvablyFair.org
Recompute any Dice roll from its revealed seeds, independently of the casino. The audit package pins this verifier and runs it on all 6,700 captured bets.
Open independent verifierBuilt-in verification
The operator’s own verification page. This tool is controlled by Duel.com.
Open Duel verifierVisual Walkthroughstep-by-step
Set your target and bet amount, then roll. This audit covers Roll Over (win if the roll is above your target). The roll is shown on a 0.00–100.00 scale and is fixed by the seeds and nonce before the animation plays.

Illustrative: Duel.com Dice — the Roll Over slider, multiplier and win chance. The "Zero Edge" label is noted, not tested.
Open the Provably Fair panel on the game page. You'll see the active client seed, the hashed server seed (the casino's commitment) and your current nonce. Copy the hashed server seed now, before you bet, and keep it outside Duel: it is your proof of when the seed was fixed. You can also set the client seed for the next pair. Clicking "Rotate seed" retires the active pair and reveals its server seed for your past bets.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action (other players' names masked).
Open Transactions and click a past Dice round. Its Verify tab shows the revealed server seed with the client seed and nonce. SHA-256 of the hex-decoded revealed seed must equal the hash you saved in Step 2:
Server Seed (revealed) — the plaintext value the casino committed to before your bet. Hash it and compare with the commitment you saved before betting.
Client Seed — your player-controlled entropy input.
Nonce — the sequential bet counter for this seed pair.

Per-bet Verify tab — client seed, revealed server seed and nonce for the round (account details masked).
Click Verify to open the Provably Fair page with the seeds filled in. It recomputes the roll and shows it on the slider. If it matches your live roll, and the hash matches your saved copy, the roll was the one committed before you bet.

Provably Fair page — seeds filled in from the Verify tab, recomputed roll shown on the slider.
Manual Verification (Advanced)7 sections
6.5Why Manual Verification Matters
True provably fair verification means you don't trust any casino-provided tool. Manual verification allows you to run calculations on your own machine, eliminate any possibility of a tampered verifier, and understand exactly how results are generated.
6.6How the Algorithm Works (Plain English)
Before you bet, the roll is fixed by three ingredients:
- The server's secret seed — committed by showing its hash before you bet
- Your client seed — generated in your browser by default, or set by you
- The nonce — a counter that makes each bet unique
These go into HMAC-SHA256. The first 4-byte value of the result below 4,294,959,453 is reduced modulo 10,001 to give the roll, an integer from 0 to 10,000, shown as 0.00 to 100.00. On a roll-over bet you win if the roll is above your target; a roll equal to it loses. Your target and stake decide the win and the payout; they never touch the roll. Because the server committed to its seed before you sent your client seed, it can't change the roll afterwards.
6.7Casino Verifier vs ProvablyFair.org Verifier5 records
Two verification tools are available. Both should produce identical results — if they don't, something has changed.
| Duel.com Verifier | ProvablyFair.org Verifier | |
|---|---|---|
| Source | Casino-controlled | Independent (audit codebase) |
| Access | duel.com/provably-fair/verify | provablyfair.org/verify-bets/duel |
| Checked by this audit | Duel's Verify-tab code, run unmodified as a cross-check on 6,700 bets: 0 differ | Same code Step 5 runs on 6,700 bets: 0 differ |
| Trust model | Requires trusting the casino | Open-source, version-controlled |
| Shows | The roll | The roll and the server-seed hash |
6.8JavaScript Verification Script
Run this in Node.js to verify any roll-over bet. It checks the commitment against the hash you saved, recomputes the roll as the specification describes, and prices a win at the 0.1% tier in exact 18-decimal units, the way Duel serves it. It reproduces all 6,700 captured rolls, multipliers and payouts.
const crypto = require('crypto'); // Dice roll, as written in the audit's specification (docs/ALGORITHM.md §2).function computeRoll(serverSeed, clientSeed, nonce) { const key = Buffer.from(serverSeed, 'hex'); // 32 bytes, not the hex text const digest = crypto.createHmac('sha256', key).update(`${clientSeed}:${nonce}`).digest(); const LIMIT = Math.floor(2 ** 32 / 10001) * 10001; // 4294959453 for (let off = 0; off < 32; off += 4) { // eight 4-byte big-endian chunks const v = digest.readUInt32BE(off); if (v < LIMIT) return v % 10001; // 0 … 10000, shown as 0.00 … 100.00 } throw new Error('all 8 chunks rejected');} function verifyHash(serverSeed, savedHash) { const hash = crypto.createHash('sha256').update(Buffer.from(serverSeed, 'hex')).digest('hex'); return hash === savedHash;} // Roll-over pricing at the 0.1% tier, in exact 18-decimal units as Duel serves it.const E18 = 10n ** 18n;const nearest = (num, den) => (2n * (num % den) >= den ? num / den + 1n : num / den);const units = s => { const [w, f = ''] = s.split('.'); return BigInt(w) * E18 + BigInt((f + '0'.repeat(18)).slice(0, 18)); };const show = u => `${u / E18}.${String(u % E18).padStart(18, '0')}`;function multiplier(target) { // 0.999 / ((10000 - target) / 10001) return nearest(999n * 10001n * E18, 1000n * BigInt(10000 - target));}function payout(stake, target) { // nearest unit of stake × the exact multiplier return nearest(units(stake) * 999n * 10001n, 1000n * BigInt(10000 - target));} // Replace with your values. savedHash is the hashed server seed you saved BEFORE betting.const serverSeed = 'YOUR_REVEALED_SERVER_SEED';const savedHash = 'YOUR_SAVED_SERVER_SEED_HASH';const clientSeed = 'YOUR_CLIENT_SEED';const nonce = 0;const target = 5000; // roll over 50.00 → 5000const stake = '0.01'; console.log('Hash check:', verifyHash(serverSeed, savedHash) ? 'PASS' : 'FAIL');const roll = computeRoll(serverSeed, clientSeed, nonce);const win = roll > target; // a roll equal to the target losesconsole.log('Roll:', roll, `(${(roll / 100).toFixed(2)})`, win ? 'WIN' : 'LOSS');console.log('Multiplier at the 0.1% tier:', show(multiplier(target)));console.log('Payout:', win ? show(payout(stake, target)) : '0');6.9Python Verification Script
The same verification in Python (standard library only):
import hashlib, hmac # Dice roll, as written in the audit's specification (docs/ALGORITHM.md §2).def compute_roll(server_seed, client_seed, nonce): key = bytes.fromhex(server_seed) # 32 bytes, not the hex text digest = hmac.new(key, f'{client_seed}:{nonce}'.encode(), hashlib.sha256).digest() limit = (2**32 // 10001) * 10001 # 4294959453 for off in range(0, 32, 4): # eight 4-byte big-endian chunks v = int.from_bytes(digest[off:off + 4], 'big') if v < limit: return v % 10001 # 0 … 10000, shown as 0.00 … 100.00 raise ValueError('all 8 chunks rejected') def verify_hash(server_seed, saved_hash): return hashlib.sha256(bytes.fromhex(server_seed)).hexdigest() == saved_hash # Roll-over pricing at the 0.1% tier, in exact 18-decimal units as Duel serves it.E18 = 10**18def nearest(num, den): q, r = divmod(num, den) return q + 1 if 2 * r >= den else qdef units(s): w, _, f = s.partition('.') return int(w) * E18 + int((f + '0' * 18)[:18])def show(u): return f'{u // E18}.{u % E18:018d}'def multiplier(target): # 0.999 / ((10000 - target) / 10001) return nearest(999 * 10001 * E18, 1000 * (10000 - target))def payout(stake, target): # nearest unit of stake × the exact multiplier return nearest(units(stake) * 999 * 10001, 1000 * (10000 - target)) # Replace with your values. saved_hash is the hashed server seed you saved BEFORE betting.server_seed = 'YOUR_REVEALED_SERVER_SEED'saved_hash = 'YOUR_SAVED_SERVER_SEED_HASH'client_seed = 'YOUR_CLIENT_SEED'nonce = 0target = 5000 # roll over 50.00 → 5000stake = '0.01' print('Hash check:', 'PASS' if verify_hash(server_seed, saved_hash) else 'FAIL')roll = compute_roll(server_seed, client_seed, nonce)win = roll > target # a roll equal to the target losesprint('Roll:', roll, f'({roll / 100:.2f})', 'WIN' if win else 'LOSS')print('Multiplier at the 0.1% tier:', show(multiplier(target)))print('Payout:', show(payout(stake, target)) if win else '0')6.10Payouts and Stake Tiers
Every captured bet was at the 0.1% tier, where the multiplier is 0.999 / win_chance and the scripts above match Duel to the last decimal. For a larger stake, find your tier in Duel's Dice config (E14): data.scaling_edge is keyed by win-chance range; take the range whose key and range_to hold 10000 − target, then the tier whose min_bet and max_bet bracket your stake, and read its house_edge. The tier boundaries fit multiplier = (1 − edge) / win_chance; that pricing above the 0.1% tier was not verified. The verifier on this site shows the 0.1% tier multiplier.
6.11Evidence Screenshots9 records
| Evidence | Description |
|---|---|
| E01 | The Dice game, with the target slider, multiplier, win chance and the "Zero Edge" label |
| E02 | Fairness page overview: where the seed information is shown. It states no edge or RTP figure |
| E03 | Duel's verify page with Dice selected. Its Code panel is collapsed; the full source is E13 |
| E04 | Illustrative: the Provably Fair panel — active client seed, hashed server seed, nonce, new client seed and next hashed seed |
| E09 | Illustrative: the Verify tab — the Dice calculation form, its game result and the start of the Code panel |
| E11 | The rotation response echoes the client seed you submit and returns the active and next commitments |
| E12 | Duel's browser seed generator: 16 characters from a 63-character alphabet, rejection-sampled crypto.getRandomValues |
| E13 | Duel's Dice Verify-tab source, copied 25 September 2026 and run unmodified as a cross-check |
| E14 | Duel's Dice config as fetched 5 October 2026: 122 win-chance ranges and 10,712 stake tiers |
Verify a real bet, step by stepVerify a real bet · Swipe for all 4 steps →
How it works
- 1
Save the Commitment
Before your first bet on a seed pair, open the Provably Fair panel and copy the hashed server seed. Keep it outside Duel.
- 2
Bet, Then Rotate
Place your bets. When you're done, rotate the seed pair to reveal the server seed.
- 3
Open a Past Bet
Open the bet from Transactions. Its Verify tab shows the client seed, the revealed server seed and the nonce.
- 4
Check and Recompute
Check that SHA-256 of the hex-decoded server seed equals the hash you saved, not one shown after the reveal. Then recompute the roll and compare it with the game's.
Visual Walkthroughstep-by-step
Set your target and bet amount, then roll. This audit covers Roll Over (win if the roll is above your target). The roll is shown on a 0.00–100.00 scale and is fixed by the seeds and nonce before the animation plays.

Illustrative: Duel.com Dice — the Roll Over slider, multiplier and win chance. The "Zero Edge" label is noted, not tested.
Open the Provably Fair panel on the game page. You'll see the active client seed, the hashed server seed (the casino's commitment) and your current nonce. Copy the hashed server seed now, before you bet, and keep it outside Duel: it is your proof of when the seed was fixed. You can also set the client seed for the next pair. Clicking "Rotate seed" retires the active pair and reveals its server seed for your past bets.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action (other players' names masked).
Open Transactions and click a past Dice round. Its Verify tab shows the revealed server seed with the client seed and nonce. SHA-256 of the hex-decoded revealed seed must equal the hash you saved in Step 2:
Server Seed (revealed) — the plaintext value the casino committed to before your bet. Hash it and compare with the commitment you saved before betting.
Client Seed — your player-controlled entropy input.
Nonce — the sequential bet counter for this seed pair.

Per-bet Verify tab — client seed, revealed server seed and nonce for the round (account details masked).
Click Verify to open the Provably Fair page with the seeds filled in. It recomputes the roll and shows it on the slider. If it matches your live roll, and the hash matches your saved copy, the roll was the one committed before you bet.

Provably Fair page — seeds filled in from the Verify tab, recomputed roll shown on the slider.
Technical evidence
6.5Why Manual Verification Matters
True provably fair verification means you don't trust any casino-provided tool. Manual verification allows you to run calculations on your own machine, eliminate any possibility of a tampered verifier, and understand exactly how results are generated.
6.6How the Algorithm Works (Plain English)
Before you bet, the roll is fixed by three ingredients:
- The server's secret seed — committed by showing its hash before you bet
- Your client seed — generated in your browser by default, or set by you
- The nonce — a counter that makes each bet unique
These go into HMAC-SHA256. The first 4-byte value of the result below 4,294,959,453 is reduced modulo 10,001 to give the roll, an integer from 0 to 10,000, shown as 0.00 to 100.00. On a roll-over bet you win if the roll is above your target; a roll equal to it loses. Your target and stake decide the win and the payout; they never touch the roll. Because the server committed to its seed before you sent your client seed, it can't change the roll afterwards.
6.7Casino Verifier vs ProvablyFair.org Verifier5 records
Two verification tools are available. Both should produce identical results — if they don't, something has changed.
| Duel.com Verifier | ProvablyFair.org Verifier | |
|---|---|---|
| Source | Casino-controlled | Independent (audit codebase) |
| Access | duel.com/provably-fair/verify | provablyfair.org/verify-bets/duel |
| Checked by this audit | Duel's Verify-tab code, run unmodified as a cross-check on 6,700 bets: 0 differ | Same code Step 5 runs on 6,700 bets: 0 differ |
| Trust model | Requires trusting the casino | Open-source, version-controlled |
| Shows | The roll | The roll and the server-seed hash |
6.8JavaScript Verification Script
Run this in Node.js to verify any roll-over bet. It checks the commitment against the hash you saved, recomputes the roll as the specification describes, and prices a win at the 0.1% tier in exact 18-decimal units, the way Duel serves it. It reproduces all 6,700 captured rolls, multipliers and payouts.
const crypto = require('crypto'); // Dice roll, as written in the audit's specification (docs/ALGORITHM.md §2).function computeRoll(serverSeed, clientSeed, nonce) { const key = Buffer.from(serverSeed, 'hex'); // 32 bytes, not the hex text const digest = crypto.createHmac('sha256', key).update(`${clientSeed}:${nonce}`).digest(); const LIMIT = Math.floor(2 ** 32 / 10001) * 10001; // 4294959453 for (let off = 0; off < 32; off += 4) { // eight 4-byte big-endian chunks const v = digest.readUInt32BE(off); if (v < LIMIT) return v % 10001; // 0 … 10000, shown as 0.00 … 100.00 } throw new Error('all 8 chunks rejected');} function verifyHash(serverSeed, savedHash) { const hash = crypto.createHash('sha256').update(Buffer.from(serverSeed, 'hex')).digest('hex'); return hash === savedHash;} // Roll-over pricing at the 0.1% tier, in exact 18-decimal units as Duel serves it.const E18 = 10n ** 18n;const nearest = (num, den) => (2n * (num % den) >= den ? num / den + 1n : num / den);const units = s => { const [w, f = ''] = s.split('.'); return BigInt(w) * E18 + BigInt((f + '0'.repeat(18)).slice(0, 18)); };const show = u => `${u / E18}.${String(u % E18).padStart(18, '0')}`;function multiplier(target) { // 0.999 / ((10000 - target) / 10001) return nearest(999n * 10001n * E18, 1000n * BigInt(10000 - target));}function payout(stake, target) { // nearest unit of stake × the exact multiplier return nearest(units(stake) * 999n * 10001n, 1000n * BigInt(10000 - target));} // Replace with your values. savedHash is the hashed server seed you saved BEFORE betting.const serverSeed = 'YOUR_REVEALED_SERVER_SEED';const savedHash = 'YOUR_SAVED_SERVER_SEED_HASH';const clientSeed = 'YOUR_CLIENT_SEED';const nonce = 0;const target = 5000; // roll over 50.00 → 5000const stake = '0.01'; console.log('Hash check:', verifyHash(serverSeed, savedHash) ? 'PASS' : 'FAIL');const roll = computeRoll(serverSeed, clientSeed, nonce);const win = roll > target; // a roll equal to the target losesconsole.log('Roll:', roll, `(${(roll / 100).toFixed(2)})`, win ? 'WIN' : 'LOSS');console.log('Multiplier at the 0.1% tier:', show(multiplier(target)));console.log('Payout:', win ? show(payout(stake, target)) : '0');6.9Python Verification Script
The same verification in Python (standard library only):
import hashlib, hmac # Dice roll, as written in the audit's specification (docs/ALGORITHM.md §2).def compute_roll(server_seed, client_seed, nonce): key = bytes.fromhex(server_seed) # 32 bytes, not the hex text digest = hmac.new(key, f'{client_seed}:{nonce}'.encode(), hashlib.sha256).digest() limit = (2**32 // 10001) * 10001 # 4294959453 for off in range(0, 32, 4): # eight 4-byte big-endian chunks v = int.from_bytes(digest[off:off + 4], 'big') if v < limit: return v % 10001 # 0 … 10000, shown as 0.00 … 100.00 raise ValueError('all 8 chunks rejected') def verify_hash(server_seed, saved_hash): return hashlib.sha256(bytes.fromhex(server_seed)).hexdigest() == saved_hash # Roll-over pricing at the 0.1% tier, in exact 18-decimal units as Duel serves it.E18 = 10**18def nearest(num, den): q, r = divmod(num, den) return q + 1 if 2 * r >= den else qdef units(s): w, _, f = s.partition('.') return int(w) * E18 + int((f + '0' * 18)[:18])def show(u): return f'{u // E18}.{u % E18:018d}'def multiplier(target): # 0.999 / ((10000 - target) / 10001) return nearest(999 * 10001 * E18, 1000 * (10000 - target))def payout(stake, target): # nearest unit of stake × the exact multiplier return nearest(units(stake) * 999 * 10001, 1000 * (10000 - target)) # Replace with your values. saved_hash is the hashed server seed you saved BEFORE betting.server_seed = 'YOUR_REVEALED_SERVER_SEED'saved_hash = 'YOUR_SAVED_SERVER_SEED_HASH'client_seed = 'YOUR_CLIENT_SEED'nonce = 0target = 5000 # roll over 50.00 → 5000stake = '0.01' print('Hash check:', 'PASS' if verify_hash(server_seed, saved_hash) else 'FAIL')roll = compute_roll(server_seed, client_seed, nonce)win = roll > target # a roll equal to the target losesprint('Roll:', roll, f'({roll / 100:.2f})', 'WIN' if win else 'LOSS')print('Multiplier at the 0.1% tier:', show(multiplier(target)))print('Payout:', show(payout(stake, target)) if win else '0')6.10Payouts and Stake Tiers
Every captured bet was at the 0.1% tier, where the multiplier is 0.999 / win_chance and the scripts above match Duel to the last decimal. For a larger stake, find your tier in Duel's Dice config (E14): data.scaling_edge is keyed by win-chance range; take the range whose key and range_to hold 10000 − target, then the tier whose min_bet and max_bet bracket your stake, and read its house_edge. The tier boundaries fit multiplier = (1 − edge) / win_chance; that pricing above the 0.1% tier was not verified. The verifier on this site shows the 0.1% tier multiplier.
6.11Evidence Screenshots9 records
| Evidence | Description |
|---|---|
| E01 | The Dice game, with the target slider, multiplier, win chance and the "Zero Edge" label |
| E02 | Fairness page overview: where the seed information is shown. It states no edge or RTP figure |
| E03 | Duel's verify page with Dice selected. Its Code panel is collapsed; the full source is E13 |
| E04 | Illustrative: the Provably Fair panel — active client seed, hashed server seed, nonce, new client seed and next hashed seed |
| E09 | Illustrative: the Verify tab — the Dice calculation form, its game result and the start of the Code panel |
| E11 | The rotation response echoes the client seed you submit and returns the active and next commitments |
| E12 | Duel's browser seed generator: 16 characters from a 63-character alphabet, rejection-sampled crypto.getRandomValues |
| E13 | Duel's Dice Verify-tab source, copied 25 September 2026 and run unmodified as a cross-check |
| E14 | Duel's Dice config as fetched 5 October 2026: 122 win-chance ranges and 10,712 stake tiers |
Only disclosed inputs are used, and identical inputs always give the same roll. Save the hashed seed before you bet, so the timing rests on your own record.
Reproducibility & Artifacts
Can anyone independently reproduce every finding in this audit?
This section covers the repository, the release tag, the commands and the reproduction gate. Every finding, statistic and pass/fail result can be reproduced by anyone with a computer. The repository is the credential, not this report.
Repository Details
- GitHub: ProvablyFair-org/duel-dice
- Release: v1.3.1 · Framework 1.1
- Original audit: 4380a5a · June 2026
- Public Verifier: provablyfair.org/verify-bets/duel
Prerequisites
- Node.js 22.x (
.nvmrc) - npm
- Git
- GitHub: ProvablyFair-org/duel-dice
- Release: v1.3.1 · Framework 1.1
- Original audit: 4380a5a · June 2026
- Public Verifier: provablyfair.org/verify-bets/duel
- Node.js 22.x (
.nvmrc) - npm
- Git
npm test at release v1.3.1 reproduces the committed results: 20 PASS + 1 capture-origin FLAG, 0 hard fails, REPRODUCED, exit 0. Runs write to outputs/run/ and never overwrite the evidence of record.
Commands to Reproduce
npm test runs the 20 unit tests, then the 21 scored steps against the captured bets, then the reproduction gate. It scores the committed simulation and re-derives its statistics; it doesn't rerun the full simulation. npm run test:full does. node verify.js gives the same verdict with no install.
The scored steps on their own. Results go to outputs/run/, never over the committed evidence.
Pass 1: the 2,000,000-roll census and 1,000,000 rounds for each of the 98 targets on their pinned seed pairs. Pass 2: each of the 134 revealed casino seeds for 10,000 nonces. Writes to outputs/run/.
Informational, not scored: prints the stake-tier figures of Duel's 5 October 2026 config (E14) and where each captured bet falls in it. Read-only.
Audit Reproducibility Pinning
- Release
v1.3.1(Framework 1.1)- Original audit
4380a5a9d715467f3a0184b32390dff60580fdb2(4 June 2026)- Node Version
- 22.x (
.nvmrc,package.jsonengines) - Dataset
- data/dice-master-6700bets.json (6,700 bets, 138 seed records)
- Dataset Hash (SHA-256)
- 3550ffca07a6f7825f96cdd4e3d8c3cd57898b5b5238b9739753a754cff056d6
- Dice Config Hash (E14, SHA-256)
- 745be0686f27f94eb74930a71847d97b087780ba27eecbb60bf989257c025c1d
- Capture
- 11 April 2026
- Audit ID
- PF-2026-DL02
Output Artifacts6 files of record
| File | Contents | Size |
|---|---|---|
| verification-results.json | All 21 step results, profile coverage, verdict | ~60KB |
| determinism-log.json | 6,700 verified, 0 mismatches, 0 skipped | 57B |
| chi-squared-results.json | Live win counts against the win chance at targets 9800 and 9700 | 312B |
| rtp-claim-table.json | RTP claim: the exact RTP of all 9,997 targets against 99.9% (PASS) | ~1.4MB |
| simulation-results.json | Pass 1 (2M-roll census + 98M rounds) + Pass 2 (134 seeds × 10,000 nonces) | ~70KB |
| rtp-convergence.html | Self-contained RTP convergence chart | ~208KB |
Repository Structure
duel-dice/ (release v1.3.1) ├── src/ │ ├── rng.ts → HMAC-SHA256 roll with rejection sampling, written from docs/ALGORITHM.md │ ├── simulate.ts → Monte Carlo: 2M-roll census + 98M Pass 1 rounds + Pass 2 on casino seeds │ ├── sim-config.ts → The pinned simulation design │ ├── stats.ts → Chi-squared, runs test, normal tails │ ├── false-alarm.ts → False-alarm rate of every statistical rule on a fair game │ ├── loader.ts → Dataset loader, hash check, capture plan │ ├── rtp-claim.ts → Framework rule RTP-CLAIM 1.2.0 │ ├── rtp-settings.ts → The flat 99.9% claim and the RTP claim table │ ├── operator-verifier.ts → Runs Duel's Verify-tab code unmodified (cross-check) │ ├── site-verifier.ts, live-site-verifier.ts → Load the pinned ProvablyFair.org verifiers │ ├── artifact-pins.ts → SHA-256 pins for the artifacts of record │ ├── profile-map.ts → Step → Dice profile check (DICE-01 … DICE-30) │ └── domains.ts, diff.ts, types.ts, rtp-claim-switch.ts, false-alarm-pass2.ts ├── tests/ │ ├── verify.ts → 21 scored steps + the reproduction gate │ ├── steps/ → commitment, determinism, payouts, dataset, simulation, │ │ coverage, bias, monotonicity, live-fit, statistical │ ├── dice/ → Mocha unit tests (20, incl. the spec self-test) │ └── mutations.json → Mutation battery registry ├── docs/ALGORITHM.md, INTERFACE.md → The written specification and module interface ├── data/dice-master-6700bets.json → 6,700 live bets (4 phases, 138 seed records) ├── evidence/ → Screenshots, Duel's Verify-tab code (E13), Dice config (E14) ├── verifier-parity/ → Pinned copies of both ProvablyFair.org verifiers and the operator runner ├── capture/ → Reference record of the capture script ├── outputs/ → Committed evidence of record (runs write to outputs/run/) ├── scripts/ → mutate.mjs, release-manifest.mjs, check-site-verifier.mjs, dice-config-tiers.mjs ├── verify.js, test.js → Standalone verifier and unit tests, no install needed ├── RELEASE-MANIFEST.json → Release identity, artifact hashes, verdict, signature ├── MANIFEST.md → Consolidated audit overview ├── README.md └── package.json, package-lock.json, .nvmrc (Node 22.x), LICENSE (MIT)
Step-to-Section Cross-Reference21 verification steps mapped
| Step | Test Name | Report Section |
|---|---|---|
| 1 | Seed Hash Integrity | S1, S5 |
| 2 | Next-Seed Promotion + Forward Commitment Chain | S1, S5 |
| 3 | Hash Consistency Within Epoch | S1 |
| 4 | Nonce Audit (capture flag) | S1, S5 |
| 5 | Result Recomputation (RNG + drand absent) | S1, S2, S3, S5 |
| 6 | Client Seed Influence | S1, S2, S5 |
| 7 | Payout Math | S3, S4, S5 |
| 8 | Win Condition (result > target) & Outcome Range | S3 |
| 9 | Multiplier Formula (0.999 / win_chance) | S3, S4, S5 |
| 10 | Win Chance Formula ((10000 − target) / 10001) | S3 |
| 11 | Population & Phase Labels | S3 |
| 12 | Dataset Hash & Artifact Value Domains | S7 |
| 13 | Probability Independence (Anti-Circularity) | S4 |
| 14 | Epoch Size | S1 |
| 15 | Phase D — Client Seed Variation | S1, S5 |
| 16 | Simulation Results — Pass 1 Integrity | S2, S4 |
| 17 | Simulation Results — Pass 2 Cherry-Pick Test | S4, S5 |
| 18 | Configuration Coverage (target space, stake levels, direction mode) | S3 |
| 19 | Draw Bias Bound (Sampling Uniformity) | S2, S5 |
| 20 | Multiplier Monotonicity & Bounds | S3 |
| 21 | Live-Sample Fit (informational) | S4 |
reproduce-audit.sh
npm test at release v1.3.1 reproduces the committed results: 20 PASS + 1 capture-origin FLAG, 0 hard fails, REPRODUCED, exit 0. Runs write to outputs/run/ and never overwrite the evidence of record.
Reproduction Gate & Release5 sections
7.1Exit Codes
The exit code is the verdict:
| Code | Meaning |
|---|---|
0 | PROVABLY FAIR — Full Pass, and this run reproduces the committed artifacts. A capture flag is printed and recorded but exits 0 |
1 | At least one hard fail, or a reproduction difference beyond tolerance |
2 | At least one operator-origin FLAG — PROVABLY FAIR — Conditional Pass |
5 | RTP FIGURE OVERSTATED: no roll check failed, but the RTP claim rule found targets beyond the ±0.1 pp band on the house side |
7.2The Reproduction Gate
npm run verify writes this run's results to outputs/run/ (gitignored) and compares them field by field with the committed results in outputs/, at 1e-14 absolute + 1e-12 relative. Two distinct integers never agree. A re-run can't replace the evidence it scores; refreshing the evidence takes PF_EMIT=1 and a re-pin in the same commit.
Committed artifacts NOT modified.Reproduction vs the committed artifacts on Node 22.23.4: REPRODUCED7.3SHA-256 Pinned Artifacts
The verifier checks the dataset hash before any step runs. Step 12 hashes the four artifacts of record it doesn't produce itself, and the RTP claim table has its own pin; a missing or altered one fails. The release manifest hashes all seven files below.
| File | SHA-256 |
|---|---|
| data/dice-master-6700bets.json | 3550ffca07a6f7825f96cdd4e3d8c3cd57898b5b5238b9739753a754cff056d6 |
| outputs/simulation-results.json | 530f6d3f38e7405c4c9d6553670a18230604ef9edaceb94bfe0b998f352adcad |
| outputs/chi-squared-results.json | 5ce2dc93a0e7f74fc3b3ac06af905de25d6e7d9993d8f3752cec0ccccf2ad75c |
| outputs/determinism-log.json | 966a9955e0beb3afd2bb493812d06aad2f51bb4db991f333c3a9ae010dfc7d53 |
| outputs/rtp-convergence.html | b62b2c5627eba0cfc248ec3bc77428433095d9ed8514f8f3a69f1c4dd25ad738 |
| outputs/verification-results.json | 117d608ece52e5c18b1444f9e1f40215e3876c16c613cd99d2326961487547ff |
| outputs/rtp-claim-table.json | e64b30bd61642193f2ee3d7d1c6f615267c0f3cbd243395e4fd325bd482a4f75 |
node scripts/release-manifest.mjs --check checks that all seven hashes match the files on disk.
7.4Mutation Battery & Runtime
Mutation battery: 48 / 48 mutations killed and all 21 scored steps have a killing mutation, no declared survivors (npm run mutate, 22 October 2026).
Runtime: npm test took 10 s on an Apple M2 Max (release manifest, 28 September 2026). Runtime varies by machine.
7.5Release History
| Release | What changed | Verdict |
|---|---|---|
v1.0.0 | The original audit | PROVABLY FAIR — Full Pass |
v1.1.0 | Re-certified under Framework 1.1: 21 scored steps, the RTP claim rule switched on, Step 4 reported as a capture flag, a mutation battery; dataset unchanged | Unchanged |
v1.2.0 | RNG code rebuilt from a written specification; Duel's Verify-tab code kept as a cross-check only | Unchanged |
v1.3.0 | Simulation Pass 1 back to 98 targets × 1,000,000 rounds; adds .gitattributes | Unchanged |
v1.3.1 | Errata: two internal code labels removed from a source comment and one sentence of the overview; no step, figure or verdict changed | Unchanged |
Game Profile Coverage
Is every check in the Dice profile covered?
The Dice profile (version 1.0.2) lists 30 checks, DICE-01 to DICE-30. Each one is covered by a scored step, a package check, or marked n/a with a reason. Three are partial, where the package says so.
| Check | Covered by | Coverage | What it covers |
|---|---|---|---|
| DICE-01 | Step 1 | Full | Revealed seeds hash to their commitments; every bet-bearing epoch's seed revealed |
| DICE-02 | Step 2 | Full | Promotions and forward links recomputed from the raw hashes, plus the pre-capture link |
| DICE-03 | Steps 3, 4 | Full | One commitment and one client seed per epoch, epochs taken from capture order |
| DICE-04 | Step 4 | Full | Gaps, repeats and reorders fail unless they match a capture retry (4, capture flag) |
| DICE-05 | Steps 11, 14 | Full | Bets, seed records, phases, epoch count and epoch size bound to the capture plan |
| DICE-06 | Steps 6, 15 | Partial | Client seed influence and Phase D seeds. Partial: the capture's A–C seeds came from Math.random(), not a CSPRNG |
| DICE-07 | Step 5 | Full | Every bet recomputed to its served roll as an exact integer; coverage equals all 6,700 bets |
| DICE-08 | Step 19 | Full | Draw-bias bound exact (0); rejection census |
| DICE-09 | Package check | Full | RNG rebuilt from the written specification; Duel's Verify-tab code run unmodified as a cross-check |
| DICE-10 | Step 8 | Full | Win flag equals result > target on every bet; every roll inside 0–10,000 |
| DICE-11 | Step 7 | Full | Payouts exact on the 18-decimal grid, no tolerance |
| DICE-12 | Step 7 | Partial | Phase C stake invariance. Partial: 5 wins at $10, below the profile's 100 |
| DICE-13 | Step 9 | Full | Served multiplier equals 0.999 / win chance at 18 decimals on every bet |
| DICE-14 | Step 20 | Full | Multiplier strictly falls as win chance rises; every served multiplier inside the declared band |
| DICE-15 | Step 18 | Partial | Target bands, stake levels and mode coverage. Partial: roll-under was not captured |
| DICE-16 | — | n/a | No bet response carries a running balance |
| DICE-17 | Step 8 | Full | Strict boundary witnessed by a live tie and a just-above-tie; roll floor and ceiling witnessed |
| DICE-18 | Steps 10, 13 | Full | Win chance from a tally of the 10,001 rolls; the casino field compared, never used; negative control |
| DICE-19 | Step 13 | Full | RTP identity at all 9,997 targets and the RTP claim |
| DICE-20 | Step 16 | Full | 2M-roll census and 98 targets × 1M rounds, re-derived from the stored counts; the lag-1 value itself is stored |
| DICE-21 | Step 17 | Full | Pass 2 cherry-pick test on all 134 revealed seeds, on the targets each epoch served |
| DICE-22 | Step 21 | Full | Live-roll fit and serial checks (informational) |
| DICE-23 | Package check | Full | The package’s S5 matrix, each row mapped to the scored steps |
| DICE-24 | Step 5 | Full | Both ProvablyFair.org verifiers (pinned copies) run on every bet |
| DICE-25 | Package check | Full | Player verification steps in order, with the commitment encoding |
| DICE-26 | Step 12 | Full | Dataset pinned by SHA-256 |
| DICE-27 | Step 12 | Full | Pinned artifacts and value domains |
| DICE-28 | Package check | Full | Fresh-clone reproduction record, including the standalone verifier |
| DICE-29 | Package check | Full | Mutation battery: every scored step has a killing mutation |
| DICE-30 | Package check | Full | Limitations register and load-bearing premises |