
Video Poker
Independent verification, backed by open-source code.
- Live Bets Verified
- 5,400
- Parity Rate
- 100%
- Simulated Rounds
- 10M
- Enumerated RTP · base tier
- 99.9%
- Base stake tier, optimal play
Verification pipeline
Real bets. Independently reproduced.
Placed anonymously at Duel.com. We rebuilt the game logic from scratch and matched all 5,400 recorded outcomes.
The casino result, reproduced.
- Casino outcome
- No winning hand
- Our reproduction
- No winning hand
- Recorded payout
- $0.0000
- Seed Hash IntegrityPass
- Commitment LinkagePass
- Hash ConsistencyPass
- Outcome RecomputationPass
- Client Seed InfluencePass
- Payout MathPass
- Multiplier ProvenancePass
- Bet-Size InvariancePass
- House Edge AuditPass
- Config & Payout CoveragePass
- Epoch SizePass
- Population & PhasesPass
- Dataset HashPass
- Phase D — Client SeedPass
- Anti-CircularityPass
- Simulation Pass 1 (Fisher’s)Pass
- Cherry-Pick Test (Pass 2)Pass
- Hand ClassificationPass
- Hold ValidityPass
- Replacement PoolPass
- Deck IntegrityPass
- Card Rank DistributionPass
- Card Suit DistributionPass
- Phase E Hold PatternsPass
- Optimal-Play RTP + ClaimPass
- Reconstructed HandsPass
- Artifact IntegrityPass
The repo is the credential. Every finding ships as code. At release v1.2.1, npm test runs the unit tests and all 28 scored steps against the 5,400 captured hands, then compares the fresh results with the committed ones. It prints 27 PASS + 1 capture-origin FLAG, 0 hard fails, REPRODUCED, and exits 0.
PROVABLY FAIR — Full Pass. We captured 5,400 real Video Poker hands on Duel.com on 24 April 2026 and recomputed every deck, dealt hand, replacement pool, final hand and payout with our own implementation, written from the specification. 27 of 28 steps pass, with one capture flag (two nonces our capture script missed, not a Duel issue) and no hard fails. Certified under ProvablyFair.org Framework 1.1 at release v1.2.1.
Audit Verdict
| Check | Result | Evidence |
|---|---|---|
| Overall Status | Pass | PROVABLY FAIR — Full Pass. 27 of 28 steps pass, 1 capture flag, 0 hard fails (Framework 1.1, release v1.2.1). The capture flag is Step 4: limited by our capture script, not a Duel issue. |
| Enumerated RTP | Pass | 99.9000% at the base stake tier (bets up to $1,182.85), from all C(52,5) = 2,598,960 deals × 32 holds; the same engine reproduces 9/6 Jacks or Better at 99.5439%. RTP claim (RTP-CLAIM 1.2.0): Duel's game settings state a 0.1% edge for this tier, and the figure is 0.000000 pp from it, inside the ±0.1 pp band: PASS (Step 26) |
| Live ↔︎ Verifier Parity | Pass | 5,400 / 5,400 hands: deck, dealt hand, replacement pool and final hand match. Duel's Verify-tab code, run unmodified as a cross-check, and the ProvablyFair.org verifier agree on all 5,400 (Step 5) |
| Commit-Reveal System | Pass | 110 / 110 revealed server seeds hash to their commitments; 114 forward links plus the pre-capture anchor are consistent (Steps 1–3). That each commitment was shown before its bets rests on the capture's rotation records |
| Nonce Audit | Capture flag | 108 / 110 epochs gap-free, no duplicates, none out of order. Two 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: 500 / 500 sampled hands change under a wrong client seed, and 500 Phase D hands recompute under an auditor-set seed (Steps 6, 15). Duel's default seed is generated in the browser and players can set their own |
| RNG Analysis | Pass | Our own HMAC-SHA256 Fisher–Yates implementation, written from the specification, reproduces every deck; every swap index is exactly uniform, and 0 of 275,400 captured draws were rejected (Steps 5, 22) |
| Payout Logic | Pass | 1,196 wins and 4,204 losses settled exactly on the served amounts (integer 1e-18 units, no tolerance); the served multiplier equals the pinned pay table on 5,400 / 5,400 (Steps 7, 8) |
| Anti-Circularity | Pass | Theoretical deal-only RTP 33.7238% from all 2,598,960 hands classified by our own evaluator; the enumerated RTP uses the pay table alone, no casino RTP figure (Steps 16, 26) |
| Fairness Integrity | Pass | 16 fairness integrity tests (15 standard + 1 Video-Poker-specific) — 14 pass, 1 N/A (no replay surface — card sequence fixed at deal time), 1 flag disclosed (FI-PAYOUT-001: duplicate held card accepted — input-validation gap, does not affect fairness) |
| Determinism | Pass | Every deck, replacement pool and final hand recomputes from (serverSeed, clientSeed, nonce) and the recorded holds |
| Reproducibility | Pass | npm test at v1.2.1: REPRODUCED, exit 0. Runs write to outputs/run/ and are compared with the committed results |
Overall StatusPass
v1.2.1). The capture flag is Step 4: limited by our capture script, not a Duel issue.Enumerated RTPPass
Live ↔︎ Verifier ParityPass
Commit-Reveal SystemPass
Nonce AuditCapture flag
Client SeedPass
RNG AnalysisPass
Payout LogicPass
Anti-CircularityPass
Fairness IntegrityPass
DeterminismPass
ReproducibilityPass
npm test at v1.2.1: REPRODUCED, exit 0. Runs write to outputs/run/ and are compared with the committed resultsWhat Was Audited
✓ Audited
- Every deck is set by the server seed, client seed and nonce, and recomputes exactly (5,400 / 5,400)
- The dealt hand and the replacement pool are both fixed at deal time; your hold only picks which pool cards fill the discards
- Revealed server seeds match their commitments (110 / 110), and the 115 seed records fit together
- Your client seed is a genuine input: changing it changes the deck
- Every hand is classified correctly and paid exactly from the pinned pay table
- Enumerated optimal-play RTP is 99.9000%, matching the 0.1% edge Duel's game settings state for the base stake tier
- The stake does not change the deck ($0.01 and $10 bets)
- Players can check every hand, the deal and the draw
What Audit Excludes
- Scaling house edge above the base stake tier (from $1,182.86, up to 0.61%) — explained from the config in S4.5
- Max win
- Rakeback, Zero Edge and promotions — 99.9% is the enumerated 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 backward Fisher–Yates 52-card shuffle written from the specification, rejection sampling, bias bound |
| Two-Step Game Flow | Deal (5 cards) and draw (final hand from holds + replacement pool), both verified |
| Payout Logic | 10-rank pay table, exact settlement, base-tier edge field, stake invariance (Phase C) |
| Live Parity | Our recomputation, Duel's Verify-tab code (cross-check) and the ProvablyFair.org verifier against every live hand |
| RTP Validation | Anti-circularity (deal-only), 10M-round simulation, optimal-play enumeration, 9/6 cross-validation, RTP claim rule, cherry-pick test (Pass 2) |
| Hand Classification | Our own evaluator re-classifies all 5,400 final hands |
| Hold Pattern Coverage | Phase E: 8 planned hold patterns, 100 hands each |
| Fairness Integrity | Standard integrity matrix — tests across commit-reveal, determinism, payout, isolation, and parameter enforcement |
| Game Profile Coverage | All 32 Video Poker 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 hand (5,400 / 5,400), deal and draw
- At the base stake tier, optimal-play RTP is 99.9000% by exhaustive enumeration of all 2,598,960 deals × 32 holds (134,459 canonical classes); the same engine reproduces 9/6 Jacks or Better at 99.5439%
- Duel's stated 0.1% edge for the base tier holds under the RTP claim rule (0.000000 pp off, inside ±0.1 pp)
- The client seed is a genuine input: 500 / 500 sampled hands change under a wrong seed
- The hold cannot change the deck: the 10-card window is fixed at deal time
References
Video Poker — Game Rules6 sections▶
Video Poker on Duel.com is a 5-card draw poker game played against a fixed pay table. The player is dealt 5 cards from a 52-card deck, chooses which to hold and which to discard, and the discarded cards are replaced from a pre-determined pool to form a final 5-card hand. The full 52-card shuffle (initial 5 + 5-card replacement pool) is committed via HMAC-SHA256 backward Fisher-Yates before the deal animation — your hold choice cannot change the cards available to you.
How to Play
1. Enter bet amount — Choose how much to wager on the hand.
2. Deal — The platform deals 5 cards from positions 0–4 of the shuffled 52-card deck.
3. Hold — Select which of the 5 cards to keep (0 to 5 cards). The remaining cards are discarded.
4. Draw — The platform replaces the discarded cards with positions 5–9 of the same shuffle, consumed left-to-right.
5. Outcome — The final 5-card hand is evaluated. Payout = bet amount × multiplier for the hand rank.
Win Conditions
The win condition in Video Poker depends on the rank of your final 5-card hand against the pay table.
| Outcome | Condition | Example |
|---|---|---|
| Royal Flush | 10, J, Q, K, A all of the same suit | 10♠ J♠ Q♠ K♠ A♠ → 812.97× — ~1 in 649,740 on the deal |
| Straight Flush | Five sequential cards of the same suit | 5♠ 6♠ 7♠ 8♠ 9♠ → 58× |
| Four of a Kind | Four cards of the same rank | K♠ K♥ K♦ K♣ 4♠ → 26× |
| Full House | Three of a kind plus a pair | J♠ J♥ J♦ 5♣ 5♠ → 9× |
| Flush | Five cards of the same suit (non-sequential) | 2♠ 7♠ 9♠ J♠ K♠ → 6× |
| Straight | Five sequential cards (mixed suits) | 5♦ 6♠ 7♥ 8♦ 9♣ → 4× |
| Three of a Kind | Three cards of the same rank | Q♠ Q♥ Q♦ 6♣ 2♦ → 3× |
| Two Pair | Two pairs of different ranks | 10♠ 10♥ 4♦ 4♣ 7♠ → 2× |
| Jacks or Better | A pair of Jacks, Queens, Kings, or Aces | K♦ K♠ 7♥ 5♣ 3♠ → 1× |
| No Win | Anything below a pair of Jacks | 9♦ 6♠ 4♥ J♣ 2♦ → 0× |
Hold Strategy & RTP
The core mechanic of Video Poker is the player's hold decision — which cards to keep from the initial 5-card deal.
- Hold choice does not change the deck — the 10-card window (5 dealt + 5 replacement pool) is fixed at deal time; holds only select which positions take pool cards
- Hold choice determines the RTP achieved — the 99.9% figure is the optimal-play return at the base stake tier, reached only with the best hold for every hand
- Sub-optimal play earns less — the deal-only RTP (33.7%) is what the five dealt cards return with no draw at all
- The edge depends on the stake tier — 0.1% at the base tier (up to $1,182.85), rising 0.01% per tier to 0.61% at the top tier
Parameters
| Parameter | Value | Notes |
|---|---|---|
| Deck Size | 52 cards | Standard playing-card deck (4 suits × 13 ranks) |
| Initial Hand Size | 5 cards | Dealt from positions 0–4 of the shuffle |
| Replacement Pool | 5 cards | Positions 5–9 of the same shuffle, consumed left-to-right by hold pattern |
| Hand Ranks | 10 (Royal Flush → No Win) | Standard 5-card poker rankings |
| Hold Choices | 0–5 cards | Player decides per hand which to keep |
| House Edge | 0.1% at the base tier | Rises 0.01% per stake tier above $1,182.85, to 0.61% |
| Optimal-Play RTP | 99.9000% (base tier) | Exhaustive C(52,5) = 2,598,960 deals × 32 hold patterns |
| Deal-Only RTP | 33.7238% | Return of the five dealt cards with no draw — anti-circularity proof |
| RNG Algorithm | HMAC-SHA256 | Backward Fisher–Yates over 52 cards with rejection sampling |
Seed Formats
Every Video Poker hand uses three cryptographic inputs to generate the deck.
| Seed Type | Format | Example | Purpose |
|---|---|---|---|
| Server Seed | 64-char hex (32 bytes) | 2424d436197860c9… | Casino-provided randomness |
| Client Seed | Alphanumeric string | cpc4ihmPtvpHpapv | Player-contributed entropy |
| Nonce | Integer from 0 | 6 | One per hand within an epoch |
Multiplier Table & Payout
Payouts are set by the rank of the final 5-card hand. These are the base-tier multipliers; under optimal play they return exactly 99.9000%.
win_amount = bet_amount × multiplier_table[hand_rank]| Hand Rank | Multiplier | Hand Count (of 2,598,960) | P(rank) × multiplier |
|---|---|---|---|
| Royal Flush | 812.9719× | 4 | 0.0012512 |
| Straight Flush | 58× | 36 | 0.0008034 |
| Four of a Kind | 26× | 624 | 0.0062425 |
| Full House | 9× | 3,744 | 0.0129652 |
| Flush | 6× | 5,108 | 0.0117924 |
| Straight | 4× | 10,200 | 0.0156986 |
| Three of a Kind | 3× | 54,912 | 0.0633854 |
| Two Pair | 2× | 123,552 | 0.0950780 |
| Jacks or Better | 1× | 337,920 | 0.1300212 |
| No Win | 0× | 2,062,860 | 0.0000000 |
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 deck (same initial cards AND same replacement pool) |
2. Randomness & Entropy Model
| Test | Description |
|---|---|
| RNG depends only on seeds + nonce | No external inputs (drand absent from Video Poker) |
| No mixed entropy sources | No timestamps, Math.random, etc. |
| Unbiased mapping | Bias-free rejection sampling with maxFair ceiling eliminates modulo bias for all ranges (2–52) |
| No state leakage | RNG isolated per round — each value uses its own counter in the HMAC message |
3. Verifier ↔︎ Live Parity
| Test | Description |
|---|---|
| Live outcomes match verifier | 5,400 / 5,400 hands recomputed with 0 mismatches — dealt hand and final hand after holds |
| Multi-phase verification | Phases A (broad sampling, 3,000), B (targeted hands, 1,000), C (bet-size invariance, 100), D (auditor seed, 500), E (systematic hold patterns, 800) |
| Bet-size invariance | $10 bets produce same decks as $0.01 bets (Phase C, 100/100 verified) |
| Hold pattern coverage | Phase E: the 8 planned hold patterns, 100 hands each |
4. Game Logic & RTP Validation
| Test | Description |
|---|---|
| Anti-circularity proof | Σ P(rank) × multiplier = 33.7238% from independent C(52,5) = 2,598,960 enumeration (deal-only) |
| Optimal-play RTP solver | 99.9000% from exhaustive C(52,5) × 32 hold patterns enumeration; 134,459 canonical strategy classes |
| Solver cross-validation | Same solver on standard 9/6 Jacks or Better → 99.5439% (target match to 6 decimal places) |
| House edge audit | 0.1% at the base tier: effective_edge 0.1 on every captured deal and draw; higher tiers explained from the config |
| Payout rules correctness | Win amount equals stake × multiplier exactly (integer 1e-18 units, no tolerance) |
| Simulated RTP convergence | 10M Pass 1 rounds, Fisher's combined p = 0.7982; deal-only RTP 33.6999% consistent with 33.7238% |
| Cherry-pick detection | Captured-window rank-sum Z = −0.018 vs −3.090 over 110 casino seeds — no sign of seed pre-selection |
| RTP claim rule (RTP-CLAIM 1.2.0) | Duel's 99.9% for the base tier, scored on Step 26 with a ±0.1 pp band — PASS |
5. Fairness Integrity & Player Verification
| Test | Description |
|---|---|
| Player can reproduce results offline | Using seeds + nonce + backward Fisher-Yates 52-card shuffle |
| Verifier logic matches live logic | Our RNG (written from the spec), Duel's Verify-tab code and the ProvablyFair.org verifier agree on all 5,400 hands |
| Verifier publicly accessible | ProvablyFair.org verifier — no login required |
| No reliance on private APIs | Fully client-side verification |
| Hold/discard integrity (VP-specific) | Hold choice cannot alter deck composition — 5,400 / 5,400 verified; Phase E's 800 hands cover the 8 planned hold patterns |
| 28 scored steps | Commit-reveal, determinism, payout, distribution, cherry-pick, hand classification, hold validity, replacement pool, deck integrity, optimal-play RTP, artifact integrity |
High-Level Flow
To get an overview of how the process works, here is a high-level breakdown:
1. Player Bets — Selects bet amount and clicks “deal”
2. Seeds Combined — HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:k) for each value drawn
3. RNG Output — Backward Fisher-Yates over 52 cards: 51 iterations from i=51 downto 1, each step swaps positions[i] with a bias-free random index
4. Initial Deal — deck[0..4] become the player’s 5-card initial hand
5. Player Holds — Player selects which cards to keep (0–5 cards); discarded positions are tracked
6. Draw — Discarded positions are filled from deck[5..9], consumed left-to-right
7. Hand Evaluation — Final 5-card hand classified into one of 10 ranks
8. Payout Result — win_amount = bet_amount × multiplier_table[hand_rank]
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 computes the entire 52-card shuffled deck using HMAC-SHA256 with the server seed (hex-decoded) as the HMAC key and the client seed, nonce and counter k as the message. The same server seed and client seed pair are used for every bet in the epoch; the player can rotate the seed pair at any time to end the epoch.
Reveal Phase:
After the player rotates to a new seed pair, the server reveals the plaintext server seed from the completed epoch. The player can now independently verify SHA-256(hexDecode(serverSeed)) = committedHash.
Verify Phase:
Anyone can recompute every bet's full 52-card shuffled deck from the revealed server seed, client seed, and nonce using the published backward Fisher-Yates algorithm. The initial cards (deck[0..4]) and replacement pool (deck[5..9]) are both verifiable. Combined with the recorded hold pattern, the final hand is fully reconstructible.
Player-Controlled Client Seed
Duel generates the default client seed in your browser and sends it when you rotate seeds. You can set your own 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 the player rotates to a new server seed
Seed Epoch: (serverSeed, clientSeed) Bet 1: nonce = 0 → Deck A → Initial + PoolBet 2: nonce = 1 → Deck B → Initial + PoolBet 3: nonce = 2 → Deck C → Initial + Pool...Bet N: nonce = N−1 → Deck Z → Initial + Pool [Player rotates seed — epoch complete]Next bet: nonce = 0 → Deck X (new seed pair)Determinism Guarantee
Given identical inputs, the output is always identical:
HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:k) → Always same hashSame hash per step → Always same swap index in Fisher-YatesSame swaps across all 51 steps → Always same shuffled 52-card deckSame deck → Always same initial cards (deck[0..4]) AND same replacement pool (deck[5..9])Same initial + same hold pattern + same pool → Always same final handSame final hand → Always same hand rank → Always same payout (for the same stake)Technical Glossary6 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, two 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: stakes up to $1,182.85 for Video Poker. Every captured hand was played 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 shuffled deck. |
| 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 that increments per bet within an epoch. Starts at 0 and resets to 0 when the player rotates to a new server seed. |
| Hashed Server Seed | SHA-256(hexDecode(serverSeed)) — the commitment hash shown before betting. After rotation, players verify the revealed seed produces this hash. |
| Counter (k) | The number in the HMAC message clientSeed:nonce:k. It starts at 0 and moves on by one for every value read, accepted or rejected. With no rejected value, as in every captured hand, k = 51 − i. |
| Epoch | A sequence of consecutive bets sharing the same server seed and client seed pair. Ends when the player rotates to a new seed pair. This audit covered 110 bet-bearing epochs. |
Cryptographic Functions
| Term | Definition |
|---|---|
| HMAC-SHA256 | Hash-based Message Authentication Code using SHA-256. Duel Video Poker uses HMAC-SHA256 with the hex-decoded server seed as key and clientSeed:nonce:k as message: 51 calls per hand when no value is rejected, one per swap. |
| 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. |
| Backward Fisher-Yates Shuffle | A variant of the Fisher-Yates algorithm that iterates from index 51 down to 1, swapping each position with a random lower index. Produces a uniformly random permutation of the 52-card deck. |
Verification Terms
| Term | Definition |
|---|---|
| Verifier | A tool that recomputes the 52-card deck (deal and replacement pool) from the seeds and nonce. Step 5 runs ProvablyFair.org's verifier code, pinned by SHA-256, on all 5,400 hands. |
| Parity | Degree of matching between verifier and live game results. 100% parity = every deck (both halves) matches and every final hand reconstructs. This audit: 5,400/5,400 exact match. |
| Anti-Circularity | Proof that RTP derives from first principles, not casino's own claims. Σ P(rank) × multiplier from independent C(52,5) enumeration = 33.7238% (deal-only); cross-validated optimal-play solver returns 99.9000%. |
| Optimal-Play RTP | The expected return with the best hold for every dealt hand, computed by exhaustive enumeration of all 2,598,960 deals × 32 holds. Duel.com Video Poker: 99.9000% at the base stake tier. |
| Cross-Validation | Re-running the optimal-play solver against the standard 9/6 Jacks or Better pay table (target 99.5439%) before computing the Duel.com RTP. Checks the solver independently of the audited pay table. Match: 99.543904% vs 99.5439%. |
| Rejection Sampling | Removes modulo bias: a value at or above floor(2^32 / range) × range is rejected and the counter moves on, so every swap index is exactly uniform for every range 2–52. |
Game Mechanics
| Term | Definition |
|---|---|
| Initial Cards | The first 5 cards dealt to the player (deck[0..4]). Determined cryptographically before the deal animation plays. |
| Replacement Pool | The next 5 cards in the shuffled deck (deck[5..9]). These replace any cards the player discards, consumed left-to-right by the hold pattern. |
| Hold Pattern | A 5-bit pattern indicating which positions the player chose to keep from the initial deal. The player can hold 0 to 5 cards. Held cards remain; non-held positions consume from the replacement pool in order. |
| Final Hand | The 5-card hand after the draw. Constructed deterministically from (initial_cards, hold_pattern, replacement_pool). Evaluated against the 10-rank pay table. |
| Hand Rank | The poker rank of the final 5-card hand: Royal Flush, Straight Flush, Four of a Kind, Full House, Flush, Straight, Three of a Kind, Two Pair, Jacks or Better, or No Win. |
| Pay Table | The mapping from hand rank to multiplier. Duel's base-tier table returns 99.9% under optimal play, with a Royal Flush of 812.97×. Higher stake tiers scale every line down by the tier's edge. |
| Anti-Circularity (Deal-Only RTP) | The return of the five dealt cards, from the C(52,5) hand counts × the pay table. Equals 33.7238% — a non-circular check of the card probabilities. |
Seed, Nonce & Determinism
Can the casino change your outcome after you bet?
Every Video Poker hand 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. The whole 52-card shuffle, your 5 cards and the replacement pool, is fixed at deal time, so your hold can't change the cards available to you. A hash match shows the records are consistent; the proof of timing is a copy of the hash you saved before playing.
What we verified
- Every revealed server seed hashes to its commitment (110 / 110)
- The 115 seed records fit together: 114 forward links plus the pre-capture anchor
- That each commitment was shown before its bets rests on the capture's rotation records
- Nonces: 108 / 110 epochs gap-free, no duplicates, none out of order; 2 nonces missed by our capture script
- Identical inputs always produce the same 52-card deck (5,400 / 5,400)
- Your client seed is a genuine input: a wrong seed changes the deck in 500 / 500 sampled hands
What this means for you
- Once a server seed is committed, the casino can't swap it for another
- Your 5 cards and the replacement pool are fixed before you see them
- Save the hashed server seed before you play: your saved copy is what proves the timing
- Setting your own client seed adds your input to every deck
- Any hand can be recomputed after you rotate your seed
- Every revealed server seed hashes to its commitment (110 / 110)
- The 115 seed records fit together: 114 forward links plus the pre-capture anchor
- That each commitment was shown before its bets rests on the capture's rotation records
- Nonces: 108 / 110 epochs gap-free, no duplicates, none out of order; 2 nonces missed by our capture script
- Identical inputs always produce the same 52-card deck (5,400 / 5,400)
- Your client seed is a genuine input: a wrong seed changes the deck in 500 / 500 sampled hands
- Once a server seed is committed, the casino can't swap it for another
- Your 5 cards and the replacement pool are fixed before you see them
- Save the hashed server seed before you play: your saved copy is what proves the timing
- Setting your own client seed adds your input to every deck
- Any hand 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 (E18). The capture's own seeds are disclosed in S1.4All 110 revealed seeds hash to their commitments and the 115 seed records fit together. Every deck recomputes from (serverSeed, clientSeed, nonce). When each commitment was shown rests on the capture's rotation records. Step 4 is a capture flag: two nonces our capture script missed, disclosed and verdict-neutral.
| Check | Result | Evidence |
|---|---|---|
| Seed hash integrity | Pass | 110 / 110 revealed seeds hash to their commitments; the one seed retired before the capture is unrevealed (Step 1) |
| Commitment linkage | Pass | All 114 forward links recomputed, plus the pre-capture anchor (Step 2). A consistency check: the timing rests on the capture's rotation records |
| Hash consistency within epoch | Pass | Every bet carries its epoch's committed hash and client seed: 110 bet-bearing epochs, 0 orphan bets (Step 3) |
| Nonce sequencing | Capture flag | 108 / 110 epochs gap-free, no duplicates, 0 out of order. 2 nonces missed on retried requests: limited by our capture script, not a Duel issue (Step 4) |
| Deterministic output | Pass | 5,400 / 5,400 decks, dealt hands and final hands recomputed from (serverSeed, clientSeed, nonce) and the recorded holds (Step 5) |
| Client seed participation | Pass | 500 / 500 sampled hands change under a wrong client seed (Step 6); 500 Phase D hands recompute under an auditor-set seed (Step 15) |
| Client seed origin | Pass | Duel's default seed is browser-generated with crypto.getRandomValues, and players can set their own (E18). The capture's own seeds are disclosed in S1.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 (E18). The capture's own seeds are disclosed in S1.4All 110 revealed seeds hash to their commitments and the 115 seed records fit together. Every deck recomputes from (serverSeed, clientSeed, nonce). When each commitment was shown rests on the capture's rotation records. Step 4 is a capture flag: two nonces our capture script missed, disclosed and verdict-neutral.
How It Works — Seed, Nonce & Determinism8 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 played comes from a copy of the hash you saved before betting.
export function verifyHash(serverSeed: string, serverSeedHashed: string): boolean { let key: Buffer; try { key = decodeServerSeed(serverSeed); } catch { return false; } if (typeof serverSeedHashed !== 'string') return false; const commitment = createHash('sha256').update(key).digest('hex'); return commitment === serverSeedHashed.toLowerCase();}Real Example from Live Data:
// Seed block captured at bet time (hand_id 589162, Phase A, nonce=0){ "serverSeedHashed": "107cca7f92491e65e438a779d79dd253a16ccfef10d5ce5d31d2bcbb3ff22f7b", "clientSeed": "cpc4ihmPtvpHpapv", "nonce": 0} // After seed rotation, the plaintext was revealed as:// serverSeed = "2424d436197860c90bad4022573f14eab6c9da3dcc2d50e57ad7d52357f0fdc9"//// SHA-256 of the revealed seed equals the committed hash above — verified below.Verification:
const crypto = require('crypto'); const serverSeed = "2424d436197860c90bad4022573f14eab6c9da3dcc2d50e57ad7d52357f0fdc9"; const hashedServerSeed = crypto .createHash("sha256") .update(Buffer.from(serverSeed, 'hex')) .digest("hex"); console.log(hashedServerSeed);// Output: 107cca7f92491e65e438a779d79dd253a16ccfef10d5ce5d31d2bcbb3ff22f7b ✅1.2Commitment Linkage (Next-Seed Promotion)
At every rotation Duel shows the hash of the seed it will activate next (nextServerSeedHash). Step 2 recomputes all 114 links from the raw hashes: each epoch's serverSeedHashed must equal the previous record's nextServerSeedHash. The first epoch is checked against the hash the capture read as "next" before its first rotation. The links show the 115 records fit together, not when each hash was shown. That rests on the capture's rotation snapshots, each recorded before its epoch's first bet.
for (let i = 0; i < seeds.length - 1; i++) { linksChecked++; if (seeds[i].seed.nextServerSeedHash === seeds[i + 1].seed.serverSeedHashed) linksOk++; else chainFailures.push( `seed[${i}].nextServerSeedHash != seed[${i + 1}].serverSeedHashed — epoch ${i + 1} was not pre-committed by epoch ${i}`);}match flags agree with the recomputation on all 115 records.1.3Hash Consistency Within Epoch
The capture holds 115 seed records, one for every rotation. 110 carry bets. The other 5 are end-of-phase rotations with no bets, whose seeds are never revealed in the capture.
Step 3 assigns each bet to an epoch by the capture timeline, not by the bet's own hash, and checks that every bet carries its record's committed serverSeedHashed and client seed. A mid-epoch seed change would show up as a disagreement.
for (const e of epochs) { if (e.bets.length === 0) { emptyEpochs++; continue; } betBearing++; const tag = `seeds[${e.index}] (${e.record.seed.serverSeedHashed.substring(0, 16)})`; const hashes = new Set(e.bets.map(b => b.seed.serverSeedHashed)); const clients = new Set(e.bets.map(b => b.seed.clientSeed)); if (hashes.size !== 1) { s3Failures.push(`${tag}: ${hashes.size} distinct serverSeedHashed among its ${e.bets.length} bets`); } else if (!hashes.has(e.record.seed.serverSeedHashed)) { s3Failures.push(`${tag}: its bets carry ${[...hashes][0].substring(0, 16)}, not the hash the rotation committed`); } if (clients.size !== 1) { s3Failures.push(`${tag}: ${clients.size} distinct client seeds among its bets`); } else if (!clients.has(e.record.seed.clientSeed)) { s3Failures.push(`${tag}: its bets carry client seed ${[...clients][0]}, not the rotation record's ${e.record.seed.clientSeed}`); }}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, filled in by the seed-rotation panel and sent only when you rotate (E18). You can replace it with your own at any time. The client seed is an input to every HMAC, so changing it changes the whole deck.
The capture used its own seeds. Phases A, B, C and E took them from the capture script's Math.random() (4,900 bets). Phase D used one auditor seed, pfauditmod66jae, across 11 epochs. These are choices on our side; they don't change what Duel's server does with a seed.
06cSUjVZ68knDfoa0EQGQGelg8FzMyqV0LdEzKLcV16prTqX0ON0D9AwUXWoAKJf1P1dumPdS3fV4hOi
pfauditmod66jae, so the server uses the seed the player sets.1.5Nonce Incrementation
The nonce starts at 0 for each server seed and rises by 1 per hand. One hand, deal and draw together, uses one nonce, whatever you hold. Duel reveals a server seed only when you rotate. Our capture rotated each time a seed's nonce reached 50; that 50-hand epoch is our schedule, not Duel's.
Step 4 checks every epoch for gaps, duplicates and order: each nonce must be above the one served before it in capture time. In two epochs our capture script retried a request and missed one round each: nonce 23 in epoch feec4f63 and nonce 15 in epoch 6076267c. The nonce was consumed, so it shows as a gap. The revealed seed fixes the deal at each missed nonce, but the hold, final hand and payout were not captured, so those two rounds are not verified. Limited by our capture script, not a Duel issue.
if (ss) { // Server seed revealed and hashes to the commitment (seedMap only holds verified pairs): // the initial deal for the missing nonce is derivable. The full round is NOT verified. for (const missedNonce of missingNonces) { const deck = computeShuffledDeck(ss, clientSeed, missedNonce); const hand = deck.slice(0, 5); const rank = evaluateHand(hand); initialDealDerivable++; gapDetails.push( `Epoch ${hash.slice(0, 8)}: nonce ${missedNonce} missed (capture-retry); ` + `initial deal derivable from revealed seed: ${hand.join(',')} → ${rank} ` + `(full missing round not verified)` ); }} else { for (const missedNonce of missingNonces) { unverifiable++; s4Failures.push(`Epoch ${hash.slice(0, 8)}: nonce ${missedNonce} missed and the epoch seed is UNREVEALED — unverifiable`); }}AC,7S,6S,5S,10S → none and KS,7H,4S,3S,QD → none. Disclosed, verdict-neutral.1.6Deterministic Mapping
The deal is fully deterministic: the same server seed, client seed and nonce always give the same 52-card deck. 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:k. The counter k starts at 0 and moves on by one for every value read. Each HMAC gives one value from its first 4 bytes; a value at or above floor(2^32 / range) × range is rejected and the counter moves on. No captured value was rejected, so in every captured hand k = 51 − i. deck[0..4] is the deal and deck[5..9] the replacement pool.
export function computeShuffledDeck( serverSeed: string, clientSeed: string, nonce: number, census?: RejectionCensus,): string[] { return computeShuffledDeckFromBuffer(decodeServerSeed(serverSeed), clientSeed, nonce, census);}deck[0..9] on all 5,400. Outcomes derive only from (serverSeed, clientSeed, nonce).Real Bet Verified:
// Source: data/video-poker-dataset-5400bets.json// hand_id 589162 (Phase A, nonce 0 — first bet of the epoch)// ✅ VERIFIED — deck recomputed from revealed server seed { "serverSeed": "2424d436197860c90bad4022573f14eab6c9da3dcc2d50e57ad7d52357f0fdc9", "serverSeedHashed": "107cca7f92491e65e438a779d79dd253a16ccfef10d5ce5d31d2bcbb3ff22f7b", "clientSeed": "cpc4ihmPtvpHpapv", "nonce": 0, "deal": { "initial_cards": ["8H", "JS", "4D", "10D", "4C"] }, "draw": { "held_cards": ["JS", "4D", "10D"], "final_cards": ["4S", "JS", "4D", "10D", "KS"], "combination": "none", "multiplier": "0", "amount_won": "0" }}Verification:
// computeShuffledDeck("2424d436...", "cpc4ihmPtvpHpapv", 0)//// Backward Fisher-Yates: 51 swaps (i=51 downto 1), 1 HMAC per swap.// Each step: HMAC-SHA256(hexDecode(serverSeed), "cpc4ihmPtvpHpapv:0:{k}")// k starts at 0 and moves on per value read (k = 51 - i here: nothing rejected)// Rejection: v < floor(2^32 / range) × range → j = v % range; swap deck[i] ↔ deck[j]//// Step k=0 (i=51, range=52, limit=0xffffffd0):// HMAC = 4ed6dc5abf2a0d7f4c905c4d32f34c9c55d7e62c4c33db49eb1e816300541c26// v = 0x4ed6dc5a → j = 1322703962 % 52 = 34// swap deck[51]=AC ↔ deck[34]=10S//// Step k=1 (i=50, range=51):// HMAC = d51a7eafd857be2a9839e30a781fae9a9adfccd034cf80ed9bf07055aae5c807// v = 0xd51a7eaf → j = 3575283375 % 51 = 30// swap deck[50]=AS ↔ deck[30]=9S//// Step k=2 (i=49, range=50, limit=0xffffffd2):// HMAC = 4010cbe1c26f386251a8de38fcbece8f3045f3f58e95ef754739b605c6bfeff1// v = 0x4010cbe1 → j = 1074842593 % 50 = 43// swap deck[49]=AH ↔ deck[43]=QC//// ... 48 more swaps ...//// Final deck[0..9] = ["8H","JS","4D","10D","4C","4S","KS","AH","KD","QD"]//// initial_cards = deck[0..4] = ["8H","JS","4D","10D","4C"] ✅// replacement_pool = deck[5..9] = ["4S","KS","AH","KD","QD"] ✅1.7Two-Step Game Flow & Determinism at Deal Time
Video Poker is a two-step interactive game: every bet involves two API calls — a deal (server returns the player's initial 5 cards) and a draw (player sends their held_cards choice; server returns the final 5-card hand and payout). What makes the game provably fair despite the player input in the middle is that the entire 10-card outcome is fixed at deal time. The first 51-step Fisher-Yates shuffle commits the full deck; the player's hold choice only selects which positions consume from the replacement pool — it adds no entropy.
Concretely: deck[0..4] is the initial hand shown to the player. deck[5..9] is the replacement pool. When the player submits held_cards, the server walks positions 0 through 4 in order, keeping any position whose card is in held_cards and consuming the next pool card (left-to-right, starting at deck[5]) for any position that isn't held. This means a player who holds zero cards gets deck[5..9] as their final hand; a player who holds all five gets deck[0..4] back unchanged; and any partial hold composes deterministically from the same fixed deck.
export function computeFinalHand( initialCards: readonly string[], heldCards: readonly string[], replacementPool: readonly string[],): string[] { if (initialCards.length !== HAND_SIZE) { throw new RangeError(`initialCards must have ${HAND_SIZE} cards`); } const held = new Set<string>(); for (const card of heldCards) { if (!initialCards.includes(card)) throw new Error(`held card ${card} is not in the initial hand`); if (held.has(card)) throw new Error(`held card ${card} listed twice`); held.add(card); } const needed = HAND_SIZE - held.size; if (replacementPool.length < needed) { throw new RangeError(`replacement pool has ${replacementPool.length} cards, ${needed} needed`); } const final: string[] = []; let t = 0; for (let p = 0; p < HAND_SIZE; p++) { const card = initialCards[p] as string; if (held.has(card)) { final.push(card); } else { final.push(replacementPool[t] as string); t += 1; } } return final;}(initial_cards, held_cards, replacement_pool) and match the server's final_cards. The hold cannot change the deck; it only decides which positions take pool cards.Real Bet Walkthrough:
// Step 1 — Deal (server-side, before player input):// Shuffle deck from (serverSeed, clientSeed, nonce=0)// Server returns deck[0..4] to the player as initial_cards:// initial_cards = ["8H", "JS", "4D", "10D", "4C"]//// Step 2 — Hold (player input, no entropy added):// Player selects held_cards = ["JS", "4D", "10D"]// This freezes positions 1, 2, 3 of the initial hand.//// Step 3 — Draw (server-side, deterministic):// replacement_pool = deck[5..9] = ["4S", "KS", "AH", "KD", "QD"] (already fixed)// Walk positions 0..4 in order:// pos 0: "8H" — not held → consume pool[0] = "4S"// pos 1: "JS" — held → keep "JS"// pos 2: "4D" — held → keep "4D"// pos 3: "10D" — held → keep "10D"// pos 4: "4C" — not held → consume pool[1] = "KS"// final_cards = ["4S", "JS", "4D", "10D", "KS"] ✅//// Hand classification: "none" (no pair of jacks-or-better)// Multiplier: 0× · Payout: $0.001.8Client Seed Influence
To confirm the client seed is a genuine HMAC input, two tests were run. First, 500 sampled hands were recomputed with a deliberately wrong client seed (wrong-client-seed-test): every one gave a different deck, with no exceptions allowed. Second, Phase D used one auditor-chosen client seed (pfauditmod66jae) for 500 hands, and all 500 recompute to the live deals and final hands. The server uses the seed the player sets.
// Step 6: Client Seed Influencefor (const b of bets) { if (tested >= CLIENT_SEED_SAMPLE) break; const ss = seedMap.get(b.seed.serverSeedHashed); if (!ss) continue; const correctDeck = computeShuffledDeck(ss, b.seed.clientSeed, b.seed.nonce); const wrongDeck = computeShuffledDeck(ss, 'wrong-client-seed-test', b.seed.nonce); tested++; if (!arrEq(correctDeck, wrongDeck)) changed++;}Technical Evidence & Verification5 sections
1.9Evidence Coverage Summary6 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Seed hash integrity (Step 1) | 110 / 110 revealed seeds; 4 phase-opening reveals; 1 unrevealed (retired before the capture) | Pass |
| Commitment linkage (Step 2) | 114 / 114 links + the pre-capture anchor | Pass |
| Hash consistency (Step 3) | 110 bet-bearing epochs, 0 orphan bets | Pass |
| Nonce audit (Step 4) | 108 / 110 clean; 2 capture-retry gaps (limited by our capture script) | Capture flag |
| Outcome recomputation (Step 5) | 5,400 / 5,400 (deck + final hand) | Pass |
| Client seed influence (Step 6) | 500 / 500 + 500 Phase D auditor-seed hands | Pass |
1.10Code References7 source files
| File | Purpose |
|---|---|
| tests/verify.ts | 28 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: deck recomputation and client seed influence |
| src/rng.ts | HMAC-SHA256 backward Fisher–Yates shuffle, written from docs/ALGORITHM.md |
| docs/ALGORITHM.md | The written specification the RNG code was built from |
| src/loader.ts | Dataset loading, seed/bet parsing, dataset and pay-table hash pins |
| capture/capture.reference.js | Non-runnable reference record of the capture script |
1.11Datasets UsedSource artifacts
| Property | Value |
|---|---|
| Source | Live Video Poker game data from Duel.com |
| Total Records | 5,400 bets across 110 bet-bearing epochs (115 seed entries) |
| SHA-256 | 363fd4d4c072a1180ca2e7ab61d0c8dcc6f3300f315449af0d7101dd45dd0654 |
Fields used: serverSeed, serverSeedHashed, nextServerSeedHash, clientSeed, nonce, deal.response.initial_cards, draw.response.initial_cards, draw.response.held_cards, draw.response.final_cards, draw.response.combination, draw.response.multiplier, draw.response.amount_won
1.12Verified Invariants9 invariants
| Invariant | Result |
|---|---|
| SHA-256(hexDecode(serverSeed)) = serverSeedHashed for all 110 revealed seeds | Pass |
| Forward commitment chain consistent over all 114 links, plus the pre-capture anchor | Pass |
| serverSeedHashed and client seed constant within each of the 110 bet-bearing epochs | Pass |
| No duplicated or out-of-order nonce in any epoch | Pass |
| Nonce gaps only where the capture plan records a retry (2) | Capture flag |
| Same inputs produce the same 52-card deck for all 5,400 hands (deal + replacement pool) | Pass |
| Held cards select positions only; the pool is deck[5..9], consumed left to right | Pass |
| Wrong client seed changes the deck in 500 / 500 sampled hands | Pass |
| Duel's default client seed is browser-generated (E18) | Pass |
1.13Reproduction InstructionsRun locally
Clone the repository at the release tag, install, and run the verifier:
git clone https://github.com/ProvablyFair-org/duel-video-poker.gitcd duel-video-poker && git checkout v1.2.1npm cinpm run verifyExpected output, as run at v1.2.1 (lines for this section):
[PASS] Step 1 — Seed Hash Integrity
[PASS] Step 2 — Commitment Linkage
[PASS] Step 3 — Hash Consistency Within Epoch
[FLAG:capture] Step 4 — Nonce Audit
[PASS] Step 5 — Outcome Recomputation
[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 5,400 captured decks, and Duel's own Verify-tab code, run unmodified, agrees as a cross-check. Each of the 51 swaps takes one HMAC-SHA256 value with rejection sampling, so every swap index is exactly uniform.
What we verified
- The RNG is our own implementation, written from the specification, never ported from Duel's code
- It reproduces every captured deck; Duel's Verify-tab code, run unmodified as a cross-check, agrees on all 5,400
- Only the disclosed inputs reach the shuffle: server seed, client seed and nonce
- Every swap index is exactly uniform: the rejection ceiling is a whole number of ranges for every range 2–52
- 10M simulated deals are consistent with the C(52,5) hand-rank distribution (Fisher's p = 0.7982)
- Rank and suit counts across 27,000 live cards find no sign of bias
- Serial tests on 10M rounds find no sign of dependence between consecutive hands
What this means for you
- Each deck is a uniform shuffle of the 52 cards
- No hidden randomness or server-side state enters the deck
- Past hands don't affect future ones
- The algorithm depends only on seeds you can check
- The RNG is our own implementation, written from the specification, never ported from Duel's code
- It reproduces every captured deck; Duel's Verify-tab code, run unmodified as a cross-check, agrees on all 5,400
- Only the disclosed inputs reach the shuffle: server seed, client seed and nonce
- Every swap index is exactly uniform: the rejection ceiling is a whole number of ranges for every range 2–52
- 10M simulated deals are consistent with the C(52,5) hand-rank distribution (Fisher's p = 0.7982)
- Rank and suit counts across 27,000 live cards find no sign of bias
- Serial tests on 10M rounds find no sign of dependence between consecutive hands
- Each deck is a uniform shuffle of the 52 cards
- No hidden randomness or server-side state enters the deck
- Past hands don't affect future ones
- The algorithm depends only on seeds you can check
RNG derived only from disclosed inputsPass
HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:k); every deck recomputes from these alone (Step 5)Implementation written from the specPass
src/rng.ts rebuilt from docs/ALGORITHM.md without opening Duel's code; the spec's own vectors and properties pass 80 / 80Operator code cross-checkPass
deck[0..9] on 5,400 / 5,400 (Step 5)Modulo biasPass
floor(2^32 / range) × range: bias exactly 0 for every range 2–52; 0 of 275,400 captured draws rejected (Step 22)Key encodingPass
Hand-rank distributionPass
Card-level distributionPass
Serial independencePass
Our RNG, written from the specification, reproduces every captured deck, and Duel's own code agrees as a cross-check. Every swap index is exactly uniform by construction. 10M simulated deals and 27,000 live cards find no sign of bias or serial dependence.
| Check | Result | Evidence |
|---|---|---|
| RNG derived only from disclosed inputs | Pass | HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:k); every deck recomputes from these alone (Step 5) |
| Implementation written from the spec | Pass | src/rng.ts rebuilt from docs/ALGORITHM.md without opening Duel's code; the spec's own vectors and properties pass 80 / 80 |
| Operator code cross-check | Pass | Duel's Verify-tab code, run unmodified, gives the same deck[0..9] on 5,400 / 5,400 (Step 5) |
| Modulo bias | Pass | Ceiling floor(2^32 / range) × range: bias exactly 0 for every range 2–52; 0 of 275,400 captured draws rejected (Step 22) |
| Key encoding | Pass | Server seed hex-decoded to 32 bytes; all 5,400 hands recompute with it (Step 5) |
| Hand-rank distribution | Pass | 10M deals, Fisher's combined p = 0.7982, 0 / 10 streams below α = 0.01 (Step 17) |
| Card-level distribution | Pass | Live ranks χ²(12) = 8.39, p = 0.7541; suits χ²(3) = 0.52, p = 0.9150; the 10M-deal census passes at all 10 deck positions (Steps 17, 23, 24) |
| Serial independence | Pass | 10M rounds: lag-1 z = −0.74, runs p = 0.1000 (Step 17) |
RNG derived only from disclosed inputsPass
HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:k); every deck recomputes from these alone (Step 5)Implementation written from the specPass
src/rng.ts rebuilt from docs/ALGORITHM.md without opening Duel's code; the spec's own vectors and properties pass 80 / 80Operator code cross-checkPass
deck[0..9] on 5,400 / 5,400 (Step 5)Modulo biasPass
floor(2^32 / range) × range: bias exactly 0 for every range 2–52; 0 of 275,400 captured draws rejected (Step 22)Key encodingPass
Hand-rank distributionPass
Card-level distributionPass
Serial independencePass
Our RNG, written from the specification, reproduces every captured deck, and Duel's own code agrees as a cross-check. Every swap index is exactly uniform by construction. 10M simulated deals and 27,000 live cards find no sign of bias or serial dependence.
How It Works — RNG & Entropy Model8 sections
2.1RNG Function Implementation
Each hand shuffles a 52-card deck with a backward Fisher–Yates sweep, from index 51 down to 1. Each swap needs one uniform index j in [0, range), where range = i + 1. It comes from HMAC-SHA256(key, clientSeed:nonce:k): the first 4 bytes give a 32-bit value v, and v is used only if it is below floor(2^32 / range) × range. Otherwise the counter k moves on and a new HMAC is computed. After 51 swaps, deck[0..4] is your hand and deck[5..9] is the replacement pool.
This code was written from the specification docs/ALGORITHM.md by an implementer who never opened Duel's code. Duel's own Verify-tab code is run unmodified as a cross-check only.
| Component | Detail |
|---|---|
| Hash function | HMAC-SHA256 |
| Key | Buffer.from(serverSeed, 'hex') — 32 bytes |
| Message | clientSeed:nonce:k, UTF-8 |
| Value | First 4 bytes of the digest, big-endian unsigned 32-bit |
| Rejection | v ≥ floor(2^32 / range) × range is rejected; the counter k moves on |
| Reduction | v % range → swap index j ∈ [0, range) |
| Shuffle | Backward Fisher–Yates: i = 51 down to 1 (51 swaps) |
| Output | deck[0..51] — fully shuffled 52-card deck |
| Hand split | deck[0..4] = initial hand · deck[5..9] = replacement pool |
function drawInt( key: Buffer, clientSeed: string, nonce: number, range: number, counter: { k: number }, census?: RejectionCensus,): number { const limit = maxFairFor(range); for (;;) { const message = `${clientSeed}:${nonce}:${counter.k}`; const digest = createHmac('sha256', key).update(message, 'utf8').digest(); counter.k += 1; // every value read consumes one counter step, accepted or not const v = digest.readUInt32BE(0); if (census) census.chunksRead += 1; if (v >= limit) continue; // rejected (§2 Step 2, O1): move on to k + 1 return v % range; }} export function computeShuffledDeckFromBuffer( keyBuffer: Buffer, clientSeed: string, nonce: number, census?: RejectionCensus,): string[] { if (!Buffer.isBuffer(keyBuffer)) throw new TypeError('keyBuffer must be a Buffer'); if (typeof clientSeed !== 'string') throw new TypeError('clientSeed must be a string'); checkNonce(nonce); const a = ALL_CARDS.slice(); const counter = { k: 0 }; for (let i = DECK_SIZE - 1; i >= 1; i--) { const j = drawInt(keyBuffer, clientSeed, nonce, i + 1, counter, census); const tmp = a[i] as string; a[i] = a[j] as string; a[j] = tmp; if (census) census.swaps += 1; } return a;}deck[0..9] on all 5,400; the spec self-test passes 80 / 80.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 hand (rises by 1 within each epoch) |
| Counter k | System | One per value read (0–50 when nothing is rejected) |
How we know: 5,400 / 5,400 hands recompute from the three declared inputs alone. A hidden input would break the recomputation; it doesn't.
The deck is a pure function of HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:k): no timestamps, no Math.random(), no external APIs, no server-side state.
2.3Modulo Bias Analysis
A swap index comes from v % range, with range running from 52 down to 2. A plain modulo is biased whenever range doesn't divide 2^32. Rejection sampling removes the bias: values at or above floor(2^32 / range) × range are discarded, so the accepted values are a whole number of ranges and every index is equally likely. A rejected value moves the counter on, so the sweep never runs out of values.
For range = 52 (first swap, i = 51):
limit = floor(2^32 / 52) × 52
= 82,595,524 × 52
= 4,294,967,248 (= 0xFFFFFFD0)
Rejected values: 4,294,967,248 … 4,294,967,295 = 48 values
Rejection chance: 48 / 2^32 ≈ 1.118 × 10⁻⁸
Accepted values: a whole number of ranges
→ each index 0–51 equally likely (bias exactly 0)For range = 2 (the last swap) the limit is exactly 2^32, so no value is rejected. Duel's Verify-tab code handles a rejection differently: its ceiling is 0xFFFFFFFF − (0xFFFFFFFF mod range) and it reads up to 8 chunks of the same hash. The two rules agree whenever neither rejects, and neither rejected any of the 275,400 captured draws, so the capture can't tell them apart. Off the capture they can differ: two Pass 2 simulation hands, nonce 20996 on the seed committed as d4cfa432… and nonce 65303 on the seed committed as a4764f4c…, hit a rejected draw. The server's handling of a rejected draw would show only on such a draw, and the capture contains none.
2.4RNG Isolation
Each value in a hand uses its own counter in the HMAC message (clientSeed:nonce:k), and each hand uses its own nonce, so every HMAC call is independent. HMAC-SHA256 is a pseudorandom function: one output says nothing about another. There is no shared state between swaps, hands or epochs.
Evidence: computeShuffledDeckFromBuffer in S2.1 takes (keyBuffer, clientSeed, nonce) and returns a deck, with no class state, no external calls and no memory between hands. Same inputs, same output.
2.5Monte Carlo Simulation (10M Rounds, Fisher's Method)
A 10,000,000-round Monte Carlo simulation (10 streams × 1,000,000 deals, each stream on its own pinned seed pair) checks the deal distribution against the C(52,5) = 2,598,960 hand counts. Video Poker has one configuration, so the per-stream chi-squared p-values are combined with Fisher's method. Every statistic is re-derived by the verifier from the rows the simulation artifact ships.
| Metric | Value |
|---|---|
| Total rounds | 10,000,000 (10 streams × 1,000,000) |
| Fisher's combined p-value | 0.7982 (T = 14.61, df = 20) |
| Streams below α = 0.01 | 0 / 10 |
| Theoretical deal-only RTP | 33.7238% |
| Simulated deal-only RTP | 33.6999% |
| Serial independence fails | 0 |
| Stream | χ² (df=8) | p-value | Stream RTP |
|---|---|---|---|
| 0 | 2.79 | 0.9470 | 33.7783% |
| 1 | 10.13 | 0.2558 | 33.9553% |
| 2 | 8.05 | 0.4289 | 33.6137% |
| 3 | 5.61 | 0.6906 | 33.4908% |
| 4 | 6.63 | 0.5765 | 33.7638% |
| 5 | 7.68 | 0.4658 | 33.7676% |
| 6 | 9.21 | 0.3247 | 33.6854% |
| 7 | 8.56 | 0.3805 | 33.6398% |
| 8 | 7.39 | 0.4956 | 33.6640% |
| 9 | 6.70 | 0.5697 | 33.6400% |
| Hand Rank | Theoretical (per C(52,5)) | Expected in 10M | Observed |
|---|---|---|---|
| Royal flush | 4 / 2,598,960 | 15.4 | 15 |
| Straight flush | 36 / 2,598,960 | 138.5 | 128 |
| Four of a kind | 624 / 2,598,960 | 2,401.0 | 2,431 |
| Full house | 3,744 / 2,598,960 | 14,405.8 | 14,375 |
| Flush | 5,108 / 2,598,960 | 19,654.0 | 19,439 |
| Straight | 10,200 / 2,598,960 | 39,246.5 | 39,653 |
| Three of a kind | 54,912 / 2,598,960 | 211,284.5 | 210,806 |
| Two pair | 123,552 / 2,598,960 | 475,390.2 | 474,827 |
| Jacks or better | 337,920 / 2,598,960 | 1,300,212.4 | 1,300,469 |
| None | 2,062,860 / 2,598,960 | 7,937,251.8 | 7,937,857 |
/** * Monte Carlo simulation for Duel.com Video Poker audit. * * Pass 1 — Multi-stream Fisher's method (10 streams × 1M rounds = 10M total). * Video Poker is a single-config game (Jacks or Better), so we use multi-stream * with Fisher's combined p-value instead of per-config Bonferroni. This matches * the methodology for Crash (also single-config). Each stream uses an independent * pinned seed pair. Per-stream chi-squared on hand-rank distribution, combined via * Fisher's method: T = -2 Σ ln(p_i) ~ χ²(2K). Serial independence tested on the * full 10M combined stream. * * Methodology rule: multi-config → Bonferroni; single-config → Fisher's. *Method (per src/simulate.ts): single-config → Fisher's, T = −2 Σ ln(p_i) ~ χ²(2K). Serial independence is tested on the full 10M sequence (lag-1 autocorrelation and the Wald–Wolfowitz runs test, recomputed from a 10 × 10 rank-transition census).
Pass 2 (cherry-pick test): every one of the 110 revealed casino seeds is dealt for 100,000 nonces with its captured client seed (11,000,000 rounds). The captured window (nonces 0–49) is ranked among its seed's 2,000 windows of 50; the rank sums give Z = −0.018 against a critical −3.090. The older chi-squared screen still reconciles (5 / 110 seeds flagged at α = 0.05, binomial p = 0.6485; pooled χ²(9) = 6.20, p = 0.7200; pooled deal-only RTP 33.7328%) but no longer decides. Section 4 has the full cherry-pick test.
2.6Serial Independence
Consecutive hands should not be correlated: a win or loss on one hand says nothing about the next. Two tests run on the full 10M-round Pass 1 sequence, both recomputed by the verifier from the shipped rank-transition census:
Lag-1 autocorrelation: Measures correlation between the hand ranks of consecutive deals. Expected r ≈ 0 for independent sequences. Threshold: |z| > 3 (where z = r × √n).
Wald-Wolfowitz runs test: Tests whether the sequence of above/below-median outcomes has the expected number of runs. p < 0.01 indicates non-random structure.
export function lag1Autocorrelation(series: readonly number[]): number { const n = series.length; const mean = series.reduce((a, b) => a + b, 0) / n; let num = 0, den = 0; for (let i = 0; i < n - 1; i++) num += (series[i] - mean) * (series[i + 1] - mean); for (let i = 0; i < n; i++) den += (series[i] - mean) ** 2; return den === 0 ? 0 : num / den;}2.7Card-Level Distribution (Live Bets)
Beyond the hand-rank test, two finer tests look for per-card bias. Across all 5,400 live hands, the 27,000 dealt cards were tallied by rank (13) and by suit (4). The 10M-deal simulation also counts how often each of the 52 cards reached each of the first 10 deck positions:
| Test | Statistic | df | p-value | Interpretation |
|---|---|---|---|---|
| Card rank distribution (Step 23) | χ² = 8.39 | 12 | 0.7541 | All 13 ranks near the expected ≈ 2,077 each |
| Card suit distribution (Step 24) | χ² = 0.52 | 3 | 0.9150 | Suits: ♦ 6,756 · ♥ 6,707 · ♠ 6,790 · ♣ 6,747 |
| Dealt-card census, 10M deals (Step 17) | χ² per position, 10 positions | 51 | smallest 0.0015 | Each position against 1/52 at family α 0.01 (Bonferroni 0.001); smallest p at deck index 2 (χ² 86.25) |
Why this matters: the hand-rank test checks the whole distribution, but a subtle positional bias could slip past it. The per-card tests check each card on its own. The 10M-deal census is the definitive check, and the live tests agree with it.
2.8Worked Example — Full RNG Trace
Real hand from the dataset — hand_id 589162 (Phase A, nonce 0, first hand of the epoch). Recomputed from data/video-poker-dataset-5400bets.json:
serverSeed = 2424d436197860c90bad4022573f14eab6c9da3dcc2d50e57ad7d52357f0fdc9
clientSeed = cpc4ihmPtvpHpapv
nonce = 0| i | k | range | HMAC[:8] | uint32 | j | swap |
|---|---|---|---|---|---|---|
| 51 | 0 | 52 | 4ed6dc5a | 1,322,703,962 | 34 | deck[51]↔︎deck[34] |
| 50 | 1 | 51 | d51a7eaf | 3,575,283,375 | 30 | deck[50]↔︎deck[30] |
| 49 | 2 | 50 | 4010cbe1 | 1,074,842,593 | 43 | deck[49]↔︎deck[43] |
| 48 | 3 | 49 | 7f1e7e17 | 2,132,704,791 | 28 | deck[48]↔︎deck[28] |
| 47 | 4 | 48 | 9ee28fc3 | 2,665,648,067 | 35 | deck[47]↔︎deck[35] |
hand_id 589162 — initial cards deck[0..4] and replacement pool deck[5..9] match backward Fisher-Yates recomputation exactly. Player held [JS, 4D, 10D]; final hand [4S, JS, 4D, 10D, KS] recomputes from (initial, held, pool) deterministically. Hand classification: none. Multiplier: 0×. Payout: $0.00.The remaining 46 swaps (i = 46 down to 1) follow the same pattern: one HMAC per value, the value kept if it is below the limit, then deck[i] swapped with deck[v % range]. Nothing was rejected in this hand, so k = 51 − i. The scripts in S6 reproduce the full chain.
Technical Evidence & Verification5 sections
2.9Evidence Coverage Summary9 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Implementation from the spec (Step 5) | 5,400 / 5,400 hands; Duel's code agrees as a cross-check | Pass |
| Key encoding (hex, not UTF-8) | All 5,400 hands recompute with the hex-decoded key | Pass |
| Draw bias bound (Step 22) | Exact 0 for every range 2–52; 0 of 275,400 draws rejected | Pass |
| No external entropy (Step 5) | 5,400 / 5,400 reproduced from (serverSeed, clientSeed, nonce) only | Pass |
| Simulation Pass 1 (Step 17) | Fisher's p = 0.7982; 0 / 10 streams below α = 0.01 | Pass |
| Simulation Pass 2 cherry-pick (Step 18) | Rank-sum Z = −0.018 vs −3.090; χ² screen 5 / 110 (binomial p = 0.6485) | Pass |
| Card rank distribution (Step 23) | χ²(12) = 8.39, p = 0.7541 | Pass |
| Card suit distribution (Step 24) | χ²(3) = 0.52, p = 0.9150 | Pass |
| Serial independence (Step 17) | r₁ = −0.000233; runs p = 0.1000 | Pass |
2.10Code References9 source files
| File | Purpose |
|---|---|
| src/rng.ts | HMAC-SHA256 backward Fisher–Yates shuffle, written from docs/ALGORITHM.md |
| docs/ALGORITHM.md | The written specification of the deal and draw |
| tests/videoPoker/RngSpecTests.ts | The specification's own vectors and properties, run against src/rng.ts |
| src/operator-verifier.ts | Runs Duel's captured Verify-tab code unmodified, as a cross-check |
| src/simulate.ts | Monte Carlo: 10M Pass 1 + 11M Pass 2 |
| src/stats.ts | Chi-squared, lag-1 autocorrelation, Wald–Wolfowitz runs test, Fisher's method |
| tests/steps/determinism.ts | Steps 5–6: deck recomputation and client seed influence |
| tests/steps/simulation.ts | Steps 16–18: anti-circularity, Pass 1, Pass 2 |
| tests/steps/game-specific.ts | Steps 22–24: draw bias bound, card rank and suit tests |
2.11Verified Invariants11 invariants
| Invariant | Result |
|---|---|
| Our RNG reproduces the 52-card deck for all 5,400 hands | Pass |
| Key is hex-decoded (not UTF-8) | Pass |
| Rejection ceiling is a whole number of ranges for every range 2–52 (bias exactly 0) | Pass |
| No external entropy needed for any deck | Pass |
| 10M deals consistent with the C(52,5) counts (Fisher's p = 0.7982) | Pass |
| Card rank counts consistent with uniform across 27,000 dealt cards (p = 0.7541) | Pass |
| Card suit counts consistent with uniform across 27,000 dealt cards (p = 0.9150) | Pass |
| Lag-1 autocorrelation negligible on 10M rounds (r₁ = −0.000233) | Pass |
| Runs test p ≥ 0.01 on 10M rounds (p = 0.1000) | Pass |
| Pass 2 captured-window rank-sum above the critical value (Z = −0.018 vs −3.090) | Pass |
| Client seed change produces a different deck in 500 / 500 sampled hands | Pass |
2.12Datasets UsedSource artifacts
2.13Reproduction InstructionsRun locally
Clone the repository at the release tag, install, and run the verifier and the simulation:
git clone https://github.com/ProvablyFair-org/duel-video-poker.gitcd duel-video-poker && git checkout v1.2.1npm cinpm run verify # Steps 5, 17, 18, 22–24 cover S2npm run simulate # optional: re-derive Pass 1 + Pass 2 into outputs/run/Expected output, as run at v1.2.1 (lines for this section):
[PASS] Step 5 — Outcome Recomputation
[PASS] Step 17 — Simulation Validation — Pass 1
[PASS] Step 18 — Pass 2 Cherry-Pick Detection
[PASS] Step 22 — Deck Integrity
[PASS] Step 23 — Card Rank Distribution
[PASS] Step 24 — Card Suit DistributionVerifier Parity
Does the live game actually follow its own rules?
The verifier must produce the exact same deck as the live game for every hand. Video Poker has two halves, deal and draw, so both must match: the dealt hand from deck[0..4], and the final hand built by applying the player's holds to deck[5..9]. Three implementations check every hand: ours, Duel's Verify-tab code and the ProvablyFair.org verifier.
What we verified
- Every hand recomputed from seeds: the full deck, not just the payout
- Both halves verified: the dealt hand and the final hand after holds
- Duel's Verify-tab code, run unmodified as a cross-check, agrees on all 5,400
- The ProvablyFair.org verifier on this site agrees on all 5,400: dealt hand, final hand, rank and multiplier
- Hand classification matches our own evaluator on 5,400 / 5,400
- Payouts settle exactly on the served amounts, with no tolerance
- The stake is not an RNG input ($0.01 and $10 bets)
What this means for you
- The verifier reproduces the exact deal, replacement pool and final hand of the live game
- Every hand can be recomputed by anyone after seed rotation
- Your stake, client seed and hold don't alter the deck
- The live game matches the published algorithm on every captured hand
- Every hand recomputed from seeds: the full deck, not just the payout
- Both halves verified: the dealt hand and the final hand after holds
- Duel's Verify-tab code, run unmodified as a cross-check, agrees on all 5,400
- The ProvablyFair.org verifier on this site agrees on all 5,400: dealt hand, final hand, rank and multiplier
- Hand classification matches our own evaluator on 5,400 / 5,400
- Payouts settle exactly on the served amounts, with no tolerance
- The stake is not an RNG input ($0.01 and $10 bets)
- The verifier reproduces the exact deal, replacement pool and final hand of the live game
- Every hand can be recomputed by anyone after seed rotation
- Your stake, client seed and hold don't alter the deck
- The live game matches the published algorithm on every captured hand
Deck recomputationPass
deck[0..4] and replacement pool deck[5..9] verified for every hand (Step 5)Site verifier parityPass
Hand classificationPass
evaluateHand(final_cards) matches the server's combination (Step 19)Final-hand compositionPass
Payout correctnessPass
Pay table integrityPass
videoPokerConfig.json for its rank on 5,400 / 5,400 (Step 8)Bet-size independencePass
Hold pattern coveragePass
All 5,400 hands match our recomputation exactly: deck, replacement pool, final hand after holds, hand rank, multiplier and payout, across all five capture phases. Duel's own code and the ProvablyFair.org verifier agree on every hand.
| Check | Result | Evidence |
|---|---|---|
| Deck recomputation | Pass | 5,400 / 5,400: dealt hand deck[0..4] and replacement pool deck[5..9] verified for every hand (Step 5) |
| Site verifier parity | Pass | The ProvablyFair.org verifier's code (pinned by SHA-256) run on all 5,400 hands with their holds: 0 differ on dealt hand, final hand, rank or multiplier (Step 5) |
| Hand classification | Pass | 5,400 / 5,400: our evaluateHand(final_cards) matches the server's combination (Step 19) |
| Final-hand composition | Pass | 5,400 / 5,400 final hands rebuild from (dealt hand, held cards, replacement pool) (Steps 5, 21) |
| Payout correctness | Pass | Exact on the served decimal strings (integer 1e-18 units, no tolerance): 1,196 wins, 4,204 losses (Step 7) |
| Pay table integrity | Pass | Served multiplier equals videoPokerConfig.json for its rank on 5,400 / 5,400 (Step 8) |
| Bet-size independence | Pass | 100 Phase C hands at $10 recompute, classify and pay exactly; 18 are paying hands (Step 9) |
| Hold pattern coverage | Pass | Phase E: 800 / 800 hands across the 8 planned hold patterns (Step 25) |
Deck recomputationPass
deck[0..4] and replacement pool deck[5..9] verified for every hand (Step 5)Site verifier parityPass
Hand classificationPass
evaluateHand(final_cards) matches the server's combination (Step 19)Final-hand compositionPass
Payout correctnessPass
Pay table integrityPass
videoPokerConfig.json for its rank on 5,400 / 5,400 (Step 8)Bet-size independencePass
Hold pattern coveragePass
All 5,400 hands match our recomputation exactly: deck, replacement pool, final hand after holds, hand rank, multiplier and payout, across all five capture phases. Duel's own code and the ProvablyFair.org verifier agree on every hand.
How It Works — Verifier Parity9 sections
3.1Why Parity Matters
If the verifier gave different results from the live game, players couldn't rely on it. A single discrepancy would mean a bug in the verifier, a change in the live game, or an RNG mismatch. With the revealed seeds, the verifier must give the same 52-card deck as the live game: the same dealt hand, the same replacement pool and, after the recorded holds, the same final hand.
3.2Five-Phase Collection Design
Data was collected across five structured phases, each designed to test a specific fairness property. The phases are complementary — together they cover broad RNG sampling, targeted hand-type coverage, bet-size invariance, auditor-controlled client seeds, and hold-pattern independence.
| Phase | Bets | Bet Amount | Client Seed | Purpose |
|---|---|---|---|---|
| A — Broad sampling | 3,000 | $0.01 | 61 distinct (capture script) | RNG sampling across many seed pairs and random hold choices |
| B — Targeted hands | 1,000 | $0.01 | 20 distinct (capture script) | Targeted sampling of specific hand types (pairs, low-pair holds) for distribution coverage |
| C — Bet-size invariance | 100 | $10.00 | 2 distinct (capture script) | Confirm bet amount is not an RNG input |
| D — Auditor client seed | 500 | $0.01 | 1 (pfauditmod66jae) | Verify server honours arbitrary player-supplied client seeds |
| E — Hold pattern coverage | 800 | $0.01 | 16 distinct (capture script) | Deck unaffected by the hold: 8 planned hold patterns × 100 hands |
3.3Deck Recomputation (Step 5)
For every hand, the verifier computes the 52-card deck with computeShuffledDeck(serverSeed, clientSeed, nonce), compares deck[0..4] with the served initial_cards, applies the recorded holds to deck[5..9] and compares the result with the served final_cards. The same step then runs two more implementations on every hand: Duel's Verify-tab code, unmodified, as a cross-check, and the ProvablyFair.org verifier's code from this site, pinned by SHA-256.
const ss = seedMap.get(b.seed.serverSeedHashed);if (!ss) { skipped++; continue; } const deck = computeShuffledDeck(ss, b.seed.clientSeed, b.seed.nonce);const expInitial = deck.slice(0, 5);const expPool = deck.slice(5, 10);const expFinal = finalHandOrNull(expInitial, b.draw.response.held_cards, expPool); const initialMatch = arrEq(expInitial, b.draw.response.initial_cards!);const finalMatch = arrEq(expFinal, b.draw.response.final_cards!);3.4Payout Math (Step 7)
For each of the 5,400 hands, the verifier checks amount_won = amount_coins × multiplier exactly. Each money string is parsed to an integer count of 10⁻¹⁸ units, with no floating point and no tolerance, so a payout nudged by a single unit fails. A losing hand must pay exactly 0.
if (mult === 0n) { lossesChecked++; if (won !== 0n) { payoutErrors++; if (payoutDetails.length < 3) payoutDetails.push(`hand_id=${b.draw.response.hand_id}: loss but amount_won=${b.draw.response.amount_won}`); }} else { winsChecked++; const product = amt * mult; // in 1e-36 units if (product % UNIT !== 0n) { payoutErrors++; if (payoutDetails.length < 3) payoutDetails.push(`hand_id=${b.draw.response.hand_id}: stake × multiplier is not on the 1e-${MONEY_DECIMALS} grid — no rounding rule is declared`); } else if (product / UNIT !== won) { payoutErrors++; if (payoutDetails.length < 3) payoutDetails.push(`hand_id=${b.draw.response.hand_id}: stake ${b.deal.request.amount_coins} × ${b.draw.response.multiplier} ` + `!= amount_won ${b.draw.response.amount_won} (diff ${won - product / UNIT} units of 1e-${MONEY_DECIMALS})`); }}3.5Pay Table Provenance (Step 8)
For each hand, the served multiplier is compared with the pay table in videoPokerConfig.json for the served combination, with === and no tolerance. All 5,400 match: the live game used the pinned pay table on every captured hand.
| Hand Rank | Multiplier | Observed (live) |
|---|---|---|
| Royal flush | 812.9719437907615× | 0 |
| Straight flush | 58× | 1 |
| Four of a kind | 26× | 2 |
| Full house | 9× | 15 |
| Flush | 6× | 15 |
| Straight | 4× | 27 |
| Three of a kind | 3× | 144 |
| Two pair | 2× | 294 |
| Jacks or better | 1× | 698 |
| None | 0× | 4,204 |
for (const b of bets) { const combo = b.draw.response.combination as HandRank; const expected = MULTIPLIERS[combo]; const actual = parseFloat(b.draw.response.multiplier); if (expected === undefined) { multErrors++; if (multErrDetails.length < 3) multErrDetails.push(`hand_id=${b.draw.response.hand_id}: unknown combination "${combo}"`); } else if (!Number.isFinite(actual)) { multErrors++; if (multErrDetails.length < 3) multErrDetails.push(`hand_id=${b.draw.response.hand_id}: unparseable multiplier "${b.draw.response.multiplier}"`); } else if (actual !== expected) { multErrors++; if (multErrDetails.length < 3) multErrDetails.push(`hand_id=${b.draw.response.hand_id}: ${combo} expected=${expected}, got=${b.draw.response.multiplier}`); } else { multChecked++; }}effective_edge read 0.1 on all 10,800 deal and draw responses (Step 10). Live play finished on 9 of the 10 ranks; no Royal Flush occurred.3.6Phase C Bet-Size Equivalence (Step 9)
Phase C placed 100 hands at $10, 1,000× the $0.01 stake, to confirm the stake is not an RNG input. Every Phase C hand recomputes to the same deck the $0.01 hands give from the same (serverSeed, clientSeed, nonce), classifies to its served rank, is served the same pay-table cell as any base-stake hand of that rank, and is credited exactly stake × multiplier.
3.7Phase D Auditor Client Seed (Step 15)
Phase D placed 500 hands with one auditor-chosen client seed (pfauditmod66jae) across 11 epochs. Every hand's deck recomputes from the revealed server seed and that client seed, and all 500 classify to the server's combination. The server uses the seed the player sets rather than ignoring it or substituting its own.
pfauditmod66jae; 500 / 500 classifications match.3.8Game-Specific Verification (Steps 19–22, 25)
Beyond deck recomputation and payout math, five Video-Poker–specific checks verify the draw half of every bet — confirming that hand classification, hold validity, replacement pool determinism, deck integrity, and hold-pattern independence all behave as specified.
| Check | Step | Coverage | Result |
|---|---|---|---|
| Hand Classification Accuracy | 19 | 5,400 / 5,400 — our evaluateHand matches the server's combination on every hand, across the 9 ranks live play reached (no Royal Flush occurred; unit tests cover the royal / straight-flush boundary). Ace-low straights (5 live) and low pairs all match. | Pass |
| Hold Validity | 20 | 5,400/5,400 — held_cards ⊆ initial_cards and |held_cards| ≤ 5 for every bet; no held card ever fabricated by the server | Pass |
| Replacement Pool Determinism | 21 | 5,400/5,400 — non-held positions consume deck[5..9] sequentially left-to-right; pool position is determined entirely by which positions the player held | Pass |
| Deck Integrity | 22 | 5,400 / 5,400 — every recomputed deck[0..9] is 10 unique valid cards; the draw-bias bound is exact (0) for every range 2–52 | Pass |
| Phase E Hold Pattern Coverage | 25 | 800 / 800 Phase E hands across the 8 planned hold patterns: hold none, each single position (×5), positions 0+2, and all five (100 each) | Pass |
Why these matter: Steps 19–22 close every gap a player might wonder about in the draw half. Step 19 — does the server classify hands correctly? Step 20 — could the server "fabricate" a held card the player never selected? Step 21 — does the replacement pool consume in a deterministic order, or could the server cherry-pick which pool card lands in which position? Step 22 — could the server slip a fabricated or duplicate card into deck[0..9]? Step 25 — could the player's hold pattern itself influence the deck composition? All five close cleanly — 0 violations across 5,400 bets.
3.9Worked Example — Full Parity Verification
Real bet from Phase D — hand_id 593949, auditor's client seed pfauditmod66jae, nonce 28. The deal was five clubs (6C, 2C, 3C, QC, 5C), already a flush (6×). The player broke it, held 6C 2C 3C 5C and discarded QC; the first pool card, 4C, completed a 2C–6C straight flush for a 58× payout. Verified end-to-end from data/video-poker-dataset-5400bets.json:
serverSeed = f7c670b05ebea748011cfd9df0b4ebc82fa3e296f687aeb924abbd5c0fd60dd2
clientSeed = pfauditmod66jae
nonce = 28
phase = D (auditor-chosen client seed)
amount = $0.01| Step | Process | Output |
|---|---|---|
| 1 | Backward Fisher–Yates: 51 HMAC-SHA256 calls with counter k = 0–50 (nothing rejected) | Fully shuffled 52-card deck |
| 2 | deck[0..4] → initial hand | [6C, 2C, 3C, QC, 5C] |
| 3 | deck[5..9] → replacement pool | [4C, KC, KS, 7C, 10C] |
| 4 | Apply hold: [6C, 2C, 3C, 5C] kept; position 3 consumes pool[0] = 4C | [6C, 2C, 3C, 4C, 5C] |
| 5 | Hand classification: 5 consecutive clubs | straight_flush |
| 6 | Multiplier lookup: multipliers.straight_flush | 58× |
| 7 | Payout: 0.01 × 58 | $0.58 ✅ |
// computeShuffledDeck("f7c670b0...", "pfauditmod66jae", 28)// 51 Fisher-Yates steps → fully shuffled 52-card deck//// deck[0..4] = ["6C", "2C", "3C", "QC", "5C"] ← initial hand// deck[5..9] = ["4C", "KC", "KS", "7C", "10C"] ← replacement pool//// Player holds [6C, 2C, 3C, 5C] — keep positions 0, 1, 2, 4// Position 3 (QC) — not held → consume pool[0] = "4C"//// final_cards = ["6C", "2C", "3C", "4C", "5C"]//// evaluateHand(final_cards) → "straight_flush" (5 consecutive clubs)// videoPokerConfig.multipliers.straight_flush → 58//// Payout: 0.01 × 58 = 0.58// Live amount_won: 0.58 ✅hand_id 593949 — initial hand, replacement pool, hold composition, final hand, hand classification, multiplier, and payout all match exactly between the live game and the independent verifier. Auditor's chosen client seed pfauditmod66jae produced a verifiable 58× win — proving both that the server honours arbitrary client seeds and that high-multiplier outcomes are recoverable from public inputs.Technical Evidence & Verification5 sections
3.10Evidence Coverage Summary12 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Deck recomputation (Step 5) | 5,400 / 5,400 — dealt hand + replacement pool | Pass |
| Duel's Verify-tab code, cross-check (Step 5) | 5,400 / 5,400 — same deck[0..9] | Pass |
| ProvablyFair.org verifier (Step 5) | 5,400 / 5,400 — dealt hand, final hand, rank, multiplier | Pass |
| Payout math (Step 7) | 5,400 / 5,400, exact (integer 1e-18 units) | Pass |
| Pay table provenance (Step 8) | 5,400 / 5,400 — served multiplier = videoPokerConfig.json | Pass |
| Phase C stake invariance (Step 9) | 100 / 100 at $10; 18 paying hands | Pass |
| Phase D auditor client seed (Step 15) | 500 / 500 under pfauditmod66jae | Pass |
| Hand classification (Step 19) | 5,400 / 5,400 | Pass |
| Hold validity (Step 20) | 5,400 / 5,400 — held_cards ⊆ initial_cards | Pass |
| Replacement pool order (Step 21) | 5,400 / 5,400 — pool consumed left to right | Pass |
| Deck integrity (Step 22) | 5,400 / 5,400 — 10 unique valid cards | Pass |
| Phase E hold patterns (Step 25) | 800 / 800 across 8 patterns | Pass |
3.11Code References8 source files
| File | Purpose |
|---|---|
| tests/steps/determinism.ts | Step 5: deck recomputation, Duel's code and the site verifier on every hand |
| tests/steps/payouts.ts | Steps 7–9: exact payouts, pay table provenance, Phase C |
| tests/steps/dataset.ts | Steps 10–15: edge field, config coverage, epochs, population, hashes, Phase D |
| tests/steps/game-specific.ts | Steps 19–25: classification, holds, pool order, deck integrity, card tests, Phase E |
| src/rng.ts | Deck shuffle and computeFinalHand, written from docs/ALGORITHM.md |
| src/hand-evaluator.ts | Our own 10-rank evaluator, cross-checked with pokersolver on 10,000 random hands |
| src/site-verifier.ts | Loads the pinned copy of the ProvablyFair.org verifier's code |
| src/operator-verifier.ts | Runs Duel's captured Verify-tab code unmodified |
3.12Datasets UsedSource artifacts
3.13Verified Invariants13 invariants
| Invariant | Result |
|---|---|
Computed deck[0..4] matches live initial_cards for all 5,400 hands | Pass |
Computed final_cards from (dealt hand, holds, pool) matches live final_cards for all 5,400 hands | Pass |
| Duel's Verify-tab code and the ProvablyFair.org verifier agree on all 5,400 hands | Pass |
Our evaluateHand(final_cards) matches the server's combination for all 5,400 hands | Pass |
amount_won = amount_coins × multiplier exactly for all 5,400 hands | Pass |
Every multiplier matches videoPokerConfig.json for its rank | Pass |
| Phase C ($10) hands recompute and pay exactly like $0.01 hands | Pass |
Phase D (pfauditmod66jae) — 500 / 500 decks and classifications match | Pass |
| Phase E hold patterns: 800 / 800 recompute from the deal-time deck | Pass |
held_cards ⊆ initial_cards, |held| ≤ 5 for all 5,400 hands | Pass |
Replacement pool consumed left to right from deck[5..9] for all 5,400 hands | Pass |
deck[0..9] is 10 unique valid cards for all 5,400 hands | Pass |
| All 5 phases (A–E) present and bound to the capture plan | Pass |
3.14Reproduction InstructionsRun locally
git clone https://github.com/ProvablyFair-org/duel-video-poker.gitcd duel-video-poker && git checkout v1.2.1npm cinpm run verifyExpected output, as run at v1.2.1 (lines for this section):
[PASS] Step 5 — Outcome Recomputation
[PASS] Step 7 — Payout Math
[PASS] Step 8 — Multiplier Provenance
[PASS] Step 9 — Phase C Bet-Size Invariance
[PASS] Step 15 — Phase D — Client Seed Variation
[PASS] Step 19 — Hand Classification Accuracy
[PASS] Step 20 — Hold Validity
[PASS] Step 21 — Replacement Pool Determinism
[PASS] Step 22 — Deck Integrity
[PASS] Step 25 — Phase E Hold Pattern CoverageRTP & Payout Logic
Is the house edge what the casino claims?
Video Poker has two RTPs. The theoretical deal-only RTP (33.7238%) scores the five dealt cards with no draw, from textbook counts and the pay table. The enumerated optimal-play RTP is 99.9000% at the base stake tier, from all C(52,5) = 2,598,960 deals and every hold; the same engine reproduces 9/6 Jacks or Better at 99.5439%. Duel's game settings state a 0.1% edge for that tier, and the RTP claim rule finds the figure 0.000000 pp from the claim: PASS. Above the base tier the edge scales with stake; that is explained from the config, not certified.
What we verified
- Enumerated optimal-play RTP is 99.9000% at the base stake tier (bets up to $1,182.85)
- Derived from first principles: all 2,598,960 deals × 32 holds, from the pay table alone, with no casino RTP figure
- The same engine reproduces standard 9/6 Jacks or Better at 99.5439%
- RTP claim rule: Duel's game settings state 99.9% for this tier; the figure is 0.000000 pp off, inside ±0.1 pp — PASS
- Theoretical deal-only RTP is 33.7238%; 10M simulated deals give 33.6999%, consistent with it
- Every payout is exact, and every served multiplier equals the pinned pay table
- Pass 2 finds no sign of server-seed cherry-picking (Z = −0.018 vs −3.090)
What this means for you
- At the base tier the house keeps 0.1% under perfect play; other holds return less
- Above $1,182.85 Duel's edge rises 0.01% per stake tier, up to 0.61% (99.39% RTP) at the top tier. Explained from the config, not certified
- The RTP figure is derived independently, not taken from the casino
- Duel's 99.9% claim for the base tier holds
- Enumerated optimal-play RTP is 99.9000% at the base stake tier (bets up to $1,182.85)
- Derived from first principles: all 2,598,960 deals × 32 holds, from the pay table alone, with no casino RTP figure
- The same engine reproduces standard 9/6 Jacks or Better at 99.5439%
- RTP claim rule: Duel's game settings state 99.9% for this tier; the figure is 0.000000 pp off, inside ±0.1 pp — PASS
- Theoretical deal-only RTP is 33.7238%; 10M simulated deals give 33.6999%, consistent with it
- Every payout is exact, and every served multiplier equals the pinned pay table
- Pass 2 finds no sign of server-seed cherry-picking (Z = −0.018 vs −3.090)
- At the base tier the house keeps 0.1% under perfect play; other holds return less
- Above $1,182.85 Duel's edge rises 0.01% per stake tier, up to 0.61% (99.39% RTP) at the top tier. Explained from the config, not certified
- The RTP figure is derived independently, not taken from the casino
- Duel's 99.9% claim for the base tier holds
Anti-circularity (deal-only)Pass
Enumerated optimal-play RTPPass
Solver cross-validationPass
RTP claim (RTP-CLAIM 1.2.0)Pass
house_edge 0.001 on the base tier). Scored on Step 26: 0.000000 pp off, inside the ±0.1 pp band. A miss would read RTP FIGURE OVERSTATED (exit 5)Base-tier edge fieldPass
effective_edge = 0.1 on all 10,800 deal and draw responses (Step 10)Payout exactnessPass
Simulation (Pass 1)Pass
Cherry-pick test (Pass 2)Pass
Stake tiersInfo
The enumerated optimal-play RTP is 99.9000% at the base stake tier, derived from the pay table alone and cross-checked on 9/6 Jacks or Better. Duel's stated 0.1% edge for that tier holds under the RTP claim rule. Payouts are exact on every captured hand, and the simulation and cherry-pick test find no sign of bias. Higher stake tiers are explained from the config, not certified.
Theoretical deal-only RTP: 33.7238%. RTP claim (RTP-CLAIM 1.2.0): Duel states 99.9% for this tier; 0.000000 pp off, PASS.
| Check | Result | Evidence |
|---|---|---|
| Anti-circularity (deal-only) | Pass | All 2,598,960 hands classified by our own evaluator; every rank count equals the published count; theoretical deal-only RTP 33.7238%; negative control rejected 10 / 10 (Step 16) |
| Enumerated optimal-play RTP | Pass | 99.900000% at the base stake tier: all C(52,5) deals × 32 holds, 134,459 canonical classes (Step 26) |
| Solver cross-validation | Pass | Same engine on standard 9/6 Jacks or Better: 99.543904% vs the published 99.5439% (Step 26) |
| RTP claim (RTP-CLAIM 1.2.0) | Pass | Claim: 99.9% flat, from Duel's game settings (house_edge 0.001 on the base tier). Scored on Step 26: 0.000000 pp off, inside the ±0.1 pp band. A miss would read RTP FIGURE OVERSTATED (exit 5) |
| Base-tier edge field | Pass | effective_edge = 0.1 on all 10,800 deal and draw responses (Step 10) |
| Payout exactness | Pass | 1,196 wins and 4,204 losses exact; served multiplier = pinned pay table on 5,400 / 5,400 (Steps 7, 8) |
| Simulation (Pass 1) | Pass | 10M deals, Fisher's p = 0.7982; deal-only RTP 33.6999% vs 33.7238% (Step 17) |
| Cherry-pick test (Pass 2) | Pass | 110 seeds × 100,000 nonces; captured-window rank-sum Z = −0.018 vs −3.090; ≥ 50% power when 18.9% of captured windows sit in their worst decile (Step 18) |
| Stake tiers | Info | 52 tiers in Duel's config; above $1,182.85 the edge rises 0.01% per tier to 0.61% at the top. Explained from the config, not certified |
Anti-circularity (deal-only)Pass
Enumerated optimal-play RTPPass
Solver cross-validationPass
RTP claim (RTP-CLAIM 1.2.0)Pass
house_edge 0.001 on the base tier). Scored on Step 26: 0.000000 pp off, inside the ±0.1 pp band. A miss would read RTP FIGURE OVERSTATED (exit 5)Base-tier edge fieldPass
effective_edge = 0.1 on all 10,800 deal and draw responses (Step 10)Payout exactnessPass
Simulation (Pass 1)Pass
Cherry-pick test (Pass 2)Pass
Stake tiersInfo
The enumerated optimal-play RTP is 99.9000% at the base stake tier, derived from the pay table alone and cross-checked on 9/6 Jacks or Better. Duel's stated 0.1% edge for that tier holds under the RTP claim rule. Payouts are exact on every captured hand, and the simulation and cherry-pick test find no sign of bias. Higher stake tiers are explained from the config, not certified.
How It Works — RTP & Payout Logic10 sections
4.1The Two RTPs of Video Poker
Duel's game settings state a 0.1% edge for the base stake tier: a 99.9% RTP. For Video Poker that is the optimal-play RTP, the long-run return when every dealt hand is held the best way. Other holds return less.
Video Poker also has a deal-only RTP: what the five dealt cards return as dealt, with no draw. It is much lower (33.72%), depends only on the shuffle and the pay table, and is what the anti-circularity proof and the simulation test.
The deal-only RTP checks the card probabilities. The optimal-play RTP checks Duel's 99.9% figure.
| RTP type | Value | What it measures | Where verified |
|---|---|---|---|
| Deal-only (theoretical) | 33.7238% | The five dealt cards scored as dealt | S4.2 (Step 16) |
| Deal-only (simulated, 10M rounds) | 33.6999% | The shuffle gives the same distribution | S4.6 (Step 17) |
| Optimal-play (enumerated, base tier) | 99.9000% | Best hold for every dealt hand | S4.3 (Step 26) |
| Cross-validation (9/6 JoB) | 99.5439% | Same engine, standard pay table | S4.3 (Step 26) |
| RTP claim (game settings) | 99.9% · PASS | The audited figure against Duel's stated figure | S4.4 (Step 26) |
4.2Anti-Circularity Proof — Deal-Only RTP (Step 16)
The anti-circularity proof derives the theoretical deal-only RTP of 33.7238% from first principles, with no casino-supplied probability data. Step 16 enumerates all 2,598,960 five-card hands, classifies each with our own evaluator, and requires every one of the 10 rank counts to equal the published combinatorial count exactly:
| Component | Formula | Source |
|---|---|---|
| Hand-rank probability | P(rank) = count(rank) / C(52,5) | Textbook 5-card poker counts — pure combinatorics, not from casino |
| Multiplier | videoPokerConfig.multipliers[rank] | Casino-supplied — observed from videoPokerConfig.json |
| Deal-only RTP computation | Σ P(rank) × multiplier(rank) for all 10 ranks | Independent probability × observed multiplier |
| Result | = 33.7238% (theoretical deal-only) | First-principles proof of underlying probabilities |
| Hand Rank | Count | P(rank) | Multiplier | P × M |
|---|---|---|---|---|
| Royal flush | 4 | 0.000002 | 812.97× | 0.001251 |
| Straight flush | 36 | 0.000014 | 58× | 0.000803 |
| Four of a kind | 624 | 0.000240 | 26× | 0.006242 |
| Full house | 3,744 | 0.001441 | 9× | 0.012965 |
| Flush | 5,108 | 0.001965 | 6× | 0.011792 |
| Straight | 10,200 | 0.003925 | 4× | 0.015699 |
| Three of a kind | 54,912 | 0.021128 | 3× | 0.063385 |
| Two pair | 123,552 | 0.047539 | 2× | 0.095078 |
| Jacks or better | 337,920 | 0.130021 | 1× | 0.130021 |
| None | 2,062,860 | 0.793725 | 0× | 0.000000 |
| Total | 2,598,960 | 1.000000 | — | 0.337238 |
Anti-Circularity Verification:
let theoreticalRTP = 0;const countMismatches: string[] = [];for (const rank of HAND_RANKS) { const got = enumerated[rank] ?? 0; if (got !== THEORETICAL_COUNTS[rank]) { countMismatches.push(`${rank}: enumerated ${got} != published ${THEORETICAL_COUNTS[rank]}`); } theoreticalRTP += (got / TOTAL_HANDS) * MULTIPLIERS[rank];}for (const r of Object.keys(enumerated)) { if (!(HAND_RANKS as readonly string[]).includes(r)) countMismatches.push(`evaluator returned unknown rank "${r}" x${enumerated[r]}`);Why this is non-circular: P(rank) comes from counting the 2,598,960 hands, a property of a 52-card deck and the rules of poker, not anything Duel publishes. The multipliers are the only casino input. The simulated 33.6999% across 10M rounds (S4.6) is consistent with it.
4.3Optimal-Play RTP via Strategy Solver (Step 26)
The optimal-play RTP is the expected return with the best hold for every dealt hand. src/compute-optimal-rtp.ts evaluates all 2,598,960 deals and all 32 holds of each, using pre-aggregated sums and inclusion-exclusion (no operator probability data). It reads only the pinned pay table.
| Step | Process | Result |
|---|---|---|
| 1 | Score table: rank of every one of the 2,598,960 hands | Distribution matches the published counts |
| 2 | Pre-aggregate multiplier sums for every 1-, 2-, 3- and 4-card subset | A hold-1 EV takes 16 additions instead of 178,365 lookups |
| 3 | For each deal × 32 holds: EV by inclusion-exclusion over the discarded cards | Best hold per deal = optimal play |
| 4 | Average the best EVs over all 2,598,960 deals | 99.900000% for Duel's base-tier pay table |
| 5 | Cross-validate: same engine on the standard 9/6 Jacks or Better table | 99.543904% vs the published 99.5439% |
| Optimal hold count | Hands | Share |
|---|---|---|
| 0 cards | 84,360 | 3.25% |
| 1 card | 403,968 | 15.54% |
| 2 cards | 1,651,440 | 63.54% |
| 3 cards | 148,392 | 5.71% |
| 4 cards | 291,312 | 11.21% |
| 5 cards | 19,488 | 0.75% |
const anchorFailures: string[] = [];if (!Number.isFinite(duelRTPNum) || duelRTPNum - EXPECTED_DUEL_RTP > RTP_TOL) { anchorFailures.push(`duel.rtpPercent=${duelRTP} (above the published ${EXPECTED_DUEL_RTP.toFixed(6)} + ${RTP_TOL})`);}if (typeof artifact.duel.rtp !== 'number' || (artifact.duel.rtp * 100).toFixed(6) !== duelRTP) { anchorFailures.push(`duel.rtpPercent=${duelRTP} is not duel.rtp=${artifact.duel.rtp} to 6 dp`);}v1.2.1 reproduces the pinned artifact byte for byte.Why the cross-validation matters: before trusting the engine on Duel's table, we run it on 9/6 Jacks or Better, the most-studied video poker table, whose optimal return of 99.5439% is published by Wizard of Odds, Durango Bill and Ethier, Kim and Lee (exact fraction 1,653,526,326,983 / 1,661,102,543,100). The engine matches it to 6 decimal places. Duel's three raised lines (Royal 812.97×, Straight Flush 58×, Four of a Kind 26× vs 800×, 50×, 25×) lift the return from 99.5439% to 99.9000%.
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 Video Poker, Duel's game settings state the edge per stake tier: house_edge "0.001" on the base tier (scaling_edge id 1, stakes up to $1,182.85), the tier whose multipliers are the audited pay table. That is a flat 99.9% claim.
The claim is scored on Step 26 against a ±0.1 pp band. 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 draws themselves pass. Tiers 1–51 are not tabled: the package has no optimal-play solve for their pay tables. The "Zero Edge" label is noted, not tested.
| Item | Value |
|---|---|
| Claim | 99.9%, flat |
| Published in | Game settings: house_edge "0.001" on scaling_edge id 1 (Duel's video-poker config, fetched 5 October 2026) |
| Scored on | Step 26 (optimal-play RTP) |
| Band | ±0.1 pp |
| Settings tabled | 1 (base stake tier, optimal play) |
| House side beyond band | 0 |
| Player-favourable beyond band | 0 |
| Outcome | PASS — minimal fix: none |
| Setting | Audited RTP | Claim | Gap | Result |
|---|---|---|---|---|
| Jacks or Better · base stake tier (up to $1,182.85) · optimal play | 99.900000% | 99.9% | 0.000000 pp, within band | Pass |
rtp-claim: ENFORCED — PASSrtp-claim: claim flat 99.900000% — source: game settings: house_edge "0.001" on scaling_edge tier id 1 (stakes up to 1182.855407010385761) of Duel's video-poker config, the tier whose multipliers are the audited pay table (E20, GET https://duel.com/api/v2/video-poker/config as fetched 2026-10-05); effective_edge 0.1 on every captured deal and draw (Step 10). The "Zero Edge" label is noted, not tested (MANIFEST.md#payouts-and-rtp)rtp-claim: band ±0.10 pp · 1 settings · true min 99.900000% (jacks-or-better, stake tier 0 (E20 id 1, up to 1182.855407010385761), optimal play) · true max 99.900000% (jacks-or-better, stake tier 0 (E20 id 1, up to 1182.855407010385761), optimal play)rtp-claim: house side beyond band: 0 · player-favourable beyond band: 0 · worst jacks-or-better, stake tier 0 (E20 id 1, up to 1182.855407010385761), optimal play 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 d16678b014447e3b… matches the pin4.5House Edge & Stake Tiers (Step 10)
At the base tier the 0.1% edge under optimal play is built into the pay table itself. Every captured deal and draw shows effective_edge 0.1, the base-tier edge Duel reports per bet (Step 10, all 10,800 values). We read the field as the bet's tier edge, not an adjustment to the payout: every credited payout equals stake × base-tier multiplier exactly. The capture holds no rakeback records, so whether Duel returns edge as rakeback is outside this audit.
Duel's config (fetched 5 October 2026) prices Video Poker in 52 stake tiers. Each tier above the base adds 0.01% edge and scales every pay-table line by (1 − tier edge) / 0.999, so a pair of Jacks pays 0.9998999× from $1,182.86 and 0.99489489× at the top tier. Scaling every line by one factor doesn't change the best hold, so each tier's optimal-play RTP is 100% minus its edge. This is explained from the config, not tested with live bets.
| Tier | Stakes | Edge | Optimal-play RTP | Jacks or Better pays |
|---|---|---|---|---|
| Base (id 1) | up to $1,182.85 | 0.10% | 99.90% | 1× |
| 1 (id 2) | $1,182.86 – $1,297.26 | 0.11% | 99.89% | 0.9998999× |
| 2 (id 3) | $1,297.27 – $1,411.11 | 0.12% | 99.88% | 0.9997998× |
| … | … | +0.01% per tier | … | … |
| 50 (id 51) | $6,072.71 – $6,159.02 | 0.60% | 99.40% | 0.99499499× |
| 51 (id 52, top) | $6,159.03 – $6,189.48 | 0.61% | 99.39% | 0.99489489× |
effective_edge values equal 0.1, and every captured hand was paid from the base-tier table. The certified figure is the base tier's 99.9000%; the higher tiers are disclosed from the config.4.6Simulation Pass 1 — 10M Rounds (Step 17)
S4.2 derives the deal-only RTP exactly; S4.3 enumerates the optimal-play RTP. The simulation checks that the shuffle produces the deal distribution in practice: 10 million deals on 10 pinned seed pairs, scored as dealt, tested against the C(52,5) hand counts with Fisher's combined chi-squared.
Fisher's combined test: Per-stream chi-squared p-values combined as T = −2 Σ ln(p_i) ~ χ²(2K): p = 0.7982 across 10 streams of 1M rounds.
Simulated deal-only RTP: 33.6999% across 10M rounds, 0.024 pp below the theoretical 33.7238%.
Serial independence: Lag-1 autocorrelation r₁ = −0.000233; Wald–Wolfowitz runs p = 0.1000. No sign of serial dependence.
/** * Monte Carlo simulation for Duel.com Video Poker audit. * * Pass 1 — Multi-stream Fisher's method (10 streams × 1M rounds = 10M total). * Video Poker is a single-config game (Jacks or Better), so we use multi-stream * with Fisher's combined p-value instead of per-config Bonferroni. This matches * the methodology for Crash (also single-config). Each stream uses an independent * pinned seed pair. Per-stream chi-squared on hand-rank distribution, combined via * Fisher's method: T = -2 Σ ln(p_i) ~ χ²(2K). Serial independence tested on the * full 10M combined stream. * * Methodology rule: multi-config → Bonferroni; single-config → Fisher's. *Per-stream results and the observed hand counts are in S2.5.
4.7Cherry-Pick Test — Pass 2 (Step 18)
Could Duel have chosen server seeds that start badly for players? Pass 2 deals every one of the 110 revealed casino seeds for 100,000 nonces with its captured client seed and splits them into 2,000 windows of 50. Window 0 (nonces 0–49) is the one actually played. If Duel picked seeds, window 0 would rank low among its seed's windows. The pre-registered rule sums those ranks over the 110 seeds into Z and indicates cherry-picking at Z < −3.090 (one-sided α 0.001).
Why ranks: With no cherry-picking, window 0 is like any other window, so its rank among the 2,000 is uniform. That is an exact permutation null; no distribution is assumed.
Re-derived in verify: Every window comes from the shipped integer census, and windows 0 and 1,999 of every seed are dealt again from the revealed seed. All 5,400 captured deals reproduce in the window-0 replay.
| Test | Result |
|---|---|
| Revealed casino seeds | 110 |
| Nonces per seed | 100,000 (2,000 windows of 50) |
| Total Pass 2 rounds | 11,000,000 |
| Captured-window rank-sum Z (decision rule) | −0.018 (critical −3.090) |
| Captured window below / above its seed's median | 50 / 60 |
| Detection power | ≥ 50% when ≥ 18.9% of seeds' captured windows sit in their worst decile |
| Chi-squared screen (reconciled, no longer decides) | 5 / 110 seeds flagged at α = 0.05, binomial p = 0.6485 |
| Pooled chi-squared (11M rounds) | χ²(9) = 6.20, p = 0.7200 |
| Pooled deal-only RTP | 33.7328% |
// PRE-REGISTERED DECISION RULE: cherry-picking indicated at Z < SIM_PASS2_Z_CRIT (−3.090, one-sided α 0.001)const cherryPickPass = rankZ >= SIM_PASS2_Z_CRIT && p2Issues.length === 0;4.8Bet-Size Invariance (Step 9)
Phase C placed 100 hands at $10, 1,000× the $0.01 stake. The stake is not an HMAC input: every Phase C hand recomputes to the same deck the seed triple gives at $0.01 and is paid exactly from the same pay-table cell. Both stakes are in the base tier. The pay table does change with stake from $1,182.86, by design (S4.5); no live bet was placed there.
| Metric | $0.01 Phase A/B/D/E | $10.00 Phase C |
|---|---|---|
| Bets | 5,300 | 100 |
| Bet amount | $0.01 | $10.00 |
| Decks recomputed | 5,300/5,300 | 100/100 |
| Pay table | videoPokerConfig.json | videoPokerConfig.json |
| RNG path | HMAC-SHA256 Fisher-Yates | HMAC-SHA256 Fisher-Yates |
4.9Informational Items (Not Scored)
Reported for context, not scored. Live returns reflect the hold choices of each phase and sample variance, not game fairness. The RTP evidence is S4.2 (deal-only) and S4.3 (optimal play).
| Item | Value | Context |
|---|---|---|
| Phase A empirical RTP | 32.97% | 3,000 hands at $0.01 — random holds (each card held with probability 50%) |
| Phase B empirical RTP | 60.00% | 1,000 hands at $0.01 — targeted holds hunting pairs and flushes |
| Phase C empirical RTP | 27.00% | 100 bets at $10 — bet-size invariance test, high variance at N=100 |
| Phase D empirical RTP | 44.80% | 500 bets at $0.01 — auditor's client seed pfauditmod66jae |
| Phase E empirical RTP | 40.13% | 800 bets at $0.01 — systematic hold patterns |
4.10Worked Example — Payout & RTP Verification
Real bet from Phase A — hand_id 589168, nonce 6. The player was dealt [AC, 6C, 10H, QC, JD] (a single high card: Ace of clubs). They held only the Ace and drew 4 new cards. The replacement pool delivered [KD, KS, 10S, 5C] — two of which formed a pair of Kings, completing a jacks_or_better win for a 1× payout. Note: the win came from the pool, not from the held Ace. Verified from data/video-poker-dataset-5400bets.json:
serverSeed = 2424d436197860c90bad4022573f14eab6c9da3dcc2d50e57ad7d52357f0fdc9
clientSeed = cpc4ihmPtvpHpapv
nonce = 6
phase = A (broad sampling)
amount = $0.01
initial = [AC, 6C, 10H, QC, JD] (single high card: Ace of clubs)
held = [AC]
final = [AC, KD, KS, 10S, 5C] (pair of Kings from replacement pool)
combination = jacks_or_betterStep 1 — Pay table lookup: videoPokerConfig.multipliers.jacks_or_better = 1
Step 2 — Payout: 0.01 × 1 = 0.01 → amount_won = 0.01 ✅ (the bet returns the original stake)
Step 3 — Deal-only RTP contribution: Jacks-or-better appears 337,920 times in C(52,5) = 2,598,960 hands. Per-deal contribution: (337,920 / 2,598,960) × 1 = 0.130021 = 13.0021% of the 33.7238% deal-only RTP — the largest single contribution of any winning rank.
Step 4 — What the hand shows: the held Ace didn't make the win. The pair of Kings came from deck[5] and deck[6], both from the replacement pool, which was fixed at deal time. The hold only decided which pool cards filled the discards.
| Step | Process | Output |
|---|---|---|
| 1 | Backward Fisher-Yates: 51 HMAC calls produce the deck | deck[0..4] = [AC,6C,10H,QC,JD] · deck[5..9] = [KD,KS,10S,5C,3C] |
| 2 | Apply hold [AC] → discard [6C, 10H, QC, JD] → consume pool[0..3] = [KD, KS, 10S, 5C] | final_cards = [AC, KD, KS, 10S, 5C] |
| 3 | Independent evaluateHand(final_cards) → pair of Kings (rank ≥ J) | jacks_or_better |
| 4 | Multiplier lookup: multipliers.jacks_or_better | 1× |
| 5 | Payout: 0.01 × 1 | $0.01 ✅ |
| 6 | Deal-only RTP contribution: (337,920 / 2,598,960) × 1 | 0.130021 (13.0021% of 33.7238%) |
// Anti-circularity: per-rank contribution to deal-only RTP//// jacks_or_better: 337,920 / 2,598,960 × 1 = 0.130021 (13.0021%)//// All 10 rank contributions sum to 33.7238% (theoretical deal-only RTP):// royal_flush: 4 / 2,598,960 × 812.97 = 0.001251 (0.1251%)// straight_flush: 36 / 2,598,960 × 58 = 0.000803 (0.0803%)// four_of_a_kind: 624 / 2,598,960 × 26 = 0.006242 (0.6242%)// full_house: 3,744 / 2,598,960 × 9 = 0.012965 (1.2965%)// flush: 5,108 / 2,598,960 × 6 = 0.011792 (1.1792%)// straight: 10,200 / 2,598,960 × 4 = 0.015699 (1.5699%)// three_of_a_kind: 54,912 / 2,598,960 × 3 = 0.063385 (6.3385%)// two_pair: 123,552 / 2,598,960 × 2 = 0.095078 (9.5078%)// jacks_or_better: 337,920 / 2,598,960 × 1 = 0.130021 (13.0021%)// none: 2,062,860 / 2,598,960 × 0 = 0.000000 (0.0000%)//// Σ = 0.337238 (33.7238%) ✅hand_id 589168 — payout chain matches live game exactly. Jacks-or-better's per-rank contribution to the deal-only RTP proof is (337,920 / 2,598,960) × 1 = 13.0021%. The full per-rank table (S4.2) sums to exactly 33.7238% — the anti-circularity proof.Technical Evidence & Verification5 sections
4.11Evidence Coverage Summary9 checks
| Verification Area | Coverage | Result |
|---|---|---|
| Anti-circularity (Step 16) | All 2,598,960 hands enumerated; deal-only RTP = 33.7238%; negative control 10 / 10 | Pass |
| Optimal-play enumeration (Step 26) | All deals × 32 holds; 134,459 canonical classes; 99.9000% at the base tier | Pass |
| Cross-validation (Step 26) | 9/6 Jacks or Better → 99.543904% vs 99.5439% | Pass |
| RTP claim (Step 26) | 99.9% claim from game settings; 0.000000 pp off; ±0.1 pp band | Pass |
| Base-tier edge field (Step 10) | 10,800 / 10,800 effective_edge values = 0.1 | Pass |
| Simulation Pass 1 (Step 17) | 10M rounds, Fisher's p = 0.7982; 0 / 10 streams below α | Pass |
| Simulation Pass 2 (Step 18) | 110 seeds × 100K nonces; rank-sum Z = −0.018 vs −3.090 | Pass |
| Stake invariance (Step 9) | 100 / 100 Phase C hands at $10 | Pass |
| Stake tiers above the base | From the config (E20): 52 tiers, edge 0.10%–0.61% | Info |
4.12Code References8 source files
| File | Purpose |
|---|---|
| src/compute-optimal-rtp.ts | Optimal-play enumeration with inclusion-exclusion |
| src/rtp-claim.ts | The framework's RTP-CLAIM rule 1.2.0 |
| src/rtp-settings.ts | The claim (99.9% flat, game settings) and the RTP table for this package |
| tests/steps/simulation.ts | Steps 16–18: anti-circularity, Pass 1, Pass 2 |
| tests/steps/payouts.ts | Steps 7–9: exact payouts, pay table provenance, Phase C |
| tests/steps/dataset.ts | Step 10: effective_edge on every deal and draw |
| tests/steps/game-specific.ts | Step 26: optimal-play RTP and its published anchors |
| src/simulate.ts | Monte Carlo: 10M Pass 1 + 11M Pass 2 |
4.13Datasets UsedSource artifacts
4.14Verified Invariants11 invariants
| Invariant | Result |
|---|---|
| Σ count(rank) × multiplier(rank) / C(52,5) = 33.7238% (deal-only, non-circular) | Pass |
| Every enumerated rank count equals the published count | Pass |
| Optimal-play RTP from exhaustive enumeration = 99.9000% at the base tier | Pass |
| 9/6 Jacks or Better cross-validation → 99.5439% (6 decimal places) | Pass |
| RTP claim holds: 0.000000 pp from Duel's stated 99.9% | Pass |
Pay table hash in the optimal-play artifact matches videoPokerConfig.json | Pass |
effective_edge = 0.1 on every captured deal and draw | Pass |
| Simulated deal-only RTP 33.6999% consistent with 33.7238% | Pass |
| Fisher's combined p = 0.7982; 0 / 10 streams below α = 0.01 | Pass |
| Pass 2 rank-sum Z above the critical value | Pass |
| Phase C ($10) hands pay exactly from the same table | Pass |
4.15Reproduction InstructionsRun locally
git clone https://github.com/ProvablyFair-org/duel-video-poker.gitcd duel-video-poker && git checkout v1.2.1npm cinpm run verifynpm run compute-optimal-rtp # optional: re-derive the enumeration into outputs/run/ (about two minutes)cat outputs/optimal-play-rtp.json outputs/rtp-claim-table.jsonExpected output, as run at v1.2.1 (lines for this section):
[PASS] Step 9 — Phase C Bet-Size Invariance
[PASS] Step 10 — House Edge Audit
[PASS] Step 16 — Anti-Circularity (Theoretical Deal-Only RTP)
[PASS] Step 17 — Simulation Validation — Pass 1
[PASS] Step 18 — Pass 2 Cherry-Pick Detection
[PASS] Step 26 — Optimal-Play RTP Verification
rtp-claim: ENFORCED — PASS
rtp-claim: house side beyond band: 0 · player-favourable beyond band: 0 · worst jacks-or-better, stake tier 0 (E20 id 1, up to 1182.855407010385761), optimal play at 0.000000 pp
rtp-claim: outcome PASS · minimal fix: none — the claim holds for every setting it states a figure forFairness 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 16 fairness integrity tests covering nonce integrity, seed commitment, outcome determinism, cross-player isolation, payout integrity, and a Video-Poker-specific hold/discard state-integrity check. 14 tests passed, 1 raised a FLAG (server-side input-validation gap on a duplicate held card — disclosed to Duel.com, no fairness impact), and 1 is not applicable to this game type (no replay surface — card sequence is fixed at deal time).
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 held cards or bet amounts be submitted?
- Hold/discard integrity — can the player's hold choice alter the deck, or can replacement cards be redirected?
What this means for you
- No one — not the player, not the casino — can alter outcomes through the API
- 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
- Your hold choice cannot influence the deck — it only selects which positions consume from the pre-shuffled pool
- 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 held cards or bet amounts be submitted?
- Hold/discard integrity — can the player's hold choice alter the deck, or can replacement cards be redirected?
- No one — not the player, not the casino — can alter outcomes through the API
- 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
- Your hold choice cannot influence the deck — it only selects which positions consume from the pre-shuffled pool
- The server rejects malformed, out-of-range, and duplicate requests
Nonce integrityPass
Seed commitment integrityPass
Outcome determinismPass
Hold/discard integrityPass
Round & player isolationPass
Payout integrityFlag
["8D","8D"]) accepted by server — input-validation gap, no fairness impact (final hand still computed from pre-committed shuffle). FI-PAYOUT-002 pass: injected payout/card fields ignored. Disclosed to Duel.com.16 fairness integrity tests (15 standard + 1 Video-Poker-specific): 14 pass, 1 N/A (no replay surface — card sequence fixed at deal time), 1 FLAG (FI-PAYOUT-001: a duplicate held card accepted by server — input-validation gap, disclosed to Duel.com, does not break fairness).
Category Coverage
| Check | Result | Evidence |
|---|---|---|
| Nonce integrity | Pass | Sequential, server-controlled, no duplicates across 110 bet-bearing epochs; 2 nonces missed on retried requests (capture script, not Duel) |
| Seed commitment integrity | Pass | Locked at bet acceptance, unique per epoch — 115/115 seed entries verified |
| Outcome determinism | Pass | Identical inputs produce identical decks — 5,400/5,400 confirmed; both halves (deal + draw) recover from (serverSeed, clientSeed, nonce) |
| Hold/discard integrity | Pass | Player hold choice cannot alter deck composition — 5,400/5,400 verified; Phase E's 800 hands cover the 8 planned hold patterns |
| Round & player isolation | Pass | Per-user seeds, serial independence confirmed (lag-1 z = −0.74, runs p = 0.1000 across 10M rounds) |
| Payout integrity | Flag | FI-PAYOUT-001 flagged: a duplicate held card (["8D","8D"]) accepted by server — input-validation gap, no fairness impact (final hand still computed from pre-committed shuffle). FI-PAYOUT-002 pass: injected payout/card fields ignored. Disclosed to Duel.com. |
Nonce integrityPass
Seed commitment integrityPass
Outcome determinismPass
Hold/discard integrityPass
Round & player isolationPass
Payout integrityFlag
["8D","8D"]) accepted by server — input-validation gap, no fairness impact (final hand still computed from pre-committed shuffle). FI-PAYOUT-002 pass: injected payout/card fields ignored. Disclosed to Duel.com.16 fairness integrity tests (15 standard + 1 Video-Poker-specific): 14 pass, 1 N/A (no replay surface — card sequence fixed at deal time), 1 FLAG (FI-PAYOUT-001: a duplicate held card accepted by server — input-validation gap, disclosed to Duel.com, does not break fairness).
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. Six categories target specific fairness properties (the standard five plus one Video-Poker-specific category for hold/discard integrity). 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 |
| Game State Integrity (VP-specific) | 1 | Hold/discard manipulation, replacement pool redirection |
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 |
| Deck recomputation mismatch | Undisclosed inputs affecting outcomes |
| Client seed not used in HMAC | Player has no influence on outcomes |
| Hold choice alters deck composition (VP-specific) | Player gains an information advantage; structural fairness violated |
16 tests · 14 pass · 1 flag · 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
FI-NONCE-003PassSubmitting an invalid or out-of-sequence nonce does not produce a game outcome — the server rejects the request
Adversarial API probe — 7 adversarial nonce values (−1, 0, 999999999, 'abc', INT32_MAX, INT32_MAX+1, 9e18) injected into video poker start requests. All 7 silently ignored; the server assigned valid sequential nonces. Continuity preserved (baseline 568 → post-test 576); 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
Adversarial API probe — 6/7 invalid client seeds rejected with HTTP 422 (empty, null, special chars, emoji, CJK, whitespace-only). Oversized seed (>800 chars) accepted — permissive but safe (long entropy is not a security issue). All video poker 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
FI-SEED-004PassNo shared seed pool across users — each player's seeds are independently generated and isolated
Adversarial API probe — 10 concurrent seed rotations on Account A and 10 on Account B produced 20 distinct hashes with zero cross-account collisions; all hashes within each account unique.
FI-SEED-005PassServer seeds show no correlation with timestamps, sequential patterns, or other predictable inputs
Adversarial API probe — 10 sequential seed rotations spaced 5 seconds apart produced 10 fully distinct hashes; no two shared 6 or more leading hex characters, ruling out time-correlated derivation.
Outcome Determinism2/2
FI-OUTCOME-001PassGiven identical inputs (serverSeed, clientSeed, nonce), the game always produces the same card stream
FI-OUTCOME-002N/AA completed bet cannot be replayed to generate a duplicate payout — card sequence is cryptographically fixed at bet time
Structural — the card sequence is fixed from the seed pair at deal time and decision actions consume cards from that fixed sequence. Video Poker has no multi-step cashout surface, so there is no replay vector to probe.
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
Structural — seed uniqueness enforced per user; corroborated by FI-SEED-004 (zero cross-account hash collisions across 20 rotations).
Payout Integrity1/2
FI-PAYOUT-001FlagGame parameters cannot exceed defined limits — invalid bet amounts and invalid held cards are rejected
Adversarial API probe — invalid bet amounts (negative, oversized, non-numeric, numeric zero) rejected with HTTP 422/400; out-of-bounds held cards rejected. FLAG: a draw request with a duplicated held card (held_cards: ["8D","8D"]) was accepted with HTTP 200 rather than rejected — a server-side input-validation gap. No fairness impact: the final hand is still computed from the pre-committed shuffle. Disclosed to Duel.com.
FI-PAYOUT-002PassMultiplier, card, hand-rank, and replacement-card fields in the API request are ignored — the server computes all values from the seed pair
Adversarial API probe — payout_multiplier, cards, hand_rank, and replacement_cards injected into start requests. Zero injections honoured; the server computed its own card sequence and outcome for every request.
Game State Integrity (Video-Poker-specific)1/1
FI-VP-HOLD-001PassThe player's hold/discard choice cannot alter the deck — held cards are preserved exactly and discarded positions draw replacements from the pre-committed shuffle sequence
Technical Evidence & Verification4 sections
5.3Coverage Summary16 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 | Adversarial API probe | Pass |
| FI-NONCE-004 | Nonce | S1, Step 4 (data-driven) | Pass |
| FI-SEED-001 | Seed | Adversarial 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 | Adversarial API probe | Pass |
| FI-SEED-005 | Seed | Adversarial API probe | Pass |
| FI-OUTCOME-001 | Determinism | S3, Step 5 (data-driven) | Pass |
| FI-OUTCOME-002 | Determinism | Structural — card sequence fixed at deal time; no multi-step cashout surface | N/A |
| FI-ISO-001 | Isolation | S2, Step 17 (simulation) | Pass |
| FI-ISO-002 | Isolation | Structural — seed uniqueness | Pass |
| FI-PAYOUT-001 | Payout | Adversarial API probe | Flag |
| FI-PAYOUT-002 | Payout | Adversarial API probe | Pass |
| FI-VP-HOLD-001 | Game State | S3, Steps 20–22 + 25 (data-driven, 5,400 bets) | Pass |
5.4Additional Integrity Evidence (S1–S4)14 records
| Property | Source | Finding |
|---|---|---|
| 110/110 epochs verified | S1, Steps 1–3 | Commit-reveal chain intact; 115 seed entries (110 bet-bearing + 5 unused/active) |
| 114/114 next-seed promotions | S1, Step 2 | Seed rotation chain intact across all epoch transitions |
| 5,400/5,400 exact parity | S3, Step 5 | No post-RNG conditional logic; both halves (deal + draw) recoverable |
| Hand classification accuracy | S3, Step 19 | 5,400/5,400 — independent evaluateHand() matches server combination on all 5,400 hands (9 of the 10 ranks occurred) |
| Hold validity | S3, Step 20 | 5,400/5,400 — held_cards ⊆ initial_cards and |held| ≤ 5 for every bet |
| Replacement pool determinism | S3, Step 21 | 5,400/5,400 — non-held positions consume deck[5..9] sequentially L→R |
| Deck integrity | S3, Step 22 | 5,400/5,400 — deck[0..9] window contains 10 unique valid cards |
| Phase E hold pattern coverage | S3, Step 25 | 800/800 across 4 distinct hold counts (hold-0/1/2/5) |
| Card rank distribution | S2, Step 23 | χ²(12) = 8.39, p = 0.7541 across 27,000 dealt cards |
| Card suit distribution | S2, Step 24 | χ²(3) = 0.52, p = 0.9150 across 27,000 dealt cards |
| Anti-circularity proven | S4, Step 16 | Deal-only RTP = 33.7238% from independent C(52,5) enumeration |
| Optimal-play RTP solver | S4, Step 26 | 99.9000% with 9/6 JoB cross-validation at 99.5439% (target match to 6 dp) |
| 5/110 cherry-pick flags (binomial p = 0.6485) | S4, Step 18 | No seed pre-selection bias |
| 100.0% client seed influence | S1, Step 6 | Player entropy is genuine — 500/500 sampled bets produce different decks with alternate client seed |
5.5Scope
This certification covers the 16 fairness integrity tests listed above (15 standard + 1 Video-Poker-specific) — 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 standard tests are our fairness integrity matrix, applied identically to every game we audit. The Video Poker matrix adds one game-specific test (FI-VP-HOLD-001) covering hold/discard integrity.
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 (10 of 16): Reproducible from the open-source repo. These tests run against the captured 5,400-bet dataset and produce deterministic results.
API probe tests (6 of 16): Verified by issuing live adversarial requests against the running game. Per-test evidence (HTTP status codes, server-assigned nonces, seed hashes, server-computed card streams, and rejection responses) 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-video-poker.gitcd duel-video-poker && git checkout v1.2.1npm cinpm run verifyExpected output, as run at v1.2.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:capture] Step 4 — Nonce Audit → FI-NONCE-001, 002, 004
[PASS] Step 5 — Outcome Recomputation → FI-OUTCOME-001
[PASS] Step 6 — Client Seed Influence → FI-SEED-002
[PASS] Step 17 — Simulation Validation — Pass 1 → FI-ISO-001
[PASS] Step 20 — Hold Validity → FI-VP-HOLD-001
[PASS] Step 21 — Replacement Pool Determinism → FI-VP-HOLD-001
[PASS] Step 22 — Deck Integrity → FI-VP-HOLD-001
[PASS] Step 25 — Phase E Hold Pattern Coverage → FI-VP-HOLD-001API Probe Tests (completed):
# FI-NONCE-003: PASS — 7/7 invalid nonces silently ignored; sequence continuity maintained (568 → 576)# FI-SEED-001: PASS — 6/7 invalid seeds rejected HTTP 422; oversized seed accepted (gray area); all subsequent bets functional# FI-SEED-004: PASS — 0 hash collisions across 20 concurrent rotations on two accounts; full account isolation# FI-SEED-005: PASS — 10 rotations at 5-sec intervals; all hashes distinct; no suspicious prefix correlation# FI-PAYOUT-001: FLAG — invalid amounts rejected, out-of-bounds held cards rejected, BUT duplicate held_cards ["8D","8D"] accepted HTTP 200 (input-validation gap, no fairness impact)# FI-PAYOUT-002: PASS — 0 injection attempts honoured; cards and outcomes computed server-side# Status: 5 PASS, 1 FLAG (FI-PAYOUT-001 disclosed to Duel.com — see integrity-test repo testing/tests/videopoker/)held_cards array containing the same card twice (e.g. ["8D","8D"]) with HTTP 200 instead of rejecting. This is a server-side input-validation hygiene gap. It does not affect fairness or payout: the deck is pre-committed before the deal, the duplicate resolves to a single hold, and the final hand still settles from the pre-committed replacement pool exactly as it would for a valid hold. Disclosed to Duel.com for remediation.Player Verification
Can a player verify their own bets without trusting anyone?
Every Video Poker hand can be checked from public inputs. Save the hashed server seed before you play. After you rotate, compare the revealed seed's hash with your saved copy, then recompute the deck. This section walks through it step by step, with scripts you can run yourself that reproduce all 5,400 captured hands, and links the ProvablyFair.org verifier.
Key principles
- Save the hashed server seed before you play: your saved copy is what proves the timing
- Every hand can be reproduced from the server seed, client seed, nonce and your holds
- If your recomputed deck matches the table, the deal was the committed one
- Payouts use your stake's tier: the base-tier pay table covers stakes up to $1,182.85
What you need
- Server Seed — revealed after seed rotation (casino entropy)
- Client Seed — your player-controlled seed
- Nonce — the hand number in sequence (ensures uniqueness)
- Hold Pattern — which positions you held
- Save the hashed server seed before you play: your saved copy is what proves the timing
- Every hand can be reproduced from the server seed, client seed, nonce and your holds
- If your recomputed deck matches the table, the deal was the committed one
- Payouts use your stake's tier: the base-tier pay table covers stakes up to $1,182.85
- Server Seed — revealed after seed rotation (casino entropy)
- Client Seed — your player-controlled seed
- Nonce — the hand number in sequence (ensures uniqueness)
- Hold Pattern — which positions you held
Player can access all required inputsPass
Client seed origin transparentPass
crypto.getRandomValues, confirmed in Duel's live JavaScript (E18); players can set their ownVerification steps documentedPass
SHA-256(hexDecode(serverSeed)), the deal and draw, the tier 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 deal and final hand. Save the hashed seed before you play, so the timing rests on your own record.
- 1
Save the Commitment
Before your first hand on a seed pair, open the Provably Fair panel and copy the hashed server seed. Keep it outside Duel.
- 2
Play, Then Rotate
Play your hands. Your hold choices only decide which replacement cards fill your discards. When you're done, rotate the seed pair to reveal the server seed.
- 3
Open a Past Hand
Open the hand 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 deck: the first 5 cards are the deal and the next 5 fill your discards, left to right.
Verify a real bet, step by stepVerify a real bet · Swipe for all 4 steps →
Verify with ProvablyFair.org
Recompute any Video Poker hand from its revealed seeds, independently of the casino.
Open independent verifierBuilt-in verification
The operator’s own verification page. This tool is controlled by Duel.com.
Open Duel verifierVisual Walkthroughstep-by-step
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 play, 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 hands.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action.
Place a Video Poker bet — you'll be dealt 5 cards from a 52-card deck (positions 0–4 of the shuffle). Choose which cards to hold, then click "deal" to replace the discarded cards from positions 5–9 of the same shuffle. The casino committed to the entire 10-card window — initial deal AND replacement pool — before you placed the bet. Your hold pattern only determines which positions in the replacement pool get consumed.

Duel.com Video Poker — final hand displayed with paytable, payout multiplier, and Bet Again action. Both the initial 5 cards and the replacement pool are locked before any animation plays.
Open Transactions and click a past Video Poker hand. 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 1:
Server Seed (revealed) — the plaintext value the casino committed to before your hand. Hash it and compare with the commitment you saved before playing.
Client Seed — your player-controlled entropy input.
Nonce — the sequential bet counter for this seed pair.

Per-hand 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 shuffle and shows the initial cards (deck positions 0–4) and the next 5 cards (positions 5–9, which fill your discards left to right). If both match what you saw at the table, and the hash matches your saved copy, the hand was the one committed before you played.

Provably Fair page — seeds populated from the per-bet modal, recomputed initial cards and replacement pool rendered inline matching the live game result.
Manual Verification (Advanced)6 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 play, the server locks the entire deck shuffle using 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 hand unique
These go into HMAC-SHA256 to drive a backward Fisher–Yates shuffle of the 52-card deck, one value per swap. Rejection sampling makes every swap index exactly uniform. Your hand is the top of the deck (positions 0–4); the next 5 cards (positions 5–9) fill any cards you discard. The whole deck is fixed when the hand is dealt, before you choose what to hold. Because the server committed to its seed before you sent your client seed, it can't change the deck afterwards.
6.7Casino Verifier vs ProvablyFair.org Verifier4 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 |
| Trust model | Requires trusting the casino | Open-source, version-controlled |
| Payout shown | Cards only | Base-tier multiplier (stakes up to $1,182.85) |
6.8JavaScript Verification Script
Run this in Node.js to verify any hand. It checks the commitment against the hash you saved, reproduces the shuffle and builds your final hand from your holds. It matches our RNG on all 5,400 captured hands, and on the two off-capture hands with a rejected draw.
const crypto = require('crypto'); // Rank-major deck: index 0 is 2D, index 51 is AC (suits D, H, S, C).const RANKS = ['2','3','4','5','6','7','8','9','10','J','Q','K','A'];const ALL_CARDS = RANKS.flatMap(r => ['D','H','S','C'].map(s => r + s)); function computeShuffledDeck(serverSeed, clientSeed, nonce) { const key = Buffer.from(serverSeed, 'hex'); // 32 bytes, not the hex text const deck = [...ALL_CARDS]; let k = 0; // counter: one step per value read for (let i = 51; i >= 1; i--) { const range = i + 1; const limit = Math.floor(2 ** 32 / range) * range; let v; do { const hmac = crypto.createHmac('sha256', key).update(`${clientSeed}:${nonce}:${k}`).digest(); k += 1; v = hmac.readUInt32BE(0); // first 4 bytes, big-endian } while (v >= limit); // rejected: move on to the next counter const j = v % range; [deck[i], deck[j]] = [deck[j], deck[i]]; } return deck;} function verifyHash(serverSeed, savedHash) { const hash = crypto.createHash('sha256').update(Buffer.from(serverSeed, 'hex')).digest('hex'); return hash === savedHash;} // Replace with your values. savedHash is the hashed server seed you saved BEFORE playing.const serverSeed = 'YOUR_REVEALED_SERVER_SEED';const savedHash = 'YOUR_SAVED_SERVER_SEED_HASH';const clientSeed = 'YOUR_CLIENT_SEED';const nonce = 0;const held = []; // the cards you held, e.g. ['KH'] console.log('Hash check:', verifyHash(serverSeed, savedHash) ? 'PASS' : 'FAIL');const deck = computeShuffledDeck(serverSeed, clientSeed, nonce);const dealt = deck.slice(0, 5), pool = deck.slice(5, 10);let next = 0;const final = dealt.map(card => held.includes(card) ? card : pool[next++]);console.log('Dealt hand: ', dealt.join(' '));console.log('Replacement pool:', pool.join(' '));console.log('Final hand: ', final.join(' '));6.9Python Verification Script
The same verification in Python (standard library only):
import hashlib, hmac # Rank-major deck: index 0 is 2D, index 51 is AC (suits D, H, S, C).RANKS = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']ALL_CARDS = [r + s for r in RANKS for s in 'DHSC'] def compute_shuffled_deck(server_seed, client_seed, nonce): key = bytes.fromhex(server_seed) # 32 bytes, not the hex text deck = list(ALL_CARDS) k = 0 # counter: one step per value read for i in range(51, 0, -1): rng = i + 1 limit = (2**32 // rng) * rng while True: digest = hmac.new(key, f'{client_seed}:{nonce}:{k}'.encode(), hashlib.sha256).digest() k += 1 v = int.from_bytes(digest[:4], 'big') # first 4 bytes, big-endian if v < limit: # else rejected: next counter break j = v % rng deck[i], deck[j] = deck[j], deck[i] return deck def verify_hash(server_seed, saved_hash): return hashlib.sha256(bytes.fromhex(server_seed)).hexdigest() == saved_hash # Replace with your values. saved_hash is the hashed server seed you saved BEFORE playing.server_seed = 'YOUR_REVEALED_SERVER_SEED'saved_hash = 'YOUR_SAVED_SERVER_SEED_HASH'client_seed = 'YOUR_CLIENT_SEED'nonce = 0held = [] # the cards you held, e.g. ['KH'] print('Hash check:', 'PASS' if verify_hash(server_seed, saved_hash) else 'FAIL')deck = compute_shuffled_deck(server_seed, client_seed, nonce)dealt, pool = deck[:5], deck[5:10]it = iter(pool)final = [c if c in held else next(it) for c in dealt]print('Dealt hand: ', ' '.join(dealt))print('Replacement pool:', ' '.join(pool))print('Final hand: ', ' '.join(final))6.10Payouts Above the Base Tier
The base-tier pay table (videoPokerConfig.json) covers stakes up to $1,182.85, which includes every captured hand. For a larger stake, take the multiplier from your stake's tier in Duel's config (E20): in data.scaling_edge, find the entry whose min_bet ≤ stake ≤ max_bet and read its multipliers, ten values from the lowest rank to the highest (none, Jacks or Better, Two Pair, Three of a Kind, Straight, Flush, Full House, Four of a Kind, Straight Flush, Royal Flush). The ProvablyFair.org verifier shows the base-tier multiplier.
id 2, house_edge 0.0011) and pays 0.9998999×, $1,199.87988.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 hand on a seed pair, open the Provably Fair panel and copy the hashed server seed. Keep it outside Duel.
- 2
Play, Then Rotate
Play your hands. Your hold choices only decide which replacement cards fill your discards. When you're done, rotate the seed pair to reveal the server seed.
- 3
Open a Past Hand
Open the hand 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 deck: the first 5 cards are the deal and the next 5 fill your discards, left to right.
Visual Walkthroughstep-by-step
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 play, 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 hands.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action.
Place a Video Poker bet — you'll be dealt 5 cards from a 52-card deck (positions 0–4 of the shuffle). Choose which cards to hold, then click "deal" to replace the discarded cards from positions 5–9 of the same shuffle. The casino committed to the entire 10-card window — initial deal AND replacement pool — before you placed the bet. Your hold pattern only determines which positions in the replacement pool get consumed.

Duel.com Video Poker — final hand displayed with paytable, payout multiplier, and Bet Again action. Both the initial 5 cards and the replacement pool are locked before any animation plays.
Open Transactions and click a past Video Poker hand. 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 1:
Server Seed (revealed) — the plaintext value the casino committed to before your hand. Hash it and compare with the commitment you saved before playing.
Client Seed — your player-controlled entropy input.
Nonce — the sequential bet counter for this seed pair.

Per-hand 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 shuffle and shows the initial cards (deck positions 0–4) and the next 5 cards (positions 5–9, which fill your discards left to right). If both match what you saw at the table, and the hash matches your saved copy, the hand was the one committed before you played.

Provably Fair page — seeds populated from the per-bet modal, recomputed initial cards and replacement pool rendered inline matching the live game result.
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 play, the server locks the entire deck shuffle using 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 hand unique
These go into HMAC-SHA256 to drive a backward Fisher–Yates shuffle of the 52-card deck, one value per swap. Rejection sampling makes every swap index exactly uniform. Your hand is the top of the deck (positions 0–4); the next 5 cards (positions 5–9) fill any cards you discard. The whole deck is fixed when the hand is dealt, before you choose what to hold. Because the server committed to its seed before you sent your client seed, it can't change the deck afterwards.
6.7Casino Verifier vs ProvablyFair.org Verifier4 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 |
| Trust model | Requires trusting the casino | Open-source, version-controlled |
| Payout shown | Cards only | Base-tier multiplier (stakes up to $1,182.85) |
6.8JavaScript Verification Script
Run this in Node.js to verify any hand. It checks the commitment against the hash you saved, reproduces the shuffle and builds your final hand from your holds. It matches our RNG on all 5,400 captured hands, and on the two off-capture hands with a rejected draw.
const crypto = require('crypto'); // Rank-major deck: index 0 is 2D, index 51 is AC (suits D, H, S, C).const RANKS = ['2','3','4','5','6','7','8','9','10','J','Q','K','A'];const ALL_CARDS = RANKS.flatMap(r => ['D','H','S','C'].map(s => r + s)); function computeShuffledDeck(serverSeed, clientSeed, nonce) { const key = Buffer.from(serverSeed, 'hex'); // 32 bytes, not the hex text const deck = [...ALL_CARDS]; let k = 0; // counter: one step per value read for (let i = 51; i >= 1; i--) { const range = i + 1; const limit = Math.floor(2 ** 32 / range) * range; let v; do { const hmac = crypto.createHmac('sha256', key).update(`${clientSeed}:${nonce}:${k}`).digest(); k += 1; v = hmac.readUInt32BE(0); // first 4 bytes, big-endian } while (v >= limit); // rejected: move on to the next counter const j = v % range; [deck[i], deck[j]] = [deck[j], deck[i]]; } return deck;} function verifyHash(serverSeed, savedHash) { const hash = crypto.createHash('sha256').update(Buffer.from(serverSeed, 'hex')).digest('hex'); return hash === savedHash;} // Replace with your values. savedHash is the hashed server seed you saved BEFORE playing.const serverSeed = 'YOUR_REVEALED_SERVER_SEED';const savedHash = 'YOUR_SAVED_SERVER_SEED_HASH';const clientSeed = 'YOUR_CLIENT_SEED';const nonce = 0;const held = []; // the cards you held, e.g. ['KH'] console.log('Hash check:', verifyHash(serverSeed, savedHash) ? 'PASS' : 'FAIL');const deck = computeShuffledDeck(serverSeed, clientSeed, nonce);const dealt = deck.slice(0, 5), pool = deck.slice(5, 10);let next = 0;const final = dealt.map(card => held.includes(card) ? card : pool[next++]);console.log('Dealt hand: ', dealt.join(' '));console.log('Replacement pool:', pool.join(' '));console.log('Final hand: ', final.join(' '));6.9Python Verification Script
The same verification in Python (standard library only):
import hashlib, hmac # Rank-major deck: index 0 is 2D, index 51 is AC (suits D, H, S, C).RANKS = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']ALL_CARDS = [r + s for r in RANKS for s in 'DHSC'] def compute_shuffled_deck(server_seed, client_seed, nonce): key = bytes.fromhex(server_seed) # 32 bytes, not the hex text deck = list(ALL_CARDS) k = 0 # counter: one step per value read for i in range(51, 0, -1): rng = i + 1 limit = (2**32 // rng) * rng while True: digest = hmac.new(key, f'{client_seed}:{nonce}:{k}'.encode(), hashlib.sha256).digest() k += 1 v = int.from_bytes(digest[:4], 'big') # first 4 bytes, big-endian if v < limit: # else rejected: next counter break j = v % rng deck[i], deck[j] = deck[j], deck[i] return deck def verify_hash(server_seed, saved_hash): return hashlib.sha256(bytes.fromhex(server_seed)).hexdigest() == saved_hash # Replace with your values. saved_hash is the hashed server seed you saved BEFORE playing.server_seed = 'YOUR_REVEALED_SERVER_SEED'saved_hash = 'YOUR_SAVED_SERVER_SEED_HASH'client_seed = 'YOUR_CLIENT_SEED'nonce = 0held = [] # the cards you held, e.g. ['KH'] print('Hash check:', 'PASS' if verify_hash(server_seed, saved_hash) else 'FAIL')deck = compute_shuffled_deck(server_seed, client_seed, nonce)dealt, pool = deck[:5], deck[5:10]it = iter(pool)final = [c if c in held else next(it) for c in dealt]print('Dealt hand: ', ' '.join(dealt))print('Replacement pool:', ' '.join(pool))print('Final hand: ', ' '.join(final))6.10Payouts Above the Base Tier
The base-tier pay table (videoPokerConfig.json) covers stakes up to $1,182.85, which includes every captured hand. For a larger stake, take the multiplier from your stake's tier in Duel's config (E20): in data.scaling_edge, find the entry whose min_bet ≤ stake ≤ max_bet and read its multipliers, ten values from the lowest rank to the highest (none, Jacks or Better, Two Pair, Three of a Kind, Straight, Flush, Full House, Four of a Kind, Straight Flush, Royal Flush). The ProvablyFair.org verifier shows the base-tier multiplier.
id 2, house_edge 0.0011) and pays 0.9998999×, $1,199.87988.Only disclosed inputs are used, and identical inputs always give the same deal and final hand. Save the hashed seed before you play, 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-video-poker
- Release: v1.2.1 · Framework 1.1
- Original audit: 071d7e0 · June 2026
- Public Verifier: provablyfair.org/verify-bets/duel
Prerequisites
- Node.js 22.x (
.nvmrc) - npm
- Git
- GitHub: ProvablyFair-org/duel-video-poker
- Release: v1.2.1 · Framework 1.1
- Original audit: 071d7e0 · June 2026
- Public Verifier: provablyfair.org/verify-bets/duel
- Node.js 22.x (
.nvmrc) - npm
- Git
npm test at release v1.2.1 reproduces the committed results: 27 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 unit tests, then the 28 scored steps against the captured hands, then the reproduction gate. It doesn't rerun the simulation or the enumeration; npm run test:full does.
The scored steps on their own. Results go to outputs/run/, never over the committed evidence.
Pass 1: 10 streams × 1,000,000 deals on pinned seeds, combined with Fisher's method. Pass 2: each of the 110 revealed casino seeds dealt for 100,000 nonces. Writes to outputs/run/; npm run test:full compares it with the pinned artifact.
Exhaustive enumeration of all 2,598,960 deals × 32 holds. Cross-validates on the standard 9/6 table, then computes Duel's base-tier table. Writes to outputs/run/. Output as run on 22 October 2026 (timings vary by machine); the result was byte-identical to the pinned artifact.
Audit Reproducibility Pinning
- Release
v1.2.1(Framework 1.1)- Original audit
071d7e081d9fa1c63fa37d187ff4a1395e229c98(4 June 2026)- Node Version
- 22.x (
.nvmrc,package.jsonengines) - Dataset
- data/video-poker-dataset-5400bets.json (5,400 hands, 115 seed records)
- Dataset Hash (SHA-256)
- 363fd4d4c072a1180ca2e7ab61d0c8dcc6f3300f315449af0d7101dd45dd0654
- Pay Table Hash (SHA-256)
- 9daedc8fc7a53e328d50b5e8019c177b32d5bf7992494a7da18136f524a70542
- Capture
- 24 April 2026
- Audit ID
- PF-2026-DL08
Output Artifacts8 files of record
| File | Contents | Size |
|---|---|---|
| verification-results.json | All 28 step results, profile coverage, verdict | ~47KB |
| determinism-log.json | 5,400 verified, 0 mismatches, 0 skipped | 57B |
| chi-squared-results.json | Card rank and suit chi-squared tables (Steps 23–24) | ~1.3KB |
| payout-coverage.json | Pay-table ranks reached live; the deal-stage share of the one never reached | ~1.4KB |
| optimal-play-rtp.json | Enumerated RTP 99.900000%; 9/6 cross-validation 99.543904%; pay-table hash | ~3.9KB |
| rtp-claim-table.json | RTP claim, the per-setting row and the outcome (PASS) | ~2.3KB |
| simulation-results.json | Pass 1 (with census rows) + Pass 2 (window census) | ~824KB |
| rtp-convergence.html | Self-contained deal-only RTP convergence chart | ~210KB |
Repository Structure
duel-video-poker/ (release v1.2.1) ├── src/ │ ├── rng.ts → HMAC-SHA256 backward Fisher–Yates shuffle, written from docs/ALGORITHM.md │ ├── hand-evaluator.ts → Our own 10-rank hand evaluator │ ├── compute-optimal-rtp.ts → Exhaustive C(52,5) × 32-hold enumeration │ ├── optimal-strategy.ts → Best-hold engine used by the unit tests │ ├── simulate.ts → Monte Carlo: 10M Pass 1 + 11M Pass 2 │ ├── stats.ts → Chi-squared, Fisher's method, lag-1, runs test │ ├── loader.ts → Dataset loader, capture plan, dataset + pay-table pins │ ├── rtp-claim.ts → Framework rule RTP-CLAIM 1.2.0 │ ├── rtp-settings.ts → The claim and the RTP table for this package │ ├── operator-verifier.ts → Runs Duel's Verify-tab code unmodified (cross-check) │ ├── site-verifier.ts → Loads the pinned ProvablyFair.org verifier code │ ├── artifact-pins.ts → SHA-256 pins for the artifacts of record │ ├── profile-map.ts → Step → Video Poker profile check (VP-01 … VP-32) │ └── domains.ts, diff.ts, types.ts, rtp-claim-switch.ts ├── tests/ │ ├── verify.ts → 28 scored steps + the reproduction gate │ ├── steps/ → commitment, determinism, payouts, dataset, simulation, │ │ game-specific, artifacts, statistical, context │ ├── videoPoker/ → Mocha unit tests (incl. the spec self-test) │ └── mutations.json → Mutation battery registry ├── docs/ALGORITHM.md, INTERFACE.md → The written specification and module interface ├── data/video-poker-dataset-5400bets.json → 5,400 live hands (5 phases, 115 seed records) ├── videoPokerConfig.json → Base-tier pay table (10 hand ranks) ├── evidence/ → Screenshots, Duel's Verify-tab code (E19), stake-tier config (E20) ├── verifier-parity/ → Pinned copies of the ProvablyFair.org verifier and the operator runner ├── capture/ → Non-runnable reference records of the capture scripts ├── outputs/ → Committed evidence of record (runs write to outputs/run/) ├── scripts/ → mutate.mjs, release-manifest.mjs ├── 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-Reference28 verification steps mapped
| Step | Test Name | Report Section |
|---|---|---|
| 1 | Seed Hash Integrity | S1 |
| 2 | Commitment Linkage | S1 |
| 3 | Hash Consistency Within Epoch | S1 |
| 4 | Nonce Audit (capture flag) | S1, S5 |
| 5 | Outcome Recomputation | S1, S2, S3 |
| 6 | Client Seed Influence | S1, S2, S5 |
| 7 | Payout Math | S3, S4, S5 |
| 8 | Multiplier Provenance | S3, S4, S5 |
| 9 | Phase C Bet-Size Invariance | S3, S4, S5 |
| 10 | House Edge Audit | S4 |
| 11 | Config Completeness & Payout-Cell Coverage | S3, S4 |
| 12 | Epoch Size | S1 |
| 13 | Population & Phase Labels | S3 |
| 14 | Dataset Hash | S7 |
| 15 | Phase D — Client Seed Variation | S1, S3, S5 |
| 16 | Anti-Circularity (Theoretical Deal-Only RTP) | S4 |
| 17 | Simulation Validation — Pass 1 | S2, S4 |
| 18 | Pass 2 Cherry-Pick Detection | S4, S5 |
| 19 | Hand Classification Accuracy | S3 |
| 20 | Hold Validity | S3, S5 |
| 21 | Replacement Pool Determinism | S3, S5 |
| 22 | Deck Integrity | S2, S3, S5 |
| 23 | Card Rank Distribution | S2 |
| 24 | Card Suit Distribution | S2 |
| 25 | Phase E Hold Pattern Coverage | S3, S5 |
| 26 | Optimal-Play RTP Verification | S4 |
| 27 | Reconstructed Hands Disclosure | S3 |
| 28 | Artifact Integrity (pinned artifacts of record) | S7 |
reproduce-audit.sh
npm test at release v1.2.1 reproduces the committed results: 27 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 draw check failed, but the RTP claim rule found a published figure 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.22.0: REPRODUCED (1 within tolerance, largest 1.11e-16 at steps[17].data.cherryPickBinomialP)7.3SHA-256 Pinned Artifacts
Step 28 hashes the artifacts the verifier does not produce itself; a missing or altered one is a hard fail. The release manifest hashes all seven.
| File | SHA-256 |
|---|---|
| data/video-poker-dataset-5400bets.json | 363fd4d4c072a1180ca2e7ab61d0c8dcc6f3300f315449af0d7101dd45dd0654 |
| videoPokerConfig.json | 9daedc8fc7a53e328d50b5e8019c177b32d5bf7992494a7da18136f524a70542 |
| outputs/optimal-play-rtp.json | 714eca5e92f209b64c8805ed049a3f6915d95a2a616d182f075ccbd4d5ea9fe7 |
| outputs/simulation-results.json | 9ebc10764af0954d340fcaa177b28950a320f78118c7d42107d886ca5ef5848a |
| outputs/rtp-convergence.html | 1197fd099a317102a34ff5e3b522bf3631a02065441a21d7bcf3e2b0997931a2 |
| outputs/rtp-claim-table.json | d16678b014447e3b3f958f9f4ee9c432cf34e0f54a108e48911f812eedc44e54 |
| outputs/verification-results.json | 08ef0be7dab5d3fd86a7ababb35849d5e29918b3c144c3a4f9df5b279f15fa29 |
node scripts/release-manifest.mjs --check checks that all seven hashes match the files on disk.
7.4Mutation Battery & Runtime
Mutation battery: 50 / 50 mutations killed and all 28 scored steps have a killing mutation, no declared survivors (npm run mutate, 20 October 2026).
Runtime: npm test took 28 s on an Apple M2 Max (release manifest, 28 September 2026); the optimal-play enumeration takes about two minutes there. 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: RTP claim rule switched on, Step 4 reported as a capture flag; 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.2.1 | Adds .gitattributes so a Windows clone stays byte-identical; no audit content changed | Unchanged |
Game Profile Coverage
Is every check in the Video Poker profile covered?
The Video Poker profile (version 1.0.2) lists 32 checks, VP-01 to VP-32. 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 |
|---|---|---|---|
| VP-01 | Step 1 | Full | Every seed record walked; revealed seeds hash to their commitments |
| VP-02 | Step 2 | Full | Forward links recomputed from the raw hashes, plus the pre-capture anchor |
| VP-03 | Step 3 | Full | Epochs keyed by the rotation timeline; one hash and one client seed per epoch |
| VP-04 | Step 4 | Full | Duplicates and gaps fail unless they match the capture plan's 2 retry gaps (capture flag) |
| VP-05 | Steps 12, 13 | Full | Epoch-size histogram and population bound to the capture plan |
| VP-06 | Steps 6, 15 | Partial | Client seed influence and Phase D recomputation. Partial: the capture's seeds came from Math.random() and Phase D used one seed (profile floor: 2) |
| VP-07 | Step 5 | Full | Every hand recomputed to its served deal and final hand |
| VP-08 | Step 22 | Full | Draw-bias bound exact (0) for every range 2–52; rejection census |
| VP-09 | Package check | Full | RNG rebuilt from the written specification; Duel's Verify-tab code run unmodified as a cross-check |
| VP-10 | Steps 19, 20, 21, 22 | Full | Deck, deal and draw structure: rank, hold validity, replacement order, deck integrity |
| VP-11 | Step 7 | Full | Payouts exact on the served decimal strings, no tolerance |
| VP-12 | Step 9 | Partial | Phase C stake invariance. Partial: 18 paying hands at $10, below the profile's 100 |
| VP-13 | Step 8 | Full | Served multiplier equals the pinned pay table on every hand |
| VP-14 | Step 11 | Full | Pay table non-increasing by rank; the cap noted from the config |
| VP-15 | Steps 11, 25 | Full | Payout-cell coverage (9 of 10 ranks reached live) and the 8 planned hold patterns |
| VP-16 | — | n/a | No deal or draw response carries a running balance |
| VP-17 | Steps 21, 25 | Full | The hold is not an HMAC input; every final hand recomputes from the deal-time deck |
| VP-18 | Step 16 | Full | All 2,598,960 hands enumerated; rank counts exact; negative control |
| VP-19 | Step 26 | Partial | Enumerated optimal-play RTP and the RTP claim. Partial: only the base stake tier is tabled |
| VP-20 | Step 17 | Full | 10M-round simulation, every statistic re-derived from the shipped rows |
| VP-21 | Step 18 | Full | Pass 2 cherry-pick test on all 110 revealed seeds |
| VP-22 | Steps 23, 24 | Full | Live card rank and suit fit (informational) |
| VP-23 | Package check | Full | The package’s S5 matrix, each row mapped to the scored steps |
| VP-24 | Step 5 | Full | The ProvablyFair.org verifier's code (pinned copy) run on every hand |
| VP-25 | Package check | Full | Player verification steps in order, with the commitment encoding |
| VP-26 | Step 14 | Full | Dataset and pay table pinned by SHA-256 |
| VP-27 | Step 28 | Full | Pinned artifacts and value domains |
| VP-28 | Package check | Full | Fresh-clone reproduction record |
| VP-29 | Package check | Full | Mutation battery: every scored step has a killing mutation |
| VP-30 | Package check | Full | Limitations register and load-bearing premises |
| VP-31 | Step 10 | Full | effective_edge on every deal and draw equals the base-tier 0.1 |
| VP-32 | Step 27 | Full | Reconstructed records counted (0) |