Skip to main content
Audits
Duel.com/Blackjack
Duel: Blackjack Audit

Blackjack

Certified · Active

Independent verification, backed by open-source code.

PF-2026-DL09Audited May 2026 · Updated October 2026May 2026 · Updated Oct 2026Framework 1.1Release v1.2.1Original audit bff0ef5, June 2026, Jun 2026
AUDIT RESULTPassedPROVABLY FAIR — Full Pass36 / 38 steps passed
PROVABLY FAIR — Full Pass
Live Bets Verified
6,000
Parity Rate
100%
Simulated RoundsSimulated RTP 99.4670%
10M
Simulated RTP 99.4670%
Proven RTP · optimal play
99.4296%
Main bet, optimal play, per initial bet
36 / 38Verification steps passed

Verification pipeline

Real bets. Independently reproduced.

Placed anonymously at Duel.com. We rebuilt the game logic from scratch and matched all 6,000 recorded outcomes.

DUEL BLACKJACK$0.01 · S17 · DAS · 3:2
DEALER · 18
8♣
3♣
7♣
PLAYER · 19 · WIN
3♦
5♥
A♠

hit → stand

Bet #13420570Nonce 0 · Phase A
50 real bets · Phase ABet 1 of 50
✓ Cards match
Win

Recorded hand · Cards reproduced.

Casino outcome
Win · 19
Our reproduction
6 / 6 cards match
Recorded payout
$0.0200
Open source

Run this audit yourself

Open GitHub ↗

The repo is the credential. Every finding ships as code. At release v1.2.1, npm test runs the 81 unit tests and all 38 scored steps against the 6,000 captured hands, then compares the fresh results with the committed ones. It prints 36 PASS + 2 capture-origin FLAGs, 0 hard fails, REPRODUCED, and exits 0.

npm test
Needs git and Node.js 22View reproduction commands ↓
Blackjack Audit Overview

PROVABLY FAIR — Full Pass. We captured 6,000 real Blackjack hands on Duel.com on 30 April – 1 May 2026 and recomputed every card, every hand's result and every payout with our own implementation, written from the specification. 36 of 38 steps pass, with two capture flags and no hard fails: seven hands our capture script missed, and insurance never taken, so its 2:1 payout wasn't exercised. Neither is a Duel issue. Certified under ProvablyFair.org Framework 1.1 at release v1.2.1.

Results at a glance

Audit Verdict

CheckResultEvidence
Overall StatusPassPROVABLY FAIR — Full Pass. 36 of 38 steps pass, 2 capture flags, 0 hard fails (Framework 1.1, release v1.2.1). Both capture flags are limited by our capture script, not a Duel issue: Step 4, seven hands missed on retried requests; Step 37, insurance never taken, so its 2:1 payout wasn't exercised. Covers the main bet at $0.01 and $10 and both side bets at $0.01.
Proven RTPPass99.4296% per initial bet under optimal play (S17, DAS, no surrender, no re-split, infinite deck); 99.4939% per total amount wagered. From an engine that takes no casino input, equal to an exact-rational oracle within 1e-12 (Step 16). RTP claim (RTP-CLAIM 1.2.0): 99.43%, from the 0.57% edge Duel staff stated, holds within ±0.1 pp, with the true figure 0.000388 pp below it: PASS (Step 16). Simulated: 99.4670% over 10M hands
Live ↔︎ Verifier ParityPass6,000 / 6,000 hands, 33,194 cards at their declared cursors, the 269 split rounds in the declared split order (Steps 5, 22). Both ProvablyFair.org verifiers, this site's and the main site's, and Duel's Verify-tab code, run unmodified as a cross-check, agree on every round (Step 38)
Commit-Reveal SystemPass120 / 120 revealed server seeds hash to their commitments and 120 forward links are consistent (Steps 1–3). That each commitment was shown before its bets rests on the capture's records; the first epoch has no link from before the capture
Nonce AuditCapture flag113 / 120 epochs complete as captured, no nonce served twice, none out of order. Seven nonces were missed when our capture script retried a request: limited by our capture script, not a Duel issue (Step 4)
Client SeedPassA genuine HMAC input: a wrong and an empty client seed each change all 6,000 initial deals (Step 6); the 500 Phase D hands recompute under 10 player-set seeds (Step 15). Duel's default seed is generated in the browser and players can set their own
RNG AnalysisPassOur own HMAC-SHA256 implementation, written from the specification, reproduces every card; rejection sampling leaves a bias of exactly 0, since the accepted values are 52 × 82,595,524 (Steps 5, 35)
Payout LogicPass6,269 hands settled from the recomputed cards, Duel's result label agreeing on every one, and amount_won exact on the 18-decimal grid on 6,000 / 6,000 rounds, no tolerance (Step 7). 5,800 Perfect Pairs and 5,800 21+3 results paid the published multipliers (Steps 8, 26)
Game RulesPassS17 on 4,216 dealer play-outs (75 / 75 soft 17s stood), peek, split by rank, one card to split aces, DAS, double on any two and no surrender, each observed with a witness count; all 6,000 rounds replay from the seed and the recorded actions alone (Steps 19, 23, 36, 37)
Insurance PayoutCapture flagOffered on every dealer Ace and never otherwise (462 / 462, Step 25). The capture declined every prompt, so the 2:1 payout wasn't exercised: limited by our capture script, not a Duel issue (Step 37)
Scaling House EdgeInfoEvery captured hand paid standard odds and every side bet its full multiplier. Duel's 5 October 2026 config serves a stake-scaled edge: 0.1% on main bets up to $45,748.05, rising to 0.57% in the last tier, which ends at $260,608.48, and Perfect Pairs and 21+3 multipliers reduced from 0.1% and 0% up to 1%. Explained from the config, not certified
Re-splitInfoDuel offered no further split on any of the 46 split hands dealt a pair again, in line with its no-re-split rule
Anti-CircularityPassThe engine reads only the rules and the infinite-deck rank distribution, no casino figure. An exact-rational oracle written separately agrees within 1e-12, and a dealer-hits-soft-17 control moves the figure to 99.2108% (Step 16)
Fairness IntegrityPass17 fairness integrity tests — 16 pass · 1 N/A (includes 2 Blackjack-specific multi-step state tests)
DeterminismPassEvery card recomputes from (serverSeed, clientSeed, nonce, cursor); stake and actions are not inputs to any card (Steps 5, 9, 36)
ReproducibilityPassnpm test at v1.2.1: REPRODUCED, exit 0. Runs write to outputs/run/ and are compared with the committed results
Overall StatusPass
PROVABLY FAIR — Full Pass. 36 of 38 steps pass, 2 capture flags, 0 hard fails (Framework 1.1, release v1.2.1). Both capture flags are limited by our capture script, not a Duel issue: Step 4, seven hands missed on retried requests; Step 37, insurance never taken, so its 2:1 payout wasn't exercised. Covers the main bet at $0.01 and $10 and both side bets at $0.01.
Proven RTPPass
99.4296% per initial bet under optimal play (S17, DAS, no surrender, no re-split, infinite deck); 99.4939% per total amount wagered. From an engine that takes no casino input, equal to an exact-rational oracle within 1e-12 (Step 16). RTP claim (RTP-CLAIM 1.2.0): 99.43%, from the 0.57% edge Duel staff stated, holds within ±0.1 pp, with the true figure 0.000388 pp below it: PASS (Step 16). Simulated: 99.4670% over 10M hands
Live ↔︎ Verifier ParityPass
6,000 / 6,000 hands, 33,194 cards at their declared cursors, the 269 split rounds in the declared split order (Steps 5, 22). Both ProvablyFair.org verifiers, this site's and the main site's, and Duel's Verify-tab code, run unmodified as a cross-check, agree on every round (Step 38)
Commit-Reveal SystemPass
120 / 120 revealed server seeds hash to their commitments and 120 forward links are consistent (Steps 1–3). That each commitment was shown before its bets rests on the capture's records; the first epoch has no link from before the capture
Nonce AuditCapture flag
113 / 120 epochs complete as captured, no nonce served twice, none out of order. Seven nonces were missed when our capture script retried a request: limited by our capture script, not a Duel issue (Step 4)
Client SeedPass
A genuine HMAC input: a wrong and an empty client seed each change all 6,000 initial deals (Step 6); the 500 Phase D hands recompute under 10 player-set seeds (Step 15). Duel's default seed is generated in the browser and players can set their own
RNG AnalysisPass
Our own HMAC-SHA256 implementation, written from the specification, reproduces every card; rejection sampling leaves a bias of exactly 0, since the accepted values are 52 × 82,595,524 (Steps 5, 35)
Payout LogicPass
6,269 hands settled from the recomputed cards, Duel's result label agreeing on every one, and amount_won exact on the 18-decimal grid on 6,000 / 6,000 rounds, no tolerance (Step 7). 5,800 Perfect Pairs and 5,800 21+3 results paid the published multipliers (Steps 8, 26)
Game RulesPass
S17 on 4,216 dealer play-outs (75 / 75 soft 17s stood), peek, split by rank, one card to split aces, DAS, double on any two and no surrender, each observed with a witness count; all 6,000 rounds replay from the seed and the recorded actions alone (Steps 19, 23, 36, 37)
Insurance PayoutCapture flag
Offered on every dealer Ace and never otherwise (462 / 462, Step 25). The capture declined every prompt, so the 2:1 payout wasn't exercised: limited by our capture script, not a Duel issue (Step 37)
Scaling House EdgeInfo
Every captured hand paid standard odds and every side bet its full multiplier. Duel's 5 October 2026 config serves a stake-scaled edge: 0.1% on main bets up to $45,748.05, rising to 0.57% in the last tier, which ends at $260,608.48, and Perfect Pairs and 21+3 multipliers reduced from 0.1% and 0% up to 1%. Explained from the config, not certified
Re-splitInfo
Duel offered no further split on any of the 46 split hands dealt a pair again, in line with its no-re-split rule
Anti-CircularityPass
The engine reads only the rules and the infinite-deck rank distribution, no casino figure. An exact-rational oracle written separately agrees within 1e-12, and a dealer-hits-soft-17 control moves the figure to 99.2108% (Step 16)
Fairness IntegrityPass
17 fairness integrity tests — 16 pass · 1 N/A (includes 2 Blackjack-specific multi-step state tests)
DeterminismPass
Every card recomputes from (serverSeed, clientSeed, nonce, cursor); stake and actions are not inputs to any card (Steps 5, 9, 36)
ReproducibilityPass
npm test at v1.2.1: REPRODUCED, exit 0. Runs write to outputs/run/ and are compared with the committed results
Audit scope & reference

What Was Audited

✓ Audited

  • Every card is set by the server seed, client seed, nonce and cursor, and recomputes exactly (6,000 / 6,000 hands, 33,194 cards)
  • Your stake and your actions are not inputs to any card: your choices only decide how many cards are drawn
  • Revealed server seeds match their commitments (120 / 120), and the 121 seed records fit together
  • Your client seed is a genuine input: changing it changes the deal
  • Every hand's result and every payout follows from the cards, exactly; at the $0.01 stake captured, both side bets were paid the published multipliers
  • The dealer stands on soft 17 and the other rules hold as observed, each with a witness count
  • Theoretical RTP is 99.4296% per initial bet under optimal play, matching the 0.57% edge a Duel staff member has stated
  • The cards are dealt the same way at $0.01 and $10
  • Players can check every hand

What Audit Excludes

  • Duel's stake-scaled edge (up to 0.57% on the main bet; its first Perfect Pairs tier is already 0.1% from $0) — explained from the config in 4.6, not tested
  • Rakeback and the daily zero-edge limit — 99.4296% is the proven RTP; these are operator-side
  • Insurance payout and re-splits — never exercised in the capture
  • Max win
  • Seed rotation during an unfinished hand
  • 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
2 columns
AreaDescription
Commit-Reveal SystemSHA-256 server seed hashing, the forward commitment chain, reveal on rotation
Client Seed OriginBrowser-generated default, player-customisable; the capture's own seeds disclosed
Seed HandlingClient seed control, nonce lifecycle, seed pair rotation
RNG AnalysisHMAC-SHA256 single-card draw with rejection sampling, written from the specification; bias bound; infinite deck
Game FlowDeal (cursors 0–3), player actions, the declared split order, dealer play-out; every round replayed from its actions
Payout LogicSettlement from the cards in exact money: wins, 3:2 naturals, pushes, doubles, split hands
Side BetsPerfect Pairs and 21+3: category from the cards, served multiplier, exact payout, deal-time invariance
Live ParityOur recomputation, Duel's Verify-tab code (cross-check) and both ProvablyFair.org verifiers against every live hand
RTP ValidationOptimal-play engine and exact-rational oracle, RTP claim rule, 10M-hand simulation, cherry-pick test (Pass 2)
Fairness IntegrityStandard integrity matrix — tests across commit-reveal, determinism, payout, isolation, and parameter enforcement
Game Profile CoverageAll 30 Blackjack 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 (6,000 / 6,000; 33,194 cards)
  • Every hand's result and payout follows from the cards, exactly, on the 18-decimal grid
  • Under optimal play, theoretical RTP is 99.4296% per initial bet, from the rules alone
  • The 0.57% edge a Duel staff member has stated holds under the RTP claim rule: 0.000388 pp from the true figure
  • The client seed is a genuine input: a wrong seed changes all 6,000 initial deals
  • Your stake and your actions are not inputs to any card

References

Blackjack — Game Rules6 sections▶

Blackjack is a single-hand game against the dealer: get closer to 21 than the dealer without going over. Choose to hit, stand, double or split. The dealer stands on every 17 and a natural pays 3:2. The deck is treated as infinite, so each card is drawn independently and the same card can appear twice in a hand. Two optional side bets, Perfect Pairs and 21+3, settle on the deal.

How to Play

1. Place your bet — Choose your stake on the main hand. You may also place independent stakes on Perfect Pairs and 21+3 side bets.
2. Receive the deal — You get two face-up cards (cursors 0 and 2). The dealer gets a face-up up-card (cursor 1) and a face-down hole card (cursor 3). The side bets settle now. If either side has a natural, the round ends at the deal.
3. Decide your action — Hit (take another card), stand (keep your hand), double (one more card for double the stake) or split (two cards of the same rank become two hands; once per hand, and split aces take one card each).
4. Play out the dealer — Once you stand or bust, the dealer turns over the hole card and draws until reaching 17 or more, standing on soft 17. If every hand of yours is bust, the dealer doesn't draw.
5. Outcome — Win pays 1:1 on the main bet (return = 2× stake). A natural blackjack (Ace + 10-value on the deal) pays 3:2 (return = 2.5× stake) unless the dealer also has blackjack (push, return = 1×). A doubled win returns 4× stake; a doubled push returns 2× stake; a loss or bust returns 0.

Every card of the hand is fixed by the seeds, the nonce and its cursor when the hand is placed. Your decisions only decide how many cards are drawn; they can't change which cards come out.
Win Conditions

The win condition compares the final hand totals after the dealer plays out.

3 columns
OutcomeConditionReturn on $1 main stake
Natural blackjackPlayer has Ace + 10-value on the deal; dealer does not$2.50 (3:2 payout)
Win (regular)Player total ≤ 21 and beats dealer total$2.00 (1:1)
Doubled winPlayer doubled, hand ≤ 21, beats dealer$4.00
PushPlayer and dealer have the same final total$1.00 (stake returned)
Doubled pushPlayer doubled, ties dealer$2.00 (doubled stake returned)
Loss / bustPlayer total > 21 OR dealer beats player$0.00
When both you and the dealer have a natural, it's a push: the one case where 3:2 doesn't apply. A two-card 21 on a split hand is a total, not a natural, and pays 1:1. Insurance is offered only when the dealer's up-card is an Ace (Step 25); its 2:1 payout was never funded in the capture, so it is assumed.
Risk vs Reward

Blackjack's RTP is set by the rules. Duel's settings do carry a house-edge value, but it was not applied to any captured hand (4.6).

  • Theoretical RTP is 99.4296% per initial bet with optimal play, from an engine that enumerates all 1,000 starting (P1, P2, up-card) combinations against the dealer's S17 outcomes
  • House edge 0.5704% of the initial bet; 0.5061% of everything wagered, doubles and splits included
  • Decisions matter — mistakes (hitting hard 17, splitting 10s) lower the return; 99.4296% is the ceiling with optimal play
  • Stake doesn't change the cards — getCard(serverSeed, clientSeed, nonce, cursor) has no stake input. Duel's stake-scaled edge and rakeback are explained, not certified
Parameters
3 columns
ParameterValueNotes
Deck ModelInfinite (with replacement)Each card drawn independently at 1/52; the same card can appear more than once in a round (bet 13423352: 4♠ three times)
Dealer RuleStand on all 17 (S17)Including soft 17: 75 / 75 soft 17s stood, 4,216 play-outs compliant (Step 19)
Blackjack Payout3:2 (returns 2.5× stake)260 paid 2.5×, 17 pushed against a dealer natural (Step 20)
DoublingOn any two cards; DAS allowed1,368 doubled hands in 1,291 rounds reconciled (Step 21); 766 doubles outside 9–11 (Step 37)
SplittingRank pairs only; once per hand; one card to split aces269 split rounds in the declared order (Steps 22–24); re-splitting never offered, never tried. Duel's 22 April 2026 rules description says non-like tens (e.g. K-Q) can be split; the game offered no split on any of the 428 such hands dealt (no RTP effect: optimal play never splits tens)
SurrenderNot availableConfirmed via available-actions audit (Step 28)
InsuranceOffered only on a dealer Ace; stated to pay 2:1Offer verified (Step 25); payout assumed, never funded (Step 37)
Side BetsPerfect Pairs + 21+3 (settle at the deal)5,800 of each verified at $0.01 (Steps 8, 26, 27, 31)
House Edge0.5704% of the initial bet (optimal play)From the RTP engine, not an API value; Duel's config scales a 0.1%–0.57% edge with stake (4.6)
RNG AlgorithmHMAC-SHA256 single-card drawOne draw per cursor, rejection sampling below MAX_FAIR = 4,294,967,248
Seed Formats

Every Blackjack bet uses three cryptographic inputs to generate the card stream.

4 columns
Seed TypeFormatExamplePurpose
Server Seed64-char hex (32 bytes)b6f2cbcd411eedbd…Casino-provided randomness
Client SeedAlphanumeric stringpf_Naa0pBEOuWmz6Player-contributed entropy
NonceInteger from 01One per hand within the active seed pair
The server seed is committed as server_seed_hashed, SHA-256 of the hex-decoded bytes, and revealed on rotation. The HMAC key is the hex-decoded bytes, not the UTF-8 text. Every card of a hand shares the seeds and the nonce; the cursor is appended to the message: clientSeed:nonce:cursor.
Cursor Map & Payout Math

Every card comes from its own cursor, appended to the HMAC message, so the card at cursor C is fixed by (serverSeed, clientSeed, nonce, C). The first four cursors are the deal; after that, cursors are used in order as the hand is played.

3 columns
CursorRoleNotes
0Player card 1Perfect Pairs and 21+3 input
1Dealer up-card21+3 input; an Ace brings the insurance offer
2Player card 2Perfect Pairs and 21+3 input
3Dealer hole cardCommitted at the deal, turned over at play-out; not a side-bet input
4 onwardCards drawn after the dealYour hits and double cards, then the dealer's draws. After a split: 4 = hand 1's second card, 5 = hand 2's, then hand 1, hand 2, dealer
amount_won is the total return, stake included: a $0.01 win returns $0.02. A doubled hand returns 4× the original stake on a win, 2× on a push and 0 on a loss. Side bets are independent of the main hand: you can win the main bet and lose both side bets, or the other way round.
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 the inputs that determine a result before the player bets
  • A source of randomness exists that the casino cannot predict or control
  • Anyone can verify the outcome after the fact
High-Level Overview8 sections▶

This section walks through how a Blackjack bet moves through the system end-to-end — from the server seed commitment, through the deal and player actions, to the post-rotation verification step that closes the loop.

Checklist Reference

Commit-Reveal

2 columns
CheckWhat it proves
Server seed committed before playIts hash is shown before you bet; your saved copy proves the timing
SHA-256 of revealed seed matches committed hashThe revealed seed is the one behind the commitment (a consistency check)
Hash identical across all bets in an epochAll bets within a seed pair share the same commitment

Seed System

2 columns
CheckWhat it proves
Nonces are sequential within an epochNo nonce repeated or reordered; gaps only where our capture script retried
Single client seed per epochClient seed cannot be silently rotated mid-epoch
Next-seed pre-committed before rotationThe forward chain fits together; its timing rests on the capture's records

RNG & Parity

2 columns
CheckWhat it proves
Every visible card recomputes from seeds + nonce + cursorCard stream is deterministic and verifiable
Independent verifier matches live API for every cursorNo hidden inputs to the RNG
Card sequence invariant across player actionsCards fixed when the hand is placed; actions only decide how many are drawn

Payout & RTP

2 columns
CheckWhat it proves
Main payouts match rule set: win 2×, BJ 2.5×, doubled-win 4×, push 1×Payout arithmetic matches published rules
Side-bet payouts match published multiplier tablePerfect Pairs and 21+3 returns exact on the 18-decimal grid
Theoretical RTP = 99.4296% from an independent engineHeld to an exact-rational oracle; RTP claim 99.43% PASS

Integrity

2 columns
CheckWhat it proves
Wrong client seed produces different cardsClient seed genuinely influences outcome
Bet size does not influence card streamPhase E $10 hands recompute like the $0.01 hands
No cherry-picking in seed selection (Pass 2)Test C finds no sign of seed pre-selection, at its stated power
High-Level Flow

A Blackjack round runs through six stages — from the casino committing to a server seed before you play, through the deal and player actions, to the post-rotation verification that anyone can run.

1. Commit — Server generates server seed, publishes SHA-256 hash as serverSeedHashed. Player sees only the hash.
2. Seed pair activated — The client seed is browser-generated or player-set. The nonce starts at 0. The next server seed is already committed.
3. Bet — You place the main bet and any side bets. Cards 0–3 (the deal) come from HMAC-SHA256 on the active seed pair, the nonce and the cursor.
4. Actions — You hit, stand, double or split. Each new card takes the next cursor. The dealer turns over the hole card and plays out under S17.
5. Rotate — On client-seed change or manual rotation, the active server seed is revealed. The next-committed seed becomes active.
6. Verify — Anyone with serverSeed, clientSeed, nonce, and the action sequence can recompute every visible card.

High-Level Flow — illustrated flow
Provably Fair Model

Blackjack is a commit-reveal provably fair game. The casino commits to a server seed by showing its SHA-256 hash before any hand is placed. When the seed is rotated, the casino reveals it. Anyone can then check two things: that the revealed seed hashes to the commitment, and that every card of every hand in that epoch recomputes from the seeds, the nonce and the cursor. The hash match shows the records are consistent; a copy of the hash you saved before betting shows the seed was fixed in advance.

Commit-Reveal Model

Blackjack uses a four-phase commit-reveal cycle. Each phase has a single, well-defined purpose, and every phase produces artefacts that can be verified after the fact.

Commit-Reveal Model — illustrated flow

Commit phase
Server generates a 32-byte random server seed, computes SHA-256(hex_bytes(serverSeed)), and publishes the hash as serverSeedHashed. The raw seed is kept secret. A next-seed hash is also pre-committed.

Bet phase
You play hands against the active seed pair. Each card is HMAC-SHA256(key = hexDecode(serverSeed), message = clientSeed:nonce:cursor), read in 4-byte chunks with rejection sampling and reduced modulo 52. The nonce rises by 1 per hand.

Reveal phase
Player (or system) rotates the seed pair — typically by changing the client seed. The previously-active server seed is now revealed in the API. The pre-committed next-seed hash becomes the active serverSeedHashed.

Verify phase
Anyone with the seeds, the nonce and the actions can recompute every card and check it against what the game showed. The revealed seed must hash to the commitment you saved before betting.

Player-Controlled Client Seed

The client seed is your input into the RNG. By default your browser generates it, and you can replace it at any time; a new one takes effect when you rotate the seed pair.

  • Browser-generated by default — 16 characters, drawn with rejection-sampled crypto.getRandomValues (E13)
  • Player-editable — you can type your own; the audit's Phase D used 10 player-set seeds and every hand recomputed under them
  • Changes the cards — a wrong client seed changes all 6,000 captured initial deals (Step 6)
  • Not known to the server at commit time — the next server seed is committed before you send your new client seed
Nonce Lifecycle

The nonce is a per-hand counter within the active seed pair. It starts at 0, rises by 1 per hand and resets only on rotation. Every card of a hand shares the nonce; the cursor tells the cards apart.

  • Starts at 0 for each new server seed
  • Rises by 1 per hand, not per action
  • Resets to 0 when you rotate the seed pair
  • Shared by every card of a hand — the cursor tells the cards apart
nonce lifecycle · Illustrative
// Per seed pair, nonce sequence://   hand 1 → nonce=0  (cursors 0..49 share nonce=0)//   hand 2 → nonce=1  (cursors 0..49 share nonce=1)//   hand 3 → nonce=2//   ...// On rotation://   serverSeed revealed, the committed next seed activated, nonce resets to 0
Determinism Guarantee

Given serverSeed, clientSeed, nonce, and cursor, the card at that cursor is fully determined — there is no randomness, no hidden input, and no dependence on bet amount, timestamp, or any other variable. The pipeline is:

blackjack pipeline · Canonical
// Inputs: serverSeed (hex), clientSeed (string), nonce (int), cursor (int 0..49) key      = Buffer.from(serverSeed, 'hex')      // hex-decoded bytes, NOT utf-8message  = `${clientSeed}:${nonce}:${cursor}`hash     = HMAC-SHA256(key, message) // Read 32-byte hash as 8 big-endian uint32 chunks; first chunk < MAX_FAIR acceptedMAX_FAIR = 52 * floor(2^32 / 52)              // 4,294,967,248 for chunk in chunks_of_4_bytes(hash):  value = uint32_be(chunk)  if value < MAX_FAIR:    cardIndex = value % 52    return CARDS[cardIndex]throw 'all 8 chunks rejected'                  // probability ≈ 2.4 × 10⁻⁶⁴ per card
Phase Map

The audit captured 6,000 bets across six phases, each designed to stress a specific property of the system.

4 columns
PhaseHandsStakePurpose
A3,300$0.01 main + $0.01 PP + $0.01 21+3Broad sampling under basic strategy
B1,000$0.01 main + $0.01 PP + $0.01 21+3Aggressive play: more cursors per hand
C500$0.01 main + $0.01 PP + $0.01 21+3Split / double priority: the split order and DAS
D500$0.01 main + $0.01 PP + $0.01 21+310 auditor client seeds, pfaudit_bj_seed00..09 (Step 15)
E200$10.00 main only (no side bets)Cards don't depend on stake (Step 9)
F500$0.01 main + $0.01 PP + $0.01 21+3Forced splits: more split rounds
All six phases use the same RNG. Our capture rotated the seed pair every 50 hands, so the 6,000 hands span 120 epochs and 33,194 cards, every one verified.
Technical Glossary8 categories▶

Terms and definitions used throughout this audit report, grouped by category.

Framework 1.1
2 columns
TermDefinition
Framework 1.1The 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 flagA flag caused by our capture, not by the casino — here, seven hands our capture script missed on retried requests, and insurance never taken, so its 2:1 payout is assumed. Disclosed and counted, and verdict-neutral.
RTP claim ruleRTP-CLAIM 1.2.0. Holds the audited RTP to the figure the casino states within ±0.1 pp; here 99.43%, from a Duel staff member's stated 0.57% edge. A house-side miss makes the verdict RTP FIGURE OVERSTATED (exit 5).
Base stake tierThe stakes the audit's guarantees apply to: the captured $0.01 and $10 main bets, which paid standard odds, and $0.01 side bets, which paid their full multipliers. By stake, each sits in the first tier of Duel's stake ladders; the main bet's first tier runs to $45,748.05.
Core Concepts
2 columns
TermDefinition
Provably FairA system where every game outcome can be independently verified from public cryptographic inputs, without trusting the operator.
Commit-RevealA two-phase protocol: a party publishes a hash of a secret before play (commit), then reveals the secret afterwards (reveal). A copy of the hash saved before play shows the secret was fixed in advance.
DeterminismA property where the same inputs always produce the same output. Blackjack is deterministic: (serverSeed, clientSeed, nonce, cursor) uniquely determines the card.
EpochThe hands played under one (serverSeed, clientSeed) pair, until the player rotates it. Our capture rotated every 50 hands.
Seed System
2 columns
TermDefinition
Server SeedA 32-byte random value generated by the casino. Represented as a 64-character hex string. Used as the HMAC key (hex-decoded, NOT utf-8).
Server Seed HashedSHA-256(hex_bytes(serverSeed)). The commitment published before play.
Client SeedA player-controlled alphanumeric string, browser-generated by default. Part of the HMAC message.
NonceA per-hand counter within the active seed pair. Starts at 0, rises by 1 per hand, is shared by every card of the hand, and resets on rotation.
CursorThe card's place in the hand, appended to the HMAC message. Cursors 0–3 are the deal (P1, dealer up, P2, hole); later cursors are used in order as the hand is played, in the declared split order after a split.
Seed PairThe combination of one server seed and one client seed. A seed pair defines an epoch.
Next Server Seed HashA pre-commitment to the server seed that will become active after the current one is rotated. Locks the future chain in advance.
Cryptographic Functions
2 columns
TermDefinition
SHA-256A 256-bit cryptographic hash function. Used here for server seed commitment: SHA-256(hex_bytes(serverSeed)) = serverSeedHashed.
HMAC-SHA256Hash-based message authentication code built on SHA-256. Takes a key and a message, returns a 256-bit (32-byte) digest. Used here for per-cursor card draw.
Single-Card DrawThe Blackjack RNG primitive: getCard(serverSeed, clientSeed, nonce, cursor) runs HMAC-SHA256 once per cursor and returns one card. Each cursor is independent (infinite-deck model).
Rejection SamplingA technique for bias-free uniform sampling. A 4-byte chunk is accepted only if it falls below MAX_FAIR = 52 × ⌊2³² / 52⌋ = 4,294,967,248. Guarantees every card has probability exactly 1/52.
MAX_FAIRThe rejection threshold: 4,294,967,248 = 52 × 82,595,524. Each 4-byte value at or above it is skipped, with probability 48 / 2³² ≈ 1.118 × 10⁻⁸; all eight in one digest, about 2.4 × 10⁻⁶⁴. Never reached in the capture.
Verification Terms
2 columns
TermDefinition
ParityAgreement between the live game and an independent recomputation from the same inputs: here, every card at its declared cursor, every result and every payout.
RecomputationRunning the audit's standalone RNG implementation on captured seed triples and comparing every visible card to the live API response.
Anti-Circularity ProofProof that the RTP derives from first principles, not the casino's figures. The engine reads only the rules and the rank probabilities, and an exact-rational oracle written separately gives the same figure.
Cherry-Pick Detection (Pass 2)A test for selective seed use. Pass 2 replays all 120 revealed seeds for 10,000 nonces and ranks the 50 hands the capture played on each against that seed's other 199 windows (Test C): 7 / 120 flag, against a fail bound of 17.75.
Optimal-Play RTP EngineThe recursive infinite-deck engine in src/optimal-play.ts. For every starting (P1, P2, up-card) combination it takes the action with the highest expected value under Duel's rules: 99.4296% per initial bet.
Game Mechanics
2 columns
TermDefinition
S17The dealer stands on all 17s, including soft 17 (an Ace counted as 11): 75 / 75 soft 17s stood in the capture (Step 19).
DAS"Double after split": the player may double on a split hand. Allowed in Duel's rules: 109 split rounds doubled after the split (Step 23).
Soft HandA hand containing an Ace counted as 11 (e.g., A-6 = 17 soft). If hitting would bust, the Ace counts as 1 instead (becomes a hard hand).
Natural BlackjackA two-card 21 — Ace + 10-value (10, J, Q, K) on the deal. Pays 3:2 (return = 2.5× stake) unless the dealer also has blackjack (push).
InsuranceAn optional side wager offered when the dealer's up-card is an Ace, up to half the main bet, stated to pay 2:1 if the dealer has a natural. The offer is verified (Step 25); the payout was never funded in the capture, so it is assumed.
Perfect PairsA side bet on your two cards (cursors 0, 2). Returns 27× for same rank and suit, 11× for same rank and colour, 7× for same rank and other colour. At that paytable the edge is exactly 0.
21+3A side bet on your two cards and the dealer's up-card (cursors 0, 2, 1). Returns 121.2307692× (suited trips), 53× (straight flush), 32× (three of a kind), 12× (straight), 5× (flush). At that paytable the edge is 16 / 1,406,080,000,000, from the rounding of the suited-trips multiplier.
Audit Terms
2 columns
TermDefinition
Fairness Integrity (FI) MatrixOur standard test matrix, covering nonce integrity, seed commitment, outcome determinism, player isolation, payout integrity and game state. For Blackjack: 17 tests, 8 of them API probes kept in our private archive. Documented in S5.
FLAGA disclosed finding that does not block certification. A capture flag is one caused by our capture, not the casino.
Hard FailA severity level for findings that invalidate the fairness guarantee. Any single hard fail blocks certification until remediated. Zero hard fails in this audit.
Bonferroni CorrectionA multiple-comparison adjustment: N tests at significance α use α/N each. Pass 1 tests 10 streams at family-wise 0.01, so 0.001 per stream, a two-sided critical z of 3.2905.
Fisher's Combined p-valueCombines independent p-values: T = −2 × Σ ln(pᵢ) follows χ²(2K). Pass 1 combines its 10 per-stream p-values: p = 0.686432, no concentration in either tail.
Point-in-Time AuditAn audit verdict that applies to the code and configuration in force at the audit date. Subsequent changes are outside scope unless re-certified.
Data Formats
2 columns
TermDefinition
blackjack-dataset-6000hands.jsonThe capture: 6,000 hands across six phases (A 3,300, B 1,000, C 500, D 500, E 200, F 500), 120 epochs, 33,194 cards. SHA-256 pinned in S1 and S7.
verification-results.jsonOutput of the 38-step verification suite: every step result, profile coverage and the verdict.
simulation-results.jsonSimulation output: Pass 1 (10M hands on pinned seeds), Pass 2 (120 casino seeds × 10,000 nonces) and the RTP engine's block.
rtp-convergence.htmlSelf-contained RTP convergence chart for Pass 1: the mean running RTP of the 10 streams, inline SVG, no external files.
01

Seed, Nonce & Determinism

Can the casino change your outcome after you bet?

Every Blackjack hand on Duel.com comes from three inputs, server seed, client seed and nonce, plus each card's place in the hand. Duel commits to the server seed by showing its SHA-256 hash before you bet, and reveals the seed when you rotate. Your stake and your actions are not inputs, so every card is fixed before the deal animation plays. A hash match shows the records are consistent; the proof of timing is a copy of the hash you saved before betting.

Commit-Reveal Consistency

120 / 120revealed seeds match

What we verified

  • Every revealed server seed hashes to its commitment (120 / 120)
  • The 121 seed records fit together: 120 forward links, each epoch bound to the rotation that opened it
  • That each commitment was shown before its bets rests on the capture's records
  • Nonces: 113 / 120 epochs complete as captured, no repeats, none out of order; 7 hands missed by our capture script
  • Identical inputs always produce the same card (6,000 / 6,000 hands, 33,194 cards)
  • Your client seed is a genuine input: a wrong seed changes all 6,000 initial deals

What this means for you

  • Once a server seed is committed, the casino can't swap it for another
  • Every card is fixed by the seeds, the nonce and its cursor before the deal animation plays
  • Your hit, stand, double and split choices decide how many cards are drawn, not which
  • Save the hashed server seed before you bet: your saved copy is what proves the timing
  • Any hand can be recomputed after you rotate your seed
120 / 120revealed seeds match
  • Every revealed server seed hashes to its commitment (120 / 120)
  • The 121 seed records fit together: 120 forward links, each epoch bound to the rotation that opened it
  • That each commitment was shown before its bets rests on the capture's records
  • Nonces: 113 / 120 epochs complete as captured, no repeats, none out of order; 7 hands missed by our capture script
  • Identical inputs always produce the same card (6,000 / 6,000 hands, 33,194 cards)
  • Your client seed is a genuine input: a wrong seed changes all 6,000 initial deals
HMAC-SHA256 Pipeline — Seed inputs through per-cursor card draw to the 50-card stream — illustrated flow
CheckResultEvidence
Seed hash integrityPass120 / 120 revealed seeds hash to their commitments; every bet-bearing commitment has its seed (Step 1)
Commitment linkagePass120 / 120 forward links checked from the raw fields (Step 2). A consistency check: the timing rests on the capture's records, and the first epoch has no link from before the capture
Hash consistency within epochPassEpochs taken from transaction order and the rotation timeline, not from the hash under test: 120 / 120 epochs, 6,000 / 6,000 bets bound to their rotation record (Step 3)
Nonce sequencingCapture flagEvery epoch starts at 0, no nonce served twice, none out of order. 7 nonces missed on retried requests: limited by our capture script, not a Duel issue (Step 4)
Deterministic outputPass6,000 / 6,000 hands, 33,194 cards recomputed from (serverSeed, clientSeed, nonce, cursor) at their declared cursors (Step 5)
Client seed participationPassA wrong and an empty client seed each change all 6,000 initial deals, against 0.0008 expected by chance (Step 6). The 500 Phase D hands recompute under 10 player-set seeds (Step 15)
Client seed originPassDuel's default seed is browser-generated with crypto.getRandomValues, and players can set their own (E12, E13). The capture's own seeds are disclosed in 1.4
Seed hash integrityPass
120 / 120 revealed seeds hash to their commitments; every bet-bearing commitment has its seed (Step 1)
Commitment linkagePass
120 / 120 forward links checked from the raw fields (Step 2). A consistency check: the timing rests on the capture's records, and the first epoch has no link from before the capture
Hash consistency within epochPass
Epochs taken from transaction order and the rotation timeline, not from the hash under test: 120 / 120 epochs, 6,000 / 6,000 bets bound to their rotation record (Step 3)
Nonce sequencingCapture flag
Every epoch starts at 0, no nonce served twice, none out of order. 7 nonces missed on retried requests: limited by our capture script, not a Duel issue (Step 4)
Deterministic outputPass
6,000 / 6,000 hands, 33,194 cards recomputed from (serverSeed, clientSeed, nonce, cursor) at their declared cursors (Step 5)
Client seed participationPass
A wrong and an empty client seed each change all 6,000 initial deals, against 0.0008 expected by chance (Step 6). The 500 Phase D hands recompute under 10 player-set seeds (Step 15)
Client seed originPass
Duel's default seed is browser-generated with crypto.getRandomValues, and players can set their own (E12, E13). The capture's own seeds are disclosed in 1.4
✓  Commit-reveal consistent

All 120 revealed seeds hash to their commitments and the 121 seed records fit together. Every card recomputes from (serverSeed, clientSeed, nonce, cursor). When each commitment was shown rests on the capture's records. Step 4 is a capture flag: seven hands 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 bet comes from a copy of the hash you saved before betting.

Server Seed Commitment — illustrated flow
src/rng.ts · hashServerSeed · Verified
// §1.2: commitment = lowercase hex of SHA-256 over the 32 decoded seed bytes (not the ASCII text).export function hashServerSeed(serverSeed: string): string {  return createHash('sha256').update(decodeServerSeed(serverSeed)).digest('hex');}
Result: 120 / 120 revealed seeds hash to their commitments. 0 mismatches.

Real epoch verified:

blackjack-dataset-6000hands.json · seeds[0] · Verified
// data/blackjack-dataset-6000hands.json · seeds[0], the rotation that opened the first epoch{  "at": "2026-04-30T21:31:23.099Z",  "context": "rotate-phase-A",  "phase": "A",  "seed": {    "clientSeed": "pf_Naa0pBEOuWmz6",    "serverSeedHashed": "94c218c91df8997d4e7b1280687e90a3573c98739bd9220cd2fdd595699ef34f",    "nextServerSeedHash": "27674345267704331cc6f6f2ee91e94ca47d2d1076774a75b2191a7ec9b2fddd",    "serverSeed": "b6f2cbcd411eedbd53587902410f17f43e962f2e374e97ccbec24088debd0556"   // attached after the capture, from Duel's transaction records  }} // SHA-256(hexDecode(serverSeed)) = 94c218c91df8997d4e7b1280687e90a3573c98739bd9220cd2fdd595699ef34f  ✅// nextServerSeedHash = seeds[1].serverSeedHashed  ✅
1.2Commitment Linkage (Next-Seed Promotion)

At every rotation Duel returns the hash of the seed it will activate next (next_server_seed_hash), stored in each seed record as nextServerSeedHash. Step 2 walks the chain from the raw fields: each record's nextServerSeedHash must equal the next record's serverSeedHashed, 120 links in all. The links show the 121 records fit one order, not when each hash was shown. That rests on the capture's records: for epochs 2–120 the commitment had already appeared as the previous rotation's next hash at least 106 s before the epoch's first bet (median 181 s). The first epoch has no earlier record: its rotation and first bet fall in the same second.

tests/steps/commitment.ts · Step 2: Commitment Linkage · Verified
let linked = 0, broken = 0;for (let i = 0; i < ctx.seeds.length - 1; i++) {  const curr = ctx.seeds[i].seed;  const next = ctx.seeds[i + 1].seed;  if (curr.nextServerSeedHash === next.serverSeedHashed) linked++;  else broken++;}
Result: 120 / 120 forward links match, 0 broken. The first epoch's rotation record is no later than its first bet; it was taken inside the capture, so it is not a pre-capture link.
1.3Hash Consistency Within Epoch

The capture holds 121 seed records: 120 epochs of exactly 50 bets each (Step 12), plus the forward commitment left after the final rotation, which carries no bets and is not revealed.

Step 3 does not group bets by the hash it is testing. It orders all 6,000 bets by Duel's transaction id, cuts them into 50-bet windows, and requires window k to carry record k's commitment, client seed and phase, and to settle between records k and k+1. A mid-epoch seed change, or a bet moved into another epoch, would break a window.

tests/steps/commitment.ts · Step 3: Hash Consistency Within Epoch · Verified
for (let k = 0; k < windows && k < ctx.seeds.length; k++) {  const rec = ctx.seeds[k];  const lo = Math.floor(tsec(rec.at));  const hi = k + 1 < ctx.seeds.length ? tsec(ctx.seeds[k + 1].at) : Infinity;  let windowOk = true;  for (let j = 0; j < EXPECTED_EPOCH_SIZE; j++) {    const b = ordered[k * EXPECTED_EPOCH_SIZE + j];    const bound = b.server_seed_hashed === rec.seed.serverSeedHashed      && b.client_seed === rec.seed.clientSeed && b.phase === rec.phase;    if (bound) betsBound++;    else {      windowOk = false;      if (problems.length < 5) problems.push(`bet ${b.id} (window ${k}) carries ${b.server_seed_hashed.substring(0, 16)}/${b.client_seed}/${b.phase}, rotation record seeds[${k}] is ${rec.seed.serverSeedHashed.substring(0, 16)}/${rec.seed.clientSeed}/${rec.phase}`);    }    const t = tsec(b.deal?.created_at);    if (Number.isFinite(t) && t >= lo && t <= hi) timelineOk++;    else {      windowOk = false;      if (problems.length < 5) problems.push(`bet ${b.id} settled ${b.deal?.created_at}, outside seeds[${k}] window [${rec.at}, ${ctx.seeds[k + 1]?.at ?? '∞'}]`);    }  }  if (windowOk) windowsBound++;}
Result: 120 / 120 epochs bound to their rotation record; 6,000 / 6,000 bets carry their record's commitment, client seed and phase and settle inside its window.
1.4Client Seed Origin & Control

Duel generates the default client seed in your browser: 16 characters from a 63-character alphabet, drawn with rejection-sampled crypto.getRandomValues, and sent only on rotation (E13). You can replace it with your own at any time (E12). The client seed is in every HMAC message, so changing it changes every card.

The capture used its own seeds. Phases A, B, C, E and F took 110 pf_ seeds from the capture script's Math.random(). Phase D used 10 fixed auditor seeds, pfaudit_bj_seed00 to pfaudit_bj_seed09. These are choices on our side; they don't change what Duel's server does with a seed.

  • Example client seeds from the dataset:
  • pf_vIBZ6rgPyYvq7 — 50 bets (Phase A)
  • pf_Naa0pBEOuWmz6 — 50 bets (Phase A)
  • pf_JUnsd3HAFJxzz — 50 bets (Phase A)
  • pf_hc9GvK8F3fFn7 — 50 bets (Phase A)
  • pfaudit_bj_seed00 — 50 bets (Phase D; deterministic auditor seed)
Result: 120 distinct client seeds, one per epoch (110 pf_ seeds and 10 auditor seeds). All 500 Phase D hands recompute under the auditor seeds, 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, not per action: every card in a hand shares the nonce, and the cursor tells them apart. Duel reveals a server seed only when you rotate. Our capture rotated every 50 hands; that 50-hand epoch is our schedule, not Duel's.

Step 4 fails an epoch that does not start at 0, a nonce served twice, or nonces that do not rise with Duel's transaction order. In seven epochs our capture script retried a request and missed one hand each; each gap sits across a settlement-clock pause of 14–40 s, where gap-free pairs are 3 s apart at the median. The revealed seed fixes the cards at each missed nonce, but the served hand was not captured, so those seven hands are not verified. Limited by our capture script, not a Duel issue.

Nonce Incrementation — illustrated flow
4 columns
Epoch (commitment)Missing noncePhaseClock gap
d1ec528647780f2f2A16 s
34cdf0e1b927a69735A31 s
c83531db458a4e7411A40 s
45ee24c75397834b15A15 s
981d7c37fccbba8937A14 s
86525716901d34727B15 s
004ea5229361e9bc24B16 s
tests/steps/commitment.ts · Step 4: Nonce Audit (excerpt) · Verified
const sorted = [...nonces].sort((a, b) => a - b);if (sorted[0] !== NONCE_BASE) hardFailures.push(`${tag}: first nonce ${sorted[0]} (declared base ${NONCE_BASE})`);const uniq = new Set(nonces);if (uniq.size !== nonces.length) {  duplicates += nonces.length - uniq.size;  hardFailures.push(`${tag}: ${nonces.length - uniq.size} nonce(s) served more than once`);}for (let i = 1; i < nonces.length; i++) {  if (nonces[i] <= nonces[i - 1]) { hardFailures.push(`${tag}: nonce ${nonces[i]} settled after nonce ${nonces[i - 1]} (transaction order)`); break; }}
Capture flag: 120 / 120 epochs start at 0, 0 duplicates, 0 out of order; 113 complete as captured. The seven gaps match the capture-retry register in src/loader.ts; a gap outside it would be a hard fail. Disclosed, verdict-neutral.
1.6Deterministic Mapping

Each card is fully deterministic: the same server seed, client seed, nonce and cursor always give the same card. 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:cursor. The 32-byte digest is read as eight big-endian 4-byte numbers; the first one below MAX_FAIR = 4,294,967,248 (52 × 82,595,524) picks CARDS[value % 52], where CARDS runs 2D 2H 2S 2C 3D … AC. Values at or above the limit are skipped, so every card has probability exactly 1/52.

Deterministic Mapping — illustrated flow
src/rng.ts · drawIndex + getCardWithKey · Verified
function drawIndex(hash: Buffer): { index: number | null; rejected: number } {  if (!Buffer.isBuffer(hash) || hash.length < CHUNKS_PER_HASH * 4) {    throw new Error(`hash must be a Buffer of at least ${CHUNKS_PER_HASH * 4} bytes`);  }  let rejected = 0;  for (let c = 0; c < CHUNKS_PER_HASH; c++) {    const v = hash.readUInt32BE(c * 4);    if (v < MAX_FAIR) return { index: v % DECK_RANGE, rejected };    rejected++;  }  return { index: null, rejected };} export function getCardWithKey(keyBuffer: Buffer, clientSeed: string, nonce: number, cursor: number): string {  return generateCardFromHash(hmacSHA256WithKey(keyBuffer, cardMessage(clientSeed, nonce, cursor)));}
Result: 6,000 / 6,000 hands recompute, 33,194 cards, every one from the first 4-byte value. Duel's own Verify-tab code, run unmodified as a cross-check, gives the same card on all 300,000 cursors 0–49 of every round. Outcomes derive only from (serverSeed, clientSeed, nonce, cursor); no external input.

Worked Example — Real Bet Verified:

blackjack-dataset-6000hands.json · bet 13420172 · Verified
// data/blackjack-dataset-6000hands.json · bet 13420172 (Phase A, nonce 0)"server_seed_hashed": "5a171081ba5a98936cbc1d48655d69ded386ab1bab0f6c5f2069e24c1753d19b","client_seed": "pf_vIBZ6rgPyYvq7","nonce": 0,// deal: player JC AH (cursors 0, 2), dealer 2D (cursor 1) with the hole revealed at the deal on a natural// final: dealer 2D 10S, result "blackjack", amount_won "0.025" on a $0.01 main bet// side bets: Perfect Pairs and 21+3, $0.01 each, both lost// revealed server seed: 5d75992d78294438db4971c53c70d5c38959797ea2768ea0c57e11edb14ce700

Verification — Full HMAC trace, all 4 cursors:

Card trace · bet 13420172, cursors 0–3 · Verified
// getCard(serverSeed = '5d75992d78294438db4971c53c70d5c38959797ea2768ea0c57e11edb14ce700',//         clientSeed = 'pf_vIBZ6rgPyYvq7', nonce = 0, cursor = 0..3)//// Each cursor: HMAC-SHA256(hexDecode(serverSeed), `${clientSeed}:${nonce}:${cursor}`), read as eight// big-endian uint32 chunks. The first chunk below MAX_FAIR (4,294,967,248) is accepted: CARDS[value % 52].//// ─── CURSOR 0 (Player card 1) ─────────────────────────────────────// message = 'pf_vIBZ6rgPyYvq7:0:0'// HMAC    = 5cd3ac7796357342b03cca3e5df5e5fa3279edb5bab80a40d386c1fc0b7fb9f2//   chunk[0] = 0x5cd3ac77 = 1557376119  →  1557376119 % 52 = 39 →  JC  ✅ accepted//   chunk[1] = 0x96357342 = 2520085314  (not read)//   chunk[2] = 0xb03cca3e = 2956773950  (not read)//   chunk[3] = 0x5df5e5fa = 1576396282  (not read)//   chunk[4] = 0x3279edb5 =  846851509  (not read)//   chunk[5] = 0xbab80a40 = 3132623424  (not read)//   chunk[6] = 0xd386c1fc = 3548824060  (not read)//   chunk[7] = 0x0b7fb9f2 =  192920050  (not read)//// ─── CURSOR 1 (Dealer up-card) ────────────────────────────────────// message = 'pf_vIBZ6rgPyYvq7:0:1'// HMAC    = 0ce314184168d199266e0cc6794c75f3c30a473bf8ba500316dbf3582b3f1c2b//   chunk[0] = 0x0ce31418 =  216208408  →  216208408 % 52 = 0  →  2D  ✅ accepted//   chunk[1] = 0x4168d199 = 1097388441  (not read)//   chunk[2] = 0x266e0cc6 =  644746438  (not read)//   chunk[3] = 0x794c75f3 = 2035054067  (not read)//   chunk[4] = 0xc30a473b = 3272230715  (not read)//   chunk[5] = 0xf8ba5003 = 4172959747  (not read)//   chunk[6] = 0x16dbf358 =  383513432  (not read)//   chunk[7] = 0x2b3f1c2b =  725556267  (not read)//// ─── CURSOR 2 (Player card 2) ─────────────────────────────────────// message = 'pf_vIBZ6rgPyYvq7:0:2'// HMAC    = 6af06ed1beb6b0a1251ddd35d14620bf7986cadeaf7fc50b0c2559e4981202a6//   chunk[0] = 0x6af06ed1 = 1794141905  →  1794141905 % 52 = 49 →  AH  ✅ accepted//   chunk[1] = 0xbeb6b0a1 = 3199643809  (not read)//   chunk[2] = 0x251ddd35 =  622714165  (not read)//   chunk[3] = 0xd14620bf = 3511034047  (not read)//   chunk[4] = 0x7986cade = 2038876894  (not read)//   chunk[5] = 0xaf7fc50b = 2944386315  (not read)//   chunk[6] = 0x0c2559e4 =  203774436  (not read)//   chunk[7] = 0x981202a6 = 2551317158  (not read)//// ─── CURSOR 3 (Dealer hole card) ──────────────────────────────────// message = 'pf_vIBZ6rgPyYvq7:0:3'// HMAC    = 91da572605a294d0507d8a12328faed6a385b5057e179d8f30c4fff7ba51b7e7//   chunk[0] = 0x91da5726 = 2447005478  →  2447005478 % 52 = 34 →  10S  ✅ accepted//   chunk[1] = 0x05a294d0 =   94541008  (not read)//   chunk[2] = 0x507d8a12 = 1350404626  (not read)//   chunk[3] = 0x328faed6 =  848277206  (not read)//   chunk[4] = 0xa385b505 = 2743448837  (not read)//   chunk[5] = 0x7e179d8f = 2115476879  (not read)//   chunk[6] = 0x30c4fff7 =  818216951  (not read)//   chunk[7] = 0xba51b7e7 = 3125917671  (not read)//// Player JC AH = 21, a natural; dealer 2D 10S = 12. Natural pays 2.5 × $0.01 = $0.025  ✅
1.7Card-Stream Architecture & Determinism at Deal Time

Blackjack at Duel uses one linear cursor stream per hand: no shuffle, no deck array. Cursor 0 is your first card, 1 the dealer's up-card, 2 your second card and 3 the dealer's hole card; then your draws in the order taken; then the dealer's draws. After a split, cursor 4 is the second card of the hand built on your first card and cursor 5 the second card of the other hand; then the first hand plays out, then the second, then the dealer. Every card is a function of its cursor alone, so the whole stream is fixed when the hand is placed: your decisions only decide how many cursors are used. The hole card at cursor 3 is committed at the deal; the recomputed cursor 3 equals the card the dealer later turns over.

Card-Stream Architecture & Determinism at Deal Time — illustrated flow
src/rng.ts · DEAL_ORDER · Verified
// §2 Step 4: cursor k of each card in the initial deal; later cards start at 4.export const DEAL_ORDER = Object.freeze({  PLAYER_1: 0,  DEALER_UP: 1,  PLAYER_2: 2,  DEALER_HOLE: 3,  FIRST_ACTION: 4,} as const);
Result: Steps 5 and 22 hold every split round to that order card for card: 269 / 269 split rounds, 2,259 cursors, strict. All 6,000 rounds also replay from the seed and the recorded actions alone (Step 36). The longest captured hands used 13 cards, cursors 0–12, of the 50 available.

Cursor order after a split:

src/round.ts · declaredOrder (split rounds) · Verified
if (s.hands.length === 2) {  const [h1, h2] = [s.hands[0].cards, s.hands[1].cards];  if (h1[0] !== p1 || h2[0] !== p2) return { error: `split hands start ${h1[0]}/${h2[0]}, dealt ${p1}/${p2}` };  if (h1.length < 2 || h2.length < 2) return { error: `split hand with ${h1.length}/${h2.length} cards` };  return { seq: [...head, h1[1], h2[1], ...h1.slice(2), ...h2.slice(2), ...dealerDraws] };}
1.8Client Seed Influence

The client seed is inside the HMAC message, clientSeed:nonce:cursor, so changing it changes every card. Step 6 re-derives the initial deal (cursors 0–3) of all 6,000 hands under a deliberately wrong client seed (wrong_seed_value_12345) and under an empty one. Under a fair draw a substitute seed reproduces a four-card deal with probability 52⁻⁴, about 0.0008 deals in 6,000; the step fails above 2 for either. A draw that ignored the client seed would leave all 6,000 unchanged. Separately, the 500 Phase D hands used 10 auditor-set seeds and all recompute (Step 15).

tests/steps/determinism.ts · Step 6: Client Seed Influence · Verified
for (const bet of ctx.bets) {  const seed = ctx.seedMap.get(bet.server_seed_hashed);  if (!seed) { untested++; continue; }  tested++;  const served = [0, 1, 2, 3].map(c => getCard(seed, bet.client_seed, bet.nonce, c)).join();  SUBSTITUTES.forEach((cs, k) => {    const sub = [0, 1, 2, 3].map(c => getCard(seed, cs, bet.nonce, c)).join();    if (sub === served) identical[k]++;  });}
Result: 6,000 / 6,000 initial deals change under the wrong client seed and 6,000 / 6,000 under the empty one; 0 identical. Phase D: 500 / 500 recompute.
Technical Evidence & Verification5 sections
1.9Evidence Coverage Summary6 checks
3 columns
Verification AreaCoverageResult
Seed hash integrity (Step 1)120 / 120 revealed seeds; the forward commitment after the final rotation carries no betsPass
Commitment linkage (Step 2)120 / 120 forward links; first epoch anchored inside the capturePass
Hash consistency (Step 3)120 epochs from transaction order and the rotation timeline; 6,000 / 6,000 bets boundPass
Nonce audit (Step 4)113 / 120 complete as captured; 7 capture-retry gaps (limited by our capture script)Capture flag
Card recomputation (Step 5)6,000 / 6,000 hands, 33,194 cards; 269 split rounds in the declared orderPass
Client seed influence (Step 6)6,000 / 6,000 deals change under a wrong and an empty seedPass
1.10Code References8 source files
2 columns
FilePurpose
tests/verify.ts38 scored steps (Steps 1–6 cover S1) and the reproduction gate
tests/steps/commitment.tsSteps 1–4: commit-reveal and nonce checks
tests/steps/determinism.tsSteps 5–6: card recomputation and client seed influence
src/rng.tsHMAC-SHA256 single-card draw with rejection sampling, written from docs/ALGORITHM.md
src/round.tsThe declared draw order, the round replay and the settlement from the cards
docs/ALGORITHM.mdThe written specification the card code was built from
src/loader.tsDataset loading, hash check, the capture plan and the capture-retry register
capture/capture.reference.jsReference record of the capture script
1.11Datasets UsedSource artifacts
Primary: data/blackjack-dataset-6000hands.json
2 columns
PropertyValue
SourceLive Blackjack hands on Duel.com, 30 April – 1 May 2026
Total Records6,000 hands across 120 epochs (121 seed records)
SHA-25655d4b4b1850856c8a3ecf6e59021f1f80bb3d8053376c42929e58b6733b8cae4
Pre-flight checktests/verify.ts stops before any step runs if the file's SHA-256 differs from EXPECTED_HASH in src/loader.ts

Fields used: serverSeed, serverSeedHashed, nextServerSeedHash, clientSeed, at and phase on the seed records; server_seed_hashed, client_seed, nonce, created_at and the dealt cards on each bet. The plaintext server seeds are not capture output: they were attached after the capture from Duel's transaction records, and each one is checked against its commitment.

1.12Verified Invariants8 invariants
2 columns
InvariantResult
SHA-256(hexDecode(serverSeed)) = serverSeedHashed for all 120 revealed seedsPass
Forward commitment chain consistent over all 120 linksPass
Each 50-bet window carries its rotation record's commitment, client seed and phase (120 / 120)Pass
Every epoch starts at nonce 0; no nonce served twice or out of transaction orderPass
Nonce gaps only where our capture script retried a request (7)Capture flag
Every card recomputes at its declared cursor, split rounds in the declared order (33,194 cards)Pass
A wrong or empty client seed changes all 6,000 initial dealsPass
Duel's default client seed is browser-generated (E13)Pass
1.13Reproduction InstructionsRun locally

Clone the repository at the release tag, install, and run the verifier:

reproduce-s1.sh · 4 lines · Verified
git clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjack && git checkout v1.2.1npm cinpm run verify
Expected 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 — Card Recomputation (declared draw order)
[PASS] Step 6 — Client Seed Influence
02

RNG & 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 33,194 cards in the 6,000 captured hands, and Duel's own Verify-tab code, run unmodified, agrees as a cross-check. Each card is one HMAC-SHA256 draw with rejection sampling, so all 52 cards are exactly equally likely, every time.

Cryptographic Randomness Verification

6,000 / 6,000hands verified

What we verified

  • Our HMAC-SHA256 implementation, written from the specification, reproduces every card (33,194 / 33,194)
  • Only disclosed inputs affect outcomes: no timestamps, no server-side state, no hidden entropy
  • Rejection sampling below MAX_FAIR gives every card exactly a 1/52 chance on every draw
  • 10 million simulated hands are consistent with the theoretical RTP
  • An infinite deck, as stated: within the four deal cards, repeats match the with-replacement expectation (670 against 668.2)
  • The simulation finds no sign of serial dependence in any of its 10 streams
  • A wrong client seed changes all 6,000 initial deals

What this means for you

  • Each card is drawn fairly and can't be skewed
  • All 52 cards are equally likely on every draw, and a card can repeat within a hand
  • No hidden input decides the cards: once the seeds are committed, the cards follow from them alone
  • Past hands don't affect future ones
  • The cards depend only on seeds you can check
6,000 / 6,000hands verified
  • Our HMAC-SHA256 implementation, written from the specification, reproduces every card (33,194 / 33,194)
  • Only disclosed inputs affect outcomes: no timestamps, no server-side state, no hidden entropy
  • Rejection sampling below MAX_FAIR gives every card exactly a 1/52 chance on every draw
  • 10 million simulated hands are consistent with the theoretical RTP
  • An infinite deck, as stated: within the four deal cards, repeats match the with-replacement expectation (670 against 668.2)
  • The simulation finds no sign of serial dependence in any of its 10 streams
  • A wrong client seed changes all 6,000 initial deals
RNG Pipeline — HMAC-SHA256 → 8× uint32 chunks → rejection sampling → modulo 52 → CARDS lookup — illustrated flow
CheckResultEvidence
RNG derived only from disclosed inputsPassHMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:cursor); no other input (Step 5)
Entropy purityPassNo timestamps, external APIs, Math.random or server-side state in the draw
Algorithm independently implementedPasssrc/rng.ts, written from the specification without Duel's code, reproduces all 6,000 hands (33,194 cards); Duel's Verify-tab code agrees as a cross-check (Step 38)
Modulo biasPassRejection sampling at MAX_FAIR = 4,294,967,248 = 52 × 82,595,524: bias exactly 0 (Step 35)
Key encoding verifiedPassThe server seed is hex-decoded to bytes, not read as UTF-8; the recomputation of every hand depends on it
Simulated RTPPass10M hands: 99.4670%, consistent with the theoretical 99.4296%; Fisher's p = 0.686432 over 10 streams (Step 17)
Infinite-deck modelPass670 / 6,000 deals repeat a card within the first four cursors against 668.2 ± 24.4 expected (z = 0.08); a single finite deck gives 0 (Step 29)
Serial independencePass0 / 10 streams flagged at the Bonferroni-corrected level (lag-1 and runs, α = 0.001 per stream) (Step 17)
Client seed influencePassA wrong and an empty client seed each change all 6,000 initial deals (Step 6)
RNG derived only from disclosed inputsPass
HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:cursor); no other input (Step 5)
Entropy purityPass
No timestamps, external APIs, Math.random or server-side state in the draw
Algorithm independently implementedPass
src/rng.ts, written from the specification without Duel's code, reproduces all 6,000 hands (33,194 cards); Duel's Verify-tab code agrees as a cross-check (Step 38)
Modulo biasPass
Rejection sampling at MAX_FAIR = 4,294,967,248 = 52 × 82,595,524: bias exactly 0 (Step 35)
Key encoding verifiedPass
The server seed is hex-decoded to bytes, not read as UTF-8; the recomputation of every hand depends on it
Simulated RTPPass
10M hands: 99.4670%, consistent with the theoretical 99.4296%; Fisher's p = 0.686432 over 10 streams (Step 17)
Infinite-deck modelPass
670 / 6,000 deals repeat a card within the first four cursors against 668.2 ± 24.4 expected (z = 0.08); a single finite deck gives 0 (Step 29)
Serial independencePass
0 / 10 streams flagged at the Bonferroni-corrected level (lag-1 and runs, α = 0.001 per stream) (Step 17)
Client seed influencePass
A wrong and an empty client seed each change all 6,000 initial deals (Step 6)
✓  Unbiased and Cryptographically Sound

The Blackjack RNG uses only the disclosed inputs and gives every card exactly a 1/52 chance. 10 million simulated hands are consistent with the theoretical RTP and show no sign of serial dependence. The deck behaves as infinite, as Duel states, and the client seed is a genuine input.

How It Works — RNG & Entropy Model8 sections
2.1RNG Function Implementation

Each card is a single HMAC-SHA256 call. The server seed is hex-decoded to 32 raw bytes for the HMAC key; the message is clientSeed:nonce:cursor, where cursor is the card's place in the hand (0 = your first card, 1 = the dealer's up-card, 2 = your second card, 3 = the hole card, 4 onward = the cards drawn after the deal). The 32-byte output is read as eight big-endian 4-byte numbers, and the first one below the MAX_FAIR ceiling is taken modulo 52 to index the 52-card array. No deck state, no shuffle: each card comes from its own (serverSeed, clientSeed, nonce, cursor). src/rng.ts was built from the written specification by an implementer who never opened Duel's code.

2 columns
ComponentDetail
Hash functionHMAC-SHA256
KeyBuffer.from(serverSeed, 'hex'): 32 bytes
MessageclientSeed:nonce:cursor
Extraction8 × 4-byte chunks, read big-endian as uint32
Rejectionvalue < MAX_FAIR, the largest multiple of 52 below 2³²
Reductionvalue % 52 → card index 0–51, 2D 2H 2S 2C 3D … AC
OutputOne card at the requested cursor (no deck state)
Cursor map0 = P1 · 1 = dealer up · 2 = P2 · 3 = hole · then your draws, then the dealer's; after a split, 4 and 5 are the two hands' second cards
src/rng.ts · MAX_FAIR + getCard · Verified
// §2 Step 2: largest multiple of 52 that fits in 2^32; values at or above it are rejected.export const MAX_FAIR: number = Math.floor(2 ** 32 / DECK_RANGE) * DECK_RANGE; // 4294967248 // §2 Steps 1-3: the card at cursor k of round (serverSeed, clientSeed, nonce).export function getCard(serverSeed: string, clientSeed: string, nonce: number, cursor: number): string {  return getCardWithKey(decodeServerSeed(serverSeed), clientSeed, nonce, cursor);}
Single-card draw model. There is no shuffled deck array. Each card is drawn independently at 1/52, with replacement: an infinite deck, confirmed in 2.7.
Result: src/rng.ts reproduces all 6,000 live hands, 33,194 cards, with zero mismatches. Duel's own Verify-tab code, run unmodified as a cross-check, gives the same card on 300,000 / 300,000 cursors.
2.2Entropy Sources

All randomness comes from one deterministic HMAC-SHA256 over four separate inputs:

Entropy Sources — illustrated flow
3 columns
SourceControlled ByPurpose
Server SeedCasinoBase randomness (committed via SHA-256 hash before betting)
Client SeedPlayerPlayer-contributed entropy
NonceSystemOne per hand within an epoch; rises by 1 per hand, not per action
CursorSystemThe card's place in the hand: 0 = P1, 1 = dealer up, 2 = P2, 3 = hole, then the cards drawn after the deal
Result: 6,000 / 6,000 hands recomputed from the four inputs alone (33,194 cards). A hidden input would break the recomputation; none does. Not in the draw: timestamps, Math.random(), external APIs, server-side mutable state. Only HMAC-SHA256(hexDecode(serverSeed), clientSeed:nonce:cursor).

No other input reaches the draw. Run the same inputs again and the cards are identical, for all 6,000 hands. Your stake and your actions are not inputs: actions only decide how many cursors a hand uses.

2.3Modulo Bias Analysis

A plain value % 52 would be biased: 2³² = 4,294,967,296 = 52 × 82,595,524 + 48, so indices 0–47 would each get one more value than indices 48–51. Duel's published code, and our rebuild, remove the bias by rejection sampling: the ceiling MAX_FAIR = 52 × ⌊2³² / 52⌋ = 4,294,967,248 discards the top 48 values, and a rejected 4-byte value passes to the next one in the same digest. The draw does not move to a new cursor on rejection. If all eight values reject, the function throws; that has probability about 2.4 × 10⁻⁶⁴ per draw.

For range = 52 (every card draw):
  MAX_FAIR = 52 × ⌊2³² / 52⌋
           = 52 × 82,595,524
           = 4,294,967,248  (= 0xFFFFFFD0)

  Rejected values: [4,294,967,248 .. 4,294,967,295] = 48 values
  Rejection rate:  48 / 2³² ≈ 1.118 × 10⁻⁸ per value

  Accepted values: exactly 52 × 82,595,524
  → each card index 0..51 equally likely (bias exactly 0)
Result: Bias per accepted draw: exactly 0 (limit 2⁻³²). 0 rejected values in 33,194 draws; 0 exhausted digests.

Step 35 computes the bound from the code's own constant and counts rejections over the 33,194 captured draws: 0 rejected values, against 3.7 × 10⁻⁴ expected. The rejection branch is never reached in the capture, so a unit test exercises it, and Duel's Verify-tab code is run on fixed hash vectors that reach it (both throw when all eight values reject).

2.4RNG Isolation

Every card in a hand has its own cursor in the HMAC message, and every hand its own nonce, so each card comes from a separate HMAC computation. HMAC-SHA256 is a pseudorandom function: one card's output tells you nothing about another's. There is no shared state between cards, hands or epochs.

RNG Isolation — illustrated flow
Result: No state leaks between cards, hands or epochs. Each HMAC call is keyed and messaged on its own.

Evidence: getCard(serverSeed, clientSeed, nonce, cursor) in 2.1 is a pure function, with no module-scoped state, no file, network or clock access. Same inputs, same card. Because it reads nothing beyond the four recorded values, every captured hand stays verifiable indefinitely.

Not in the algorithm: Date.now() or any time-derived value; Math.random() or any other non-deterministic generator; process.env, process.hrtime or os.*; any database, file or network read; any mutable global or module-scoped variable; any other hand's outcome.

2.5Monte Carlo Simulation (10M Hands, Fisher's Method)

Pass 1 plays 10 streams × 1,000,000 hands through src/rng.ts, under the strategy the RTP engine uses, on 10 seed pairs generated once with crypto.randomBytes() and pinned in src/simulate.ts: about 35 million card draws, with no casino data as input. RTP is per initial bet, the engine's convention. Each stream's RTP is tested against the engine's 99.4296% at that stream's own standard error, and the 10 p-values are combined by Fisher's method.

2 columns
MetricValue
Total hands10,000,000 (10 streams × 1,000,000)
Fisher's combined p-value0.686432 (T = 16.48, df = 20)
Theoretical RTP (optimal play, per initial bet)99.4296%
Simulated RTP (Pass 1, 10M hands)99.4670%; streams from 99.28% to 99.63%
Simulated − theoretical+0.0374 pp, about one standard error (0.036 pp for 10 million hands)
Streams flagged for serial dependence0 / 10
First-card rank uniformity0 / 10 streams below α = 0.001 (smallest p 0.0095)
3 columns
Hands per streamHands in allMean running RTP of the 10 streams
1,00010,00098.2350%
5,00050,00098.9120%
10,000100,00099.3665%
50,000500,00099.7229%
100,0001,000,00099.4323%
500,0005,000,00099.4257%
1,000,00010,000,00099.4670%
src/simulate.ts · SIM_SEEDS (excerpt) · Verified
// Pass 1 simulation seeds — one unique pair per stream.// Generated once via crypto.randomBytes(32/16), pinned for reproducibility:// every reviewer's `npm run simulate` produces bit-identical numbers. No// casino data is used as input — these are independent random bytes.const SIM_SEEDS: Array<{ server: string; client: string }> = [  { server: '2420f708b5b67ad9c5df5fc62e5b5fed4601a1e33d4d145c12b5996090d8dd58', client: 'c772e3090033e1a282fece2e3fe4873a' },  { server: '30983ea650a9338e858743f92189ed8fae282eae955a2f6ea406aa5ba1d6ecf5', client: 'fa8301973e46928cf81ad78205250a0c' },  { server: '951327dd6d9d0ca8731ee47c19875fa1d41b81d4c7a7ca4b547dc4bc2d1936dd', client: '34ff531b7d0f75e39507d82cbdbe2903' },  // … 10 pairs in all, listed in src/simulate.ts];
Result: Fisher's combined p = 0.686432, well above the 0.01 threshold. The simulated 99.4670% is consistent with the theoretical 99.4296%. No casino data is used as input, only the stated rules and pinned seeds.

Method (src/simulate.ts): per-stream z-test of the stream RTP against the analytical optimal-play RTP from src/optimal-play.ts, combined as T = −2 Σ ln(pᵢ) ~ χ²(2K). Step 17 recomputes Fisher's statistic from the 10 stored stream rows and requires p ≥ 0.01.

The seeds are pinned, so npm run simulate:run reproduces the committed numbers bit for bit. No casino data is used as input.

2.6Serial Independence

Serial independence means one hand doesn't affect the next. Pass 1 tests each of its 10 streams for it, with a Bonferroni correction across the streams.

Lag-1 autocorrelation: Correlation between consecutive hands' returns, about 0 for independent hands. A stream is flagged when |z| > 3.2905 (two-sided α = 0.001 per stream, family-wise 0.01).

Wald-Wolfowitz runs test: Whether the run of above- and below-median returns has the expected number of runs. A stream is flagged when p < 0.001.

Combined figures: Lag-1 and runs on the first 100,000 hands of the combined stream, kept for information; the per-stream count is the test.

src/simulate.ts · per-stream serial flags · Verified
let streamsFlaggedSerial = 0;for (const sr of streamResults) {  const flagLag = Math.abs(sr.lag1Z) > Z_CRIT_BONF;  const flagRuns = sr.runsP < ALPHA_PER_STREAM;  if (flagLag || flagRuns) streamsFlaggedSerial++;}
Result: 0 / 10 streams flagged. Per-stream lag-1 z runs from −1.952 to 1.627, all inside ±3.2905; the smallest per-stream runs p is 0.1888. Combined, first 100,000 hands: lag-1 r = +0.0018, runs z = −1.16, p = 0.2446. The test finds no sign of serial dependence.
2.7Infinite-Deck Confirmation

Duel's blackjack uses an infinite deck: each card is drawn independently at 1/52, with replacement. Step 29 scores that against a number with no strategy in it. The four deal cards (cursors 0–3) are drawn before any decision, so under draw-with-replacement a hand repeats a card among them with probability exactly 1 − (52·51·50·49)/52⁴ = 0.111359. Over 6,000 hands that is 668.2 ± 24.4; the step fails outside ±5σ. Too few repeats would mean a finite shoe; a single deck gives none at all.

2 columns
Bet IDRepeated card in the hand
134186152C appeared ≥2×
134186407C appeared ≥2×
134186454D appeared ≥2×
tests/steps/rules.ts · Step 29 (excerpt) · Verified
const P4 = 1 - (52 * 51 * 50 * 49) / (52 ** 4);// … for each hand: four = [P1, dealer up, P2, hole]; if (new Set(four).size < 4) initialDup++;const n4 = ctx.bets.length;const mean4 = n4 * P4;const sd4 = Math.sqrt(n4 * P4 * (1 - P4));const z4 = sd4 > 0 ? (initialDup - mean4) / sd4 : Infinity;const ok29 = initialRead === n4 && n4 > 0 && Math.abs(z4) <= 5;
Result: 670 / 6,000 deals repeat a card within the first four cursors, against 668.2 ± 24.4 (z = 0.08). Across whole hands, 1,354 / 6,000 contain two identical cards, impossible from a single finite deck.

Why this matters: many card games shuffle a 52-card deck per round, which rules out a repeated card in one hand. Duel draws each card independently instead. The RTP engine in src/optimal-play.ts uses the same infinite-deck model, so the theoretical RTP describes the game as dealt.

2.8Worked Example — Full RNG Trace

A real hand from the dataset: bet 13418619 (Phase A, nonce 1, the second hand of its epoch). You were dealt 6D 9D (15) against the dealer's 10H, hit for 4D to make 19, and stood. The dealer turned over 7S for 17 and stood (S17). 19 beats 17. Stakes were $0.01 main, $0.01 Perfect Pairs and $0.01 21+3, $0.03 in all; neither side bet hit, and the return was $0.02.

serverSeed = b6f2cbcd411eedbd53587902410f17f43e962f2e374e97ccbec24088debd0556
clientSeed = pf_Naa0pBEOuWmz6
nonce      = 1
6 columns
cursorroleHMAC[:8]accepted uint32% 52card
0Player card 152a82fa41,386,753,956166D
1Dealer up-cardb0ab43912,964,013,9693310H
2Player card 28c31d5702,352,076,144289D
3Dealer hole (turned over at play-out)9d838a662,642,643,558227S
4Player hit cardcfdc2f603,487,313,76084D
Parity verified: Bet 13418619: every card recomputes from getCard(serverSeed, clientSeed, nonce, cursor) for cursors 0–4. amount_won = 0.02 is 2 × the $0.01 main stake; the two $0.01 side bets lost (6D 9D is no pair, and 6D 9D 10H is no 21+3 hand). The actions [hit, stand] decide how many cursors you use; the dealer's play-out follows the S17 rule.

Verification — Full HMAC trace, all 5 cursors:

Card trace · bet 13418619, cursors 0–4 · Verified
// getCard(serverSeed = 'b6f2cbcd411eedbd53587902410f17f43e962f2e374e97ccbec24088debd0556',//         clientSeed = 'pf_Naa0pBEOuWmz6', nonce = 1, cursor = 0..4)//// Each cursor: HMAC-SHA256(hexDecode(serverSeed), `${clientSeed}:${nonce}:${cursor}`), read as eight// big-endian uint32 chunks. The first chunk below MAX_FAIR (4,294,967,248) is accepted: CARDS[value % 52].//// ─── CURSOR 0 (Player card 1) ─────────────────────────────────────// message = 'pf_Naa0pBEOuWmz6:1:0'// HMAC    = 52a82fa46b1f4bb9204051b4c621babab013c1bd54c78aef5d512fdd691fd3c4//   chunk[0] = 0x52a82fa4 = 1386753956  →  1386753956 % 52 = 16 →  6D  ✅ accepted//   chunk[1] = 0x6b1f4bb9 = 1797213113  (not read)//   chunk[2] = 0x204051b4 =  541086132  (not read)//   chunk[3] = 0xc621baba = 3324099258  (not read)//   chunk[4] = 0xb013c1bd = 2954084797  (not read)//   chunk[5] = 0x54c78aef = 1422363375  (not read)//   chunk[6] = 0x5d512fdd = 1565601757  (not read)//   chunk[7] = 0x691fd3c4 = 1763693508  (not read)//// ─── CURSOR 1 (Dealer up-card) ────────────────────────────────────// message = 'pf_Naa0pBEOuWmz6:1:1'// HMAC    = b0ab4391f2297b348d559973e979c9db830455f7c8f6e878217dd1a89449ac91//   chunk[0] = 0xb0ab4391 = 2964013969  →  2964013969 % 52 = 33 →  10H  ✅ accepted//   chunk[1] = 0xf2297b34 = 4062804788  (not read)//   chunk[2] = 0x8d559973 = 2371197299  (not read)//   chunk[3] = 0xe979c9db = 3917072859  (not read)//   chunk[4] = 0x830455f7 = 2198099447  (not read)//   chunk[5] = 0xc8f6e878 = 3371624568  (not read)//   chunk[6] = 0x217dd1a8 =  561893800  (not read)//   chunk[7] = 0x9449ac91 = 2487856273  (not read)//// ─── CURSOR 2 (Player card 2) ─────────────────────────────────────// message = 'pf_Naa0pBEOuWmz6:1:2'// HMAC    = 8c31d57065494f345efeb1f25616c7508b77a5675d688e1998c95797ef3239d7//   chunk[0] = 0x8c31d570 = 2352076144  →  2352076144 % 52 = 28 →  9D  ✅ accepted//   chunk[1] = 0x65494f34 = 1699303220  (not read)//   chunk[2] = 0x5efeb1f2 = 1593750002  (not read)//   chunk[3] = 0x5616c750 = 1444333392  (not read)//   chunk[4] = 0x8b77a567 = 2339874151  (not read)//   chunk[5] = 0x5d688e19 = 1567133209  (not read)//   chunk[6] = 0x98c95797 = 2563331991  (not read)//   chunk[7] = 0xef3239d7 = 4013046231  (not read)//// ─── CURSOR 3 (Dealer hole (turned over at play-out)) ─────────────// message = 'pf_Naa0pBEOuWmz6:1:3'// HMAC    = 9d838a667d74683c1c2656c9beefb99b532d14ab50ff66f6e4ed0491acfffbae//   chunk[0] = 0x9d838a66 = 2642643558  →  2642643558 % 52 = 22 →  7S  ✅ accepted//   chunk[1] = 0x7d74683c = 2104780860  (not read)//   chunk[2] = 0x1c2656c9 =  472274633  (not read)//   chunk[3] = 0xbeefb99b = 3203381659  (not read)//   chunk[4] = 0x532d14ab = 1395463339  (not read)//   chunk[5] = 0x50ff66f6 = 1358915318  (not read)//   chunk[6] = 0xe4ed0491 = 3840738449  (not read)//   chunk[7] = 0xacfffbae = 2902457262  (not read)//// ─── CURSOR 4 (Player hit card) ───────────────────────────────────// message = 'pf_Naa0pBEOuWmz6:1:4'// HMAC    = cfdc2f60b0329350d4b0a7eeb6ea91987b0326ff369b54d4f86805599ebf1a25//   chunk[0] = 0xcfdc2f60 = 3487313760  →  3487313760 % 52 = 8  →  4D  ✅ accepted//   chunk[1] = 0xb0329350 = 2956104528  (not read)//   chunk[2] = 0xd4b0a7ee = 3568347118  (not read)//   chunk[3] = 0xb6ea9198 = 3068826008  (not read)//   chunk[4] = 0x7b0326ff = 2063804159  (not read)//   chunk[5] = 0x369b54d4 =  916149460  (not read)//   chunk[6] = 0xf8680559 = 4167566681  (not read)//   chunk[7] = 0x9ebf1a25 = 2663324197  (not read)

Every cursor accepts its first 4-byte value; none falls back to a later one.

Live GameP=[6D, 9D, 4D]=19 · D=[10H, 7S]=17 · result=win · won=$0.02
VerifierP=[6D, 9D, 4D]=19 · D=[10H, 7S]=17 · result=win · won=$0.02
Technical Evidence & Verification5 sections
2.9Evidence Coverage Summary9 checks
3 columns
Verification AreaCoverageResult
Card recomputation (Step 5)6,000 / 6,000 hands, 33,194 cardsPass
Key encoding (hex, not UTF-8)Confirmed by the recomputationPass
Draw bias bound (Step 35)MAX_FAIR = 52 × 82,595,524: bias exactly 0; 0 rejections in 33,194 drawsPass
No external entropy (Step 5)6,000 / 6,000 reproduced from (serverSeed, clientSeed, nonce, cursor) onlyPass
Anti-circularity (Step 16)Optimal-play RTP 99.4296% from the rules alone (full exposition in S4)Pass
Simulation Pass 1 (Step 17)10M hands · Fisher's combined p = 0.686432 over 10 streamsPass
Cherry-pick test, Pass 2 (Step 18)Test C: 7 / 120 seeds flag against a fail bound of 17.75 (full exposition in S4)Pass
Serial independence (Step 17)0 / 10 streams flagged at α = 0.001 per streamPass
Infinite deck (Step 29)670 / 6,000 deals repeat a card in cursors 0–3; z = 0.08Pass
2.10Code References8 source files
2 columns
FilePurpose
src/rng.tsThe card draw (hmacSHA256, getCard, MAX_FAIR), written from docs/ALGORITHM.md
src/simulate.tsMonte Carlo: 10M Pass 1 hands and Pass 2 on the 120 casino seeds
src/optimal-play.tsThe recursive infinite-deck RTP engine (full exposition in S4)
src/strategy.ts, src/sim-hand.tsThe strategy and the hand the simulation plays
src/stats.tsNormal and χ² tails, Fisher's method
tests/steps/determinism.tsSteps 5–6: card recomputation and client seed influence
tests/steps/simulation.tsSteps 16–18: anti-circularity, Pass 1 and Pass 2
tests/steps/framework.tsStep 35: draw bias bound
2.11Verified Invariants10 invariants
2 columns
InvariantResult
HMAC-SHA256 single-card draw gives the served card on all 33,194 captured drawsPass
The key is hex-decoded, not UTF-8; the wrong encoding fails every handPass
Rejection sampling at MAX_FAIR = 4,294,967,248 leaves a bias of exactly 0Pass
getCard reads only (serverSeed, clientSeed, nonce, cursor)Pass
Fisher's combined p ≥ 0.01 over 10 streams (p = 0.686432)Pass
10M simulated hands consistent with the theoretical RTP (99.4670% against 99.4296%)Pass
0 / 10 streams flagged for serial dependence at α = 0.001 per streamPass
First-card rank uniform in every stream (0 / 10 below α = 0.001)Pass
Repeated cards in the deal match the infinite-deck expectation (z = 0.08)Pass
A wrong or empty client seed changes all 6,000 initial dealsPass
2.12Datasets UsedSource artifacts
Primary dataset: data/blackjack-dataset-6000hands.json: 6,000 live hands for the card recomputation
Simulation output: outputs/simulation-results.json: Pass 1 (10 streams × 1M hands, Fisher's p, per-stream serial and first-card figures), Pass 2 (120 casino seeds × 10,000 nonces) and the engine's RTP block. SHA-256 pinned, re-hashed by Step 34
Convergence chart: outputs/rtp-convergence.html: the mean running RTP of the 10 streams. SHA-256 pinned
Pinned simulation seeds: src/simulate.ts SIM_SEEDS: 10 server/client pairs, no casino input
2.13Reproduction InstructionsRun locally

Clone the repository at the release tag, install, regenerate the simulation and run the verifier:

reproduce-s2.sh · 5 lines · Verified
git clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjack && git checkout v1.2.1npm cinpm run simulate:run   # optional: regenerates the 10M-hand simulation into outputs/run/npm run verify
Expected output, as run at v1.2.1 (lines for this section):

[PASS] Step 5 — Card Recomputation (declared draw order)
[PASS] Step 16 — Anti-Circularity (Optimal-Play RTP Engine)
[PASS] Step 17 — Simulation Pass 1
[PASS] Step 18 — Pass 2 Cherry-Pick Detection
[PASS] Step 29 — Infinite-Deck Confirmation
[PASS] Step 35 — Draw Bias Bound
03

Verifier Parity

Does the live game actually follow its own rules?

The verifier must produce the exact same cards as the live game for every hand, at every cursor, and the result and payout must follow from them exactly. Split rounds are held to the declared split order card for card. Our implementation, Duel's Verify-tab code and both ProvablyFair.org verifiers check every round.

Live ↔︎ Verifier Parity

6,000 / 6,000hands matched

What we verified

  • Every hand recomputed from its seeds: every visible card, not just the payout
  • All 33,194 cards sit at their declared cursors, the 269 split rounds in the declared split order
  • Every hand's result (6,269 hands) is derived from the cards and agrees with Duel's label
  • Every amount_won equals the settlement from the cards, exactly, on the 18-decimal grid
  • Side bets: 5,800 Perfect Pairs and 5,800 21+3 categories re-derived from cursors 0, 2 and 1
  • Stake is not an input to the RNG: the cards depend only on seeds, nonce and cursor
  • Every round replays from the seed and the recorded actions alone, with no illegal action

What this means for you

  • The verifier isn't a simulation: it produces the same cards, results and payouts as the live game
  • Every hand you play can be recomputed by anyone after seed rotation
  • How much you bet doesn't change the cards; your actions only decide how many are drawn
  • The game served the cards the published algorithm gives, for every captured hand
6,000 / 6,000hands matched
  • Every hand recomputed from its seeds: every visible card, not just the payout
  • All 33,194 cards sit at their declared cursors, the 269 split rounds in the declared split order
  • Every hand's result (6,269 hands) is derived from the cards and agrees with Duel's label
  • Every amount_won equals the settlement from the cards, exactly, on the 18-decimal grid
  • Side bets: 5,800 Perfect Pairs and 5,800 21+3 categories re-derived from cursors 0, 2 and 1
  • Stake is not an input to the RNG: the cards depend only on seeds, nonce and cursor
  • Every round replays from the seed and the recorded actions alone, with no illegal action
Parity Verification Flow — seeds → card recomputation at each declared cursor → compare → exact match — illustrated flow
6,000Live Bets Tested
100%Parity Rate
$0.01 & $10Bet Sizes Tested
0Mismatches
CheckResultEvidence
Card stream recomputationPass6,000 / 6,000 hands, 33,194 cards at their declared cursors; 269 split rounds in the declared order, strict (Steps 5, 22)
Hand settlementPass6,269 hands settled from the recomputed cards; Duel's result label agrees on every one (Step 7)
Payout correctnessPassamount_won = stake × main returns + side returns, exactly on the 1e-18 grid, 6,000 / 6,000 rounds; no tolerance (Step 7)
Pay table integrityPassMain returns (win 2×, natural 2.5×, push 1×, doubled 4× / 2×) and 5,800 + 5,800 side-bet multipliers match the published tables (Steps 7, 8)
Bet-size independencePassThe 200 Phase E hands at $10 recompute and settle the same way; stake is not an HMAC input (Step 9)
Auditor seed coveragePassPhase D: 500 hands under 10 auditor seeds recompute in full, 2,793 cards (Step 15)
Round replayPass6,000 / 6,000 rounds replayed from the seed and the action tokens reproduce every hand; 0 grammar violations (Step 36)
Player-verifier parityPassThis site's verifier, the main site's verifier and Duel's Verify-tab code each agree on all 6,000 rounds (Step 38)
Rule registerCapture flagEvery declared rule observed with a witness count, except insurance 2:1: never funded, so assumed. Limited by our capture script, not a Duel issue (Step 37)
Card stream recomputationPass
6,000 / 6,000 hands, 33,194 cards at their declared cursors; 269 split rounds in the declared order, strict (Steps 5, 22)
Hand settlementPass
6,269 hands settled from the recomputed cards; Duel's result label agrees on every one (Step 7)
Payout correctnessPass
amount_won = stake × main returns + side returns, exactly on the 1e-18 grid, 6,000 / 6,000 rounds; no tolerance (Step 7)
Pay table integrityPass
Main returns (win 2×, natural 2.5×, push 1×, doubled 4× / 2×) and 5,800 + 5,800 side-bet multipliers match the published tables (Steps 7, 8)
Bet-size independencePass
The 200 Phase E hands at $10 recompute and settle the same way; stake is not an HMAC input (Step 9)
Auditor seed coveragePass
Phase D: 500 hands under 10 auditor seeds recompute in full, 2,793 cards (Step 15)
Round replayPass
6,000 / 6,000 rounds replayed from the seed and the action tokens reproduce every hand; 0 grammar violations (Step 36)
Player-verifier parityPass
This site's verifier, the main site's verifier and Duel's Verify-tab code each agree on all 6,000 rounds (Step 38)
Rule registerCapture flag
Every declared rule observed with a witness count, except insurance 2:1: never funded, so assumed. Limited by our capture script, not a Duel issue (Step 37)
✓  Live game and verifier aligned

All 6,000 hands match the independent recomputation: every card at its declared cursor, every hit, double and split, every dealer play-out, every result and every payout, main and side bets, across all six phases.

How It Works — Verifier Parity12 sections
3.1Why Parity Matters

A provably fair algorithm only helps if the live game actually runs it. A casino could publish a sound specification and run something else: deal from another stream, pay a hidden multiplier, or change the cards with the stake. Parity testing checks against that: every captured hand is replayed through our own implementation, and any difference in any card would show. Blackjack makes several draws per hand (deal, hits, doubles, split hands, dealer play-out), each at its own cursor, so every one of the 33,194 cards must match at its declared cursor, not just the payout.

Why Parity Matters — illustrated flow
3.2Six-Phase Collection Design

The 6,000 hands were captured in six phases, each aimed at a property: broad sampling, hit-card allocation, the split order, player-set client seeds, stake and split coverage.

6 columns
PhaseHandsMain stakeSide betsCapture strategyPurpose
A3,300$0.01PP + 21+3 at $0.01Basic strategyBroad sampling across 66 epochs
B1,000$0.01PP + 21+3 at $0.01Aggressive (hit to 16+)More cursors per hand: hit-card allocation
C500$0.01PP + 21+3 at $0.01Split / double priorityThe split cursor order and DAS
D500$0.01PP + 21+3 at $0.01Basic strategy10 auditor client seeds × 50 hands (Step 15)
E200$10.00NoneBasic strategyCards don't depend on stake (Step 9)
F500$0.01PP + 21+3 at $0.01Forced split, as CMore split rounds
Total: 6,000 hands across 120 epochs, $2,174 placed at the deal and $2,440.12 wagered with doubles and splits. The phases yield 269 splits, 1,368 doubled hands in 1,291 rounds, 277 player naturals, 462 insurance prompts (all declined) and 5,800 Perfect Pairs and 5,800 21+3 bets.
3.3Card Recomputation (Step 5)

The core parity test. For each captured hand we read (serverSeed, clientSeed, nonce) and recompute every visible card with getCard(…, cursor), comparing each with the card Duel served at that cursor in the declared order: P1, dealer up, P2, hole, then your extra cards, then the dealer's draws. For a split round the order is P1, dealer up, P2, hole · the first hand's second card · the second hand's second card · the first hand's draws · the second hand's draws · the dealer's draws, card for card. A card out of place fails the hand, and a skipped hand fails the step.

Card Recomputation (Step 5) — illustrated flow
tests/steps/determinism.ts · Step 5 (excerpt) · Verified
const o = declaredOrder(s);if ('error' in o) { mismatches++; if (examples.length < 3) examples.push(`bet ${bet.id}: ${o.error}`); continue; }let ok = true;for (let cursor = 0; cursor < o.seq.length; cursor++) {  const d = drawWithCensus(hmacSHA256(seed, `${bet.client_seed}:${bet.nonce}:${cursor}`));  draws++; rejectedChunks += d.rejected; if (d.card === null) exhausted++;  if (d.card !== o.seq[cursor]) {    ok = false;    if (examples.length < 3) examples.push(`bet ${bet.id} nonce=${bet.nonce} cursor ${cursor}: served ${o.seq[cursor]}, seed gives ${d.card}`);    break;  }}
Result: 6,000 / 6,000 hands recomputed, 33,194 cards; the 269 split rounds, 2,259 cards, in the declared order. 0 mismatches, 0 skipped. The cards Duel served are the cards the seeds give, in the declared order.
3.4Settlement from the Cards (Step 7)

Step 7 never reads Duel's result label to decide a hand. It settles every hand from the recomputed cards under the stated rules, then checks the label and the money against that. Per hand, × the hand's original wager: loss or bust 0, push 1, win 2, natural 2.5 (natural against a dealer natural pushes at 1). A doubled hand returns 0 / 2 / 4. Split hands settle one by one against the dealer, and a two-card 21 after a split counts as a total, not a natural. Side bets add multiplier × side stake for the category the recomputed cards give. Money is compared exactly: amounts as 1e-18 integer units, multipliers as exact fractions, no tolerance.

Settlement from the Cards (Step 7) — illustrated flow
src/round.ts · settleRound · Verified
export function settleRound(hands: Array<{ cards: string[]; doubled: boolean }>, dealer: string[], split: boolean): HandSettlement[] {  const playerNatural = !split && hands.length === 1 && isNatural(hands[0].cards);  const dealerNatural = isNatural(dealer.slice(0, 2));  if (playerNatural && dealerNatural) return [{ result: 'push', halfStakes: 2n }];  if (playerNatural) return [{ result: 'blackjack', halfStakes: R.naturalHalfStakes }];  if (dealerNatural) return hands.map(() => ({ result: 'lose' as const, halfStakes: 0n }));  const d = handValue(dealer).best;  return hands.map(h => {    const w = h.doubled ? 2n : 1n;    const t = handValue(h.cards).best;    if (t > 21) return { result: 'bust' as const, halfStakes: 0n };    if (d > 21 || t > d) return { result: 'win' as const, halfStakes: 4n * w };    if (t === d) return { result: 'push' as const, halfStakes: 2n * w };    return { result: 'lose' as const, halfStakes: 0n };  });}
Result: 6,000 / 6,000 rounds reconcile exactly: 6,269 hands (win 2,261, lose 1,916, bust 1,318, push 514, blackjack 260), the label equal to the derivation on every one, and all 82,400 money strings on the 18-decimal grid. Insurance was never taken, so it adds nothing here.
3.5Side-Bet Multiplier Provenance (Step 8)

Both side bets settle at the deal on three cards: your two (cursors 0 and 2) and the dealer's up-card (cursor 1). The hole card plays no part. Step 8 re-classifies every side bet from those three recomputed cards with our own src/sidebets.ts, and requires the multiplier Duel served to equal the published entry for that category, as an exact fraction. Every category was hit at least once, even the rarest: suited trips, twice in 5,800.

Side-Bet Multiplier Provenance (Step 8) — illustrated flow
3 columns
Side BetReturnsHits / 5,800
PP: Perfect Pair (same rank, same suit)27×113
PP: Coloured Pair (same rank and colour)11×122
PP: Mixed Pair (same rank, other colour)7×224
21+3: Suited Trips (same rank, same suit)121.2307692×2
21+3: Straight Flush (consecutive, one suit)53×11
21+3: Three of a Kind32×33
21+3: Straight (Ace high or low)12×181
21+3: Flush5×342
src/sidebets.ts · classifyPerfectPairs · Verified
export function classifyPerfectPairs(card1: string, card2: string): PerfectPairsResult {  const r1 = cardRank(card1);  const r2 = cardRank(card2);   if (r1 !== r2) return null;   const s1 = cardSuit(card1);  const s2 = cardSuit(card2);   if (s1 === s2) return 'perfect_pair';   const c1 = cardColor(card1);  const c2 = cardColor(card2);   if (c1 === c2) return 'colored_pair';   return 'mixed_pair';}
Result: Perfect Pairs 5,800 / 5,800 and 21+3 5,800 / 5,800 served multipliers equal the published table for the re-derived category; 0 mismatches. Multipliers are total returns, stake included. The table's own edge at this paytable is worked out in S4.
3.6Phase E Bet-Size Invariance (Step 9)

Phase E placed 200 hands at $10, 1,000× the $0.01 stake, with no side bets. All 200 recompute card for card in the declared order (2 of them split rounds) and settle by the same rules from the same cards. The reason is structural: getCard has no stake parameter.

src/rng.ts · getCard signature · Verified
export function getCard(serverSeed: string, clientSeed: string, nonce: number, cursor: number): string {  // … no stake or wager input: the same cards at $0.01 and $10
Result: 200 / 200 Phase E hands ($10) recompute and settle exactly. Stake is not an input to the cards.
3.7Phase D Auditor Client Seed (Step 15)

Phase D used 10 auditor client seeds, pfaudit_bj_seed00 to pfaudit_bj_seed09, one per 50-hand epoch, to check that the server uses the seed the player sets. If it used another seed, the cards recomputed under the set seed would not match. They match on all 500 hands. These ten strings are predictable, so Duel could in principle have known them before committing a server seed. Step 15 lists the ten epochs they opened, and Pass 2 (4.8) checks every captured seed for pre-selection.

Result: Phase D: 500 hands, 10 distinct auditor seeds, none reused elsewhere. Full recompute, every card in the declared order: 500 ok (2,793 cards), 0 failed, 0 skipped.
3.8Dealer-Side Rules (Steps 19, 25, 28, 32, 36)

Five checks cover the dealer's side of every round: S17, insurance offers, the action list, the deal and the replay.

4 columns
CheckStepCoverageResult
Dealer rule (S17)194,216 rounds where the dealer played out: drew only below 17 and stood on every 17 or more, including 75 / 75 soft 17s. 1,784 exempt rounds (a natural on either side, or every hand bust) show exactly the two dealt cardsPass
Insurance offer25462 / 462 dealer-Ace deals offered insurance, 0 offers on any other up-card; insurance_available agrees on 6,000 / 6,000 dealsPass
Available actions2814,313 / 14,313 action lists inside {hit, stand, double, split, insurance, no_insurance}; surrender never offeredPass
Deal and hidden state326,000 / 6,000 deals are 2 + 2 with the hole face down (the 443 rounds auto-resolved on a natural reveal it at the deal). 8,313 pre-settlement responses carry no hole rank or suit, no dealer value counting it and no server seedPass
Round replay366,000 / 6,000 rounds replayed from the seed and the action tokens reproduce every hand; 0 grammar violations; 574 rounds end at the deal on a natural (peek); 356 hands auto-stand at 21Pass
Result: All 6,000 rounds pass S17, the insurance offer rule, the action list, the deal structure and the replay. 0 violations.
Insurance scope: The capture declined every insurance offer, so the payout side of insurance is never exercised. What is verified is the offer: insurance is offered if and only if the dealer's up-card is an Ace. The 2:1 payout is assumed (Step 37, capture flag).
3.9Player-Side Mechanics (Steps 21–24, 37)

The split and double rules, the most complex player-side branches, and the rule register that sums them up.

Player-Side Mechanics (Steps 21–24, 37) — illustrated flow
4 columns
CheckStepCoverageResult
Double payout211,291 rounds with a doubled hand, 1,368 doubled hands (win 478, push 85, lose 402, bust 403) reconcile: win 4×, push 2×, loss 0Pass
Split draw order22269 / 269 split rounds card for card in the declared split order, 2,259 cardsPass
Split rules23269 splits, all on a rank pair; 109 with a double after the split; 0 re-splits; 34 / 34 split aces took one card eachPass
Split payout independence24269 / 269 split rounds equal the sum of their hands settled one by one; a two-card 21 after a split settles as a total (30 / 30)Pass
Rule register37Each stated rule observed with a witness count against the profile floors: splits 269 / 200, ace splits 34 / 20, DAS 109 / 100, doubles 1,368 / 500. Funded insurance 0 / 100: assumedCapture flag
Re-splits: No hand was split a second time. Duel offered no split on any of the 46 split hands dealt a pair again, and the capture never asked for one, so whether the server refuses a re-split was not tested.
3.10Side-Bet Mechanics (Steps 26, 27, 31)

Three checks cover how Perfect Pairs and 21+3 are staked and settled on every hand that placed them.

4 columns
CheckStepCoverageResult
Side-bet payout (multiplier × stake)26PP 5,800 and 21+3 5,800 reconciled exactly on the 1e-18 grid, 0 mismatchedPass
Side-bet independence (deal vs final)27PP 5,800 and 21+3 5,800 unchanged from deal to settlement; 307 / 307 winning side bets on split rounds still paidPass
Side-bet stake equality31PP stake = main stake on 5,800 / 5,800, and 21+3 on 5,800 / 5,800Pass
Note on Step 27: Step 27 shows the side-bet result is fixed at the deal and doesn't change as the hand plays out. That its inputs are exactly cursors 0, 2 and 1 is shown by Step 8's re-classification from those three cards (3.5).
3.11Worked Example — Full Parity Verification

A real hand from Phase F: bet 13481476, nonce 47, $0.01 main with $0.01 on each side bet. You were dealt a pair of Jacks, JC JD, against the dealer's QH, and split. The first hand, built on JC, got its second card 6S (16) and doubled into 3C for 19. The second hand, built on JD, got AS: 21, standing automatically. The dealer turned over QC for 20. Perfect Pairs hit a Mixed Pair (JC black, JD red) at 7×. The return was $0.09, on $0.03 placed at the deal and $0.05 in all after the split and the double. Checked against data/blackjack-dataset-6000hands.json:

serverSeed     = 4f1f3f8a46b0078d4120daf13c4f27677f1b6d7cac34111231c1fe8222559335
clientSeed     = pf_Kf3fXJ0vOBr3a
nonce          = 47
phase          = F
main stake     = $0.01 (a second $0.01 on the split hand, and $0.01 more on the double)
PP stake       = $0.01  (Mixed Pair, 7× → returns $0.07)
21+3 stake     = $0.01  (no qualifying hand, returns $0.00)
actions        = ['split', 'double']
3 columns
StepProcessOutput
1HMAC-SHA256 recomputation, cursors 0–6Card stream [JC, QH, JD, QC, 6S, AS, 3C]
2Deal: cursors 0, 1, 2, 3P=[JC, JD]=20 · D up=QH · D hole=QC
3Perfect Pairs (cursors 0, 2): JC + JD, same rank, different colourmixed_pair → 7×
421+3 (cursors 0, 2, 1): JC + JD + QH, no trips, straight or flushnone → 0×
5Split the Jacks (a rank pair). Cursor 4 is hand 1's second card, cursor 5 hand 2'shand 1 [JC, 6S]=16 · hand 2 [JD, AS]=21
6Hand 1 doubles into cursor 6, 3C; hand 2 stands on 21 automaticallyhand 1: 19 (doubled) · hand 2: 21
7Dealer turns over QC: QH + QC = 20, standsDealer 20
8Hand 1 (19, doubled) loses to 20 → 0; hand 2 (21) wins → 2 × $0.01hand 1 = $0 · hand 2 = $0.02
9Side bets: PP = 7 × $0.01 · 21+3 = 0PP $0.07 · 21+3 $0.00
10Total: $0.02 + $0.07 + $0.00$0.09 ✓
Card stream · bet 13481476 · 7 cursors · Verified
// getCard(serverSeed, clientSeed = 'pf_Kf3fXJ0vOBr3a', nonce = 47, cursor)://   cursor 0 → JC   (Player card 1)//   cursor 1 → QH   (Dealer up-card)//   cursor 2 → JD   (Player card 2)//   cursor 3 → QC   (Dealer hole)//   cursor 4 → 6S   (Hand 1 second card, after the split)//   cursor 5 → AS   (Hand 2 second card, after the split)//   cursor 6 → 3C   (Hand 1 double card)//// Declared split order: P1 D1 P2 D2 · H1 second · H2 second · H1 plays · H2 plays · dealer//   Hand 1:  [JC, 6S, 3C]  cursors 0, 4, 6//   Hand 2:  [JD, AS]      cursors 2, 5//   Dealer:  [QH, QC]      cursors 1, 3// Served cards in that order equal cursors 0..6  ✅
Parity verified: Bet 13481476: every card of both hands and the dealer's recomputes at its declared cursor, 0–6 (Steps 5, 22). Settled hand by hand (Step 24): $0 + $0.02 + $0.07 + $0.00 = $0.09. One hand exercises the split order, a double after the split, a side-bet payout and per-hand settlement, and every piece matches.
Live Gamehand 1=[JC,6S,3C]=19 doubled lose · hand 2=[JD,AS]=21 win · D=[QH,QC]=20 · PP=Mixed Pair 7× · 21+3=none · amount_won=$0.09
Verifierhand 1=[JC,6S,3C]=19 doubled lose · hand 2=[JD,AS]=21 win · D=[QH,QC]=20 · PP=Mixed Pair 7× · 21+3=none · expected=$0.09
3.12Player-Verifier Parity (Step 38)

Players check hands with a verifier, so the verifiers are tested too. Step 38 runs three of them on all 6,000 captured rounds: the ProvablyFair.org verifier on this site (its derive.js and HMAC library, pinned by SHA-256), the bundle served by www.provablyfair.org/verify-bets (pinned), and Duel's own Verify-tab code, copied from its Provably Fair page and run unmodified as a cross-check. src/rng.ts is not built from Duel's code; it is compared with it.

3 columns
VerifierWhat is comparedResult
This site's verifierReplays the recorded actions itself: every hand's cards, outcome, doubled flag and gross return, the dealer hand and both side-bet multipliers6,000 / 6,000 rounds, 0 differ
www.provablyfair.org/verify-betsThe 24 cursors it prints per round (144,000 cards) against src/rng.ts and the served cards6,000 / 6,000 rounds, 0 differ
Duel's Verify-tab code (cross-check)Cursors 0–49 of every round against src/rng.ts; the served cards in the declared order; 5 fixed hash vectors300,000 / 300,000 cursors; 33,194 / 33,194 cards; 5 / 5 vectors
Result: All three verifiers agree with the package on every captured round. Agreement with Duel's published code does not show which code the page's Verify button or Duel's server runs; the live hands are what show the server dealt these cards.
Technical Evidence & Verification5 sections
3.13Evidence Coverage Summary23 checks
3 columns
Verification AreaCoverageResult
Card recomputation (Step 5)6,000 / 6,000 hands, 33,194 cards, declared orderPass
Settlement from the cards (Step 7)6,000 / 6,000 rounds exact on the 1e-18 grid; 6,269 labels agreePass
Side-bet multiplier provenance (Step 8)PP 5,800 / 5,800 · 21+3 5,800 / 5,800Pass
Bet-size invariance (Step 9)200 / 200 Phase E hands at $10Pass
Config completeness (Step 11)All 3 PP and all 5 21+3 categories observed; none outside the tablePass
Phase D seeds (Step 15)500 / 500 hands under 10 auditor seedsPass
Dealer S17 (Step 19)4,216 play-outs compliant; 75 / 75 soft 17s stoodPass
Natural 3:2 (Step 20)277 naturals: 260 paid 2.5×, 17 pushed against a dealer naturalPass
Double payout (Step 21)1,291 rounds, 1,368 doubled handsPass
Split draw order (Step 22)269 / 269 split rounds, strictPass
Split rules (Step 23)269 splits on rank pairs, 0 re-splits, 34 / 34 ace splits one cardPass
Split payout independence (Step 24)269 / 269 settle hand by handPass
Insurance offer (Step 25)462 / 462 on a dealer Ace, 0 otherwisePass
Side-bet payouts (Step 26)PP 5,800 · 21+3 5,800 exactPass
Side-bet independence (Step 27)PP 5,800 · 21+3 5,800 unchanged deal → finalPass
Available actions (Step 28)14,313 / 14,313 lists; surrender never offeredPass
Outcome distribution (Step 30)6,269 / 6,269 hands carry a result; no surrender or unknown resultPass
Side-bet stake equality (Step 31)PP 5,800 / 5,800 · 21+3 5,800 / 5,800Pass
Deal and hidden state (Step 32)6,000 / 6,000 deals; 8,313 pre-settlement responsesPass
Stake brackets (Step 33)6,000 / 6,000 at the declared stake for their phasePass
Round replay (Step 36)6,000 / 6,000 rounds; 0 grammar violationsPass
Rule register (Step 37)Every rule witnessed except insurance 2:1 (assumed)Capture flag
Player-verifier parity (Step 38)Three verifiers on 6,000 / 6,000 roundsPass
3.14Code References10 source files
2 columns
FilePurpose
src/rng.tsCard draw and hand totals (getCard, hashServerSeed, handValue, DEAL_ORDER)
src/round.tsThe declared draw order, the round replay and the settlement from the cards
src/sidebets.tsPerfect Pairs and 21+3 classifiers
src/money.tsExact money: 1e-18 integer units and exact fractions
src/config.tsThe stated rules and the side-bet paytable, one source for every step
tests/steps/determinism.tsSteps 5–6: card recomputation and client seed influence
tests/steps/payouts.tsSteps 7–9: settlement, multiplier provenance, bet-size invariance
tests/steps/game-specific.tsSteps 19–27: dealer rule, naturals, doubles, splits, insurance offer, side bets
tests/steps/rules.tsSteps 28–33: actions, infinite deck, outcomes, side stakes, deal structure, stakes
tests/steps/framework.ts, parity.tsSteps 35–38: draw bias, round replay, rule register, verifier parity
3.15Datasets UsedSource artifacts
Primary dataset: data/blackjack-dataset-6000hands.json: 6,000 live hands across 120 epochs (121 seed records), with each deal and action response
Verification output: outputs/verification-results.json: all 38 step results with their profile mappings
Dataset SHA-256: 55d4b4b1850856c8a3ecf6e59021f1f80bb3d8053376c42929e58b6733b8cae4
Paytable: The dataset's own config.multipliers block, required by Step 14 to equal src/config.ts (8 / 8 entries); the multipliers Duel served are on each side-bet result, which Step 8 checks
3.16Verified Invariants15 invariants
2 columns
InvariantResult
Every card at its declared cursor, 6,000 / 6,000 hands; split rounds strictly in the declared split orderPass
Every round replays from the seed and the action tokens alone, with no grammar violationPass
amount_won = stake × main returns + side returns, exact on the 1e-18 grid, 6,000 / 6,000Pass
Per-hand returns: win 2×, natural 2.5×, push 1×, loss and bust 0; doubled 4× / 2× / 0Pass
Side-bet multipliers match the category from cursors 0, 2 and 1 on all 11,600 side betsPass
Phase E ($10) hands recompute and settle like the $0.01 hands (200 / 200)Pass
Phase D auditor seeds recompute in full (500 / 500)Pass
Dealer S17 in both directions on 4,216 play-outs; exempt rounds show two dealer cardsPass
Splits only on rank pairs; no re-split; one card to each split ace (34 / 34)Pass
Insurance offered if and only if the up-card is an Ace (462 / 462)Pass
Surrender never offered (0 of 14,313 action lists)Pass
Side-bet results unchanged from deal to settlement on all 11,600 side betsPass
Hole card hidden until settlement in all 8,313 pre-settlement responsesPass
Stakes at exactly $0.01, or $10 in Phase E (6,000 / 6,000)Pass
Insurance pays 2:1Capture flag
3.17Reproduction InstructionsRun locally

Clone the repository at the release tag, install, and run the verifier:

reproduce-s3.sh · 4 lines · Verified
git clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjack && git checkout v1.2.1npm cinpm run verify
Expected output, as run at v1.2.1 (lines for this section):

[PASS] Step 5 — Card Recomputation (declared draw order)
[PASS] Step 7 — Settlement from the Cards (exact money)
[PASS] Step 8 — Multiplier Provenance
[PASS] Step 9 — Bet-Size Invariance
[PASS] Step 11 — Config Completeness
[PASS] Step 15 — Phase D Client Seed Variation
[PASS] Step 19 — Dealer Rule Compliance
[PASS] Step 20 — Blackjack Payout (3:2)
[PASS] Step 21 — Double Payout
[PASS] Step 22 — Split Draw Order (declared, strict)
[PASS] Step 23 — Split Rules Verification
[PASS] Step 24 — Split Payout Independence
[PASS] Step 25 — Insurance Prompt Condition
[PASS] Step 26 — Perfect Pairs + 21+3 Payout
[PASS] Step 27 — Side Bet Independence
[PASS] Step 28 — Available Actions Set
[PASS] Step 30 — Outcome Distribution & Live-Sample Fit
[PASS] Step 31 — Side Bet Stake Equality
[PASS] Step 32 — Initial Deal Structure & Hidden-State Sweep
[PASS] Step 33 — Stake Bracket Bounds
[PASS] Step 36 — Round Replay & Action Grammar
[FLAG:capture] Step 37 — Rule & Coverage Register
[PASS] Step 38 — Player-Verifier Parity (docs site + live site)
04

RTP & Payout Logic

Is the house edge what the casino claims?

The theoretical RTP is derived from first principles: an engine that reads only the rules and the card probabilities gives 99.4296% per initial bet with optimal play, and an exact-rational oracle agrees. The 0.57% edge a Duel staff member has stated holds under the RTP claim rule: PASS. 10 million simulated hands are consistent with it. Duel's stake-scaled edge and rakeback are explained from its config, not certified.

Return to Player Verification

99.4296%theoretical RTP · optimal play

What we verified

  • Theoretical RTP is 99.4296% per initial bet under Duel's rules (S17, DAS, no surrender, no re-split, infinite deck) with optimal play; 99.4939% per total amount wagered
  • Derived from first principles by an engine that reads only the rules and the card probabilities, and matched by an exact-rational oracle within 1e-12
  • RTP claim rule: the 0.57% edge a Duel staff member has stated (99.43%) holds within ±0.1 pp — PASS
  • 10M simulated hands average 99.4670%, consistent with 99.4296%
  • Pass 2 finds no sign of server-seed cherry-picking, at its stated power
  • Doubled hands, 3:2 naturals and split hands pay exactly what the rules say
  • At the paytable the captured $0.01 side bets were paid at, Perfect Pairs has an edge of exactly 0 and 21+3 an edge of 16 in 1.4 trillion

What this means for you

  • Over the long run, perfect basic strategy loses 0.5704% of the initial bet; a mistake costs more
  • The figure is an average over many hands, not a deduction from each hand
  • The RTP is derived independently, not taken from the casino
  • Duel's config scales the edge with stake, and Duel describes a rakeback. Explained, not certified
  • Your bet amount doesn't change which cards are dealt
99.4296%theoretical RTP · optimal play
  • Theoretical RTP is 99.4296% per initial bet under Duel's rules (S17, DAS, no surrender, no re-split, infinite deck) with optimal play; 99.4939% per total amount wagered
  • Derived from first principles by an engine that reads only the rules and the card probabilities, and matched by an exact-rational oracle within 1e-12
  • RTP claim rule: the 0.57% edge a Duel staff member has stated (99.43%) holds within ±0.1 pp — PASS
  • 10M simulated hands average 99.4670%, consistent with 99.4296%
  • Pass 2 finds no sign of server-seed cherry-picking, at its stated power
  • Doubled hands, 3:2 naturals and split hands pay exactly what the rules say
  • At the paytable the captured $0.01 side bets were paid at, Perfect Pairs has an edge of exactly 0 and 21+3 an edge of 16 in 1.4 trillion
INDEPENDENT DERIVATION
Σ P(P1, P2, up-card) × optimal return= 0.994296
All 1,000 starting (P1, P2, up-card) combinations · Infinite deck · S17 · DAS · No re-split · 3:2 naturals · Base stake tier

Per total amount wagered: 99.4939%. RTP claim (RTP-CLAIM 1.2.0): 99.43%, from the 0.57% edge a Duel staff member stated; 0.000388 pp off, PASS.

99.4296%Theoretical RTP · optimal play, per initial bet
99.4670%Simulated (10M hands)
0.5704%House edge · RTP claim PASS
99.4939%Per total amount wagered
CheckResultEvidence
Anti-circularityPassThe engine reads only the rule constants and the infinite-deck rank probabilities; no casino RTP, edge or bet field (Step 16)
Optimal-play RTP enginePass99.4296% per initial bet, equal to the exact-rational oracle within 1e-12; the H17 control moves it to 99.2108% (Step 16)
External referencesPassTwo dated Wizard of Odds pages reproduced under their own rules, which re-split; neither states Duel's rule set (Step 16)
RTP claim (RTP-CLAIM 1.2.0)PassClaim 99.43%, from the 0.57% edge a Duel staff member stated; true 99.429612%, 0.000388 pp below, inside ±0.1 pp (Step 16)
Stake tiers and rakebackInfoDuel's config scales the main-bet edge from 0.1% to 0.57% with stake, and the side bets up to 1%; the 0.1% matches Duel's rakeback description. Explained, not certified
Simulated RTP (Pass 1)Pass10M hands: 99.4670%, consistent with 99.4296% (Fisher's p = 0.686432; 0 / 10 streams flagged) (Step 17)
Cherry-pick detection (Pass 2)PassTest C: 7 / 120 seeds flag, 5.40 expected, fail above 17.75; power stated (Step 18)
Pay table integrityPassEvery main and side-bet return matches the published table, exactly (Steps 7, 8, 20, 21, 24, 26)
Side-bet edgePassAt the captured paytable: Perfect Pairs exactly 0; 21+3 16 / 1,406,080,000,000, from the 7-decimal Suited Trips multiplier (Step 16)
Anti-circularityPass
The engine reads only the rule constants and the infinite-deck rank probabilities; no casino RTP, edge or bet field (Step 16)
Optimal-play RTP enginePass
99.4296% per initial bet, equal to the exact-rational oracle within 1e-12; the H17 control moves it to 99.2108% (Step 16)
External referencesPass
Two dated Wizard of Odds pages reproduced under their own rules, which re-split; neither states Duel's rule set (Step 16)
RTP claim (RTP-CLAIM 1.2.0)Pass
Claim 99.43%, from the 0.57% edge a Duel staff member stated; true 99.429612%, 0.000388 pp below, inside ±0.1 pp (Step 16)
Stake tiers and rakebackInfo
Duel's config scales the main-bet edge from 0.1% to 0.57% with stake, and the side bets up to 1%; the 0.1% matches Duel's rakeback description. Explained, not certified
Simulated RTP (Pass 1)Pass
10M hands: 99.4670%, consistent with 99.4296% (Fisher's p = 0.686432; 0 / 10 streams flagged) (Step 17)
Cherry-pick detection (Pass 2)Pass
Test C: 7 / 120 seeds flag, 5.40 expected, fail above 17.75; power stated (Step 18)
Pay table integrityPass
Every main and side-bet return matches the published table, exactly (Steps 7, 8, 20, 21, 24, 26)
Side-bet edgePass
At the captured paytable: Perfect Pairs exactly 0; 21+3 16 / 1,406,080,000,000, from the 7-decimal Suited Trips multiplier (Step 16)
✓  RTP Verified

The theoretical RTP of 99.4296% per initial bet comes from the rules alone and matches an exact-rational oracle. The 0.57% edge a Duel staff member has stated holds under the RTP claim rule, and 10 million simulated hands are consistent with it. Cherry-pick detection across all 120 captured server seeds finds no sign of seed pre-selection at its stated power. Every captured payout follows the published rules exactly. Duel's stake-scaled edge and rakeback are explained from its config, not certified.

How It Works — RTP & Payout Logic14 sections
4.1RTP & House Edge Targets

Blackjack's RTP comes from its rules, not from a paytable the casino can tune. Fix Duel's rules (dealer stands on soft 17, double after split, 3:2 naturals, no surrender, no re-split, peek, infinite deck) and the math is fixed too. With optimal play the long-run return is 99.4296% of the initial bet. Doubles and splits put more money down, 1.126935 initial stakes per round on average, so per total amount wagered the same play returns 99.4939%.

2 columns
MetricValue
Theoretical RTP, per initial bet99.4296% (house edge 0.5704%)
Average wager of the same strategy1.126935 initial stakes per round
Theoretical RTP, per total amount wagered99.4939% (edge 0.5061%)
Control: dealer hits soft 1799.2108%
Player natural (dealer natural the same)4.7337% (8 / 169) each
Result: Both conventions come from the stated rules alone: 4.2 (engine), 4.3 (oracle and external references). They describe optimal play; a strategy mistake lowers the return.
4.2Optimal-Play RTP Engine (Step 16)

The engine in src/optimal-play.ts enumerates all 1,000 (P1, P2, up-card) combinations of 10 rank classes, weighted by infinite-deck probabilities (2–9 and Ace at 1/13 each; the four ten-values folded into one class at 4/13). For each it takes the dealer's final-total distribution under S17 with the peek on an Ace or ten up-card, picks the action with the highest expected value among stand, hit, double and split by memoised recursion (split aces one card, DAS, no re-split), and sums the results. It is deterministic.

Optimal-Play RTP Engine (Step 16) — illustrated flow
2 columns
OutputValue
Theoretical RTP, per initial bet99.4296%
House edge0.5704%
RTP per total amount wagered99.4939%
Player natural frequency4.7337% (= 2 × 4/13 × 1/13)
Dealer natural frequency4.7337% (same, infinite deck)
Combinations enumerated1,000
src/optimal-play.ts · computeOptimalRTP (excerpt) · Verified
for (const p1 of RANKS) {  for (const p2 of RANKS) {    const playerBJ = (p1 === 'T' && p2 === 'A') || (p1 === 'A' && p2 === 'T');    if (playerBJ) playerBJProb += P[p1] * P[p2];     for (const up of RANKS) {      const pCombo = P[p1] * P[p2] * P[up];       const upPeeks = up === 'A' || (up === 'T' && REF.peekTen);      const pDealerBJ = up === 'A' ? P['T'] : up === 'T' ? P['A'] : 0;       let returnRatio: number; // total returned / wagered       if (playerBJ && pDealerBJ > 0) {        // Player BJ vs dealer that may have BJ: push if dealer BJ, else 2.5×        returnRatio = pDealerBJ * (REF.naturalPushes ? 1 : REF.naturalGross) + (1 - pDealerBJ) * REF.naturalGross;      } else if (playerBJ) {        returnRatio = REF.naturalGross;      } else if (upPeeks) {        // Dealer might have BJ — if so player loses, else play optimally        const optEV = playerOptimalEV(p1, p2, up, s17, das);        returnRatio = pDealerBJ * 0 + (1 - pDealerBJ) * (1 + optEV);      } else {        const optEV = playerOptimalEV(p1, p2, up, s17, das);        returnRatio = 1 + optEV;      }       rtpSum += pCombo * returnRatio;    }  }}
Result: Theoretical RTP = 99.4296% per initial bet. The engine reads only the rule constants and the rank probabilities. No casino-supplied RTP, edge or bet field appears anywhere in the calculation.

The recursion under playerOptimalEV covers stand, hit, double and split. The engine's choices match published infinite-deck S17 + DAS basic strategy on the cases the package checks, for example hard 16 v 10 hit, hard 12 v 4 stand, hard 11 v A hit, 8s v 10 split and 9s v 7 stand.

4.3Exact-Rational Oracle and External References

The engine is checked two ways. First, anchor/oracle.py, written from the stated rules without reading the engine, computes the same RTP in exact fractions (Python standard library, 13 distinct ranks, a concrete hole card for every up-card). Step 16 requires the engine to equal it within 1e-12 under S17 and under the H17 control.

Second, two dated Wizard of Odds pages. Neither states Duel's rule set: both allow re-splitting, and Duel does not. So Step 16 switches the same engine to each page's stated rules and requires it to reproduce the page's printed figure to half a unit of its last digit. Re-splitting exists in the engine only for these references; Duel's figure is computed with one split.

4 columns
CheckReferenceEngineTolerance
Oracle, S17 (Duel's rule)7016161098045143337706614398 / 7056410014866816666030739693 = 99.4296119877%99.4296119877%, |Δ| 1.2e-151e-12
Oracle, H17 (control)91009361114781483510240679590 / 91733330193268616658399616009 = 99.2107894950%99.2107894950%, |Δ| 8.9e-161e-12
E14 (S17, infinite deck, DAS, split up to three times except aces, one card to split aces)player EV −0.511734%−0.51173364%, |Δ| 3.6e-95e-9
E15 (S17, DAS, infinite re-splitting, split aces one card each, infinite decks)house edge 0.5093975%0.50939746%, |Δ| 4.4e-105e-10
tests/steps/simulation.ts · Step 16: oracle check · Verified
const ctrlRule = RULES_IN_EFFECT.soft17 === 'stand' ? 'hit' : 'stand';const oDecl = oracleValue(ORACLE_RTP[RULES_IN_EFFECT.soft17]), oCtrl = oracleValue(ORACLE_RTP[ctrlRule]);const dDecl = Math.abs(main.rtp - oDecl), dCtrl = Math.abs(h17.rtp - oCtrl);const oracleOk = dDecl <= ORACLE_TOL && dCtrl <= ORACLE_TOL;
Result: The engine equals the exact-rational oracle under both rules, and reproduces both Wizard of Odds pages under their own rules. Each rule the pages don't state, flipped on the E14 rules, moves the figure outside the tolerance; the no-re-split flip is Duel's rule set and gives 99.4296119877%.
4.4Anti-Circularity Proof — Optimal-Play RTP (Step 16)

The anti-circularity proof derives the theoretical RTP from first principles, without any casino-supplied figure. That is what separates a proof from an estimate. The proof uses only inputs that don't come from the casino:

Anti-Circularity Proof — Optimal-Play RTP (Step 16) — illustrated flow
3 columns
ComponentSourceIndependent of casino?
Game rules (S17, peek, DAS, 3:2 naturals, no surrender, no re-split)src/config.ts RULES, each witnessed in the captured play (Steps 19–37)Yes: checked against live play, not against a casino RTP figure
Rank probabilitiesCombinatorics: 2–9 and A at 1/13, the ten-values at 4/13Yes: they follow from a 52-card deck
Recursive RTP enginesrc/optimal-play.tsYes: equal to an exact-rational oracle written separately
Simulationsrc/simulate.ts: the RNG and the same strategy over 10M handsYes: pinned seeds, no live data
Casino-supplied RTP / edge values(none read)—
src/optimal-play.ts · the probability inputs · Verified
const P: Record<Rank, number> = {  '2': 1/13, '3': 1/13, '4': 1/13, '5': 1/13, '6': 1/13,  '7': 1/13, '8': 1/13, '9': 1/13, 'T': 4/13, 'A': 1/13,};

That is the whole of the probability input. Anyone can recompute 99.4296% from it and the stated rules, with no casino data. A negative control shows the engine is not a constant: under H17 it gives 99.2108%.

The proof is non-circular: The engine gives 99.4296% from inputs that are either combinatorial (1/13, 4/13) or witnessed in live play. It never reads the casino's stated edge, the effective_edge field, or any other casino number that could let the casino define what "correct" means.
Inputs sum check: The rank probabilities sum to 1 (9 × 1/13 + 4/13 = 13/13), and so do the 1,000 starting combinations weighted by P × P × P.
4.5RTP Claim Rule (RTP-CLAIM 1.2.0)

Framework 1.1 holds the audited RTP to the figure the casino states. The rule names six places such a figure can come from: the game page, fairness page, help page, bet panel, rules and game settings. For Blackjack the figure held is 99.43%, from the 0.57% edge Duel staff gave for blackjack on 1 May 2026. It is not one of the six places; it is the figure this package and Methodology v1.1 cite for blackjack.

Duel's game settings state house_edge 0.001 on the main bet's first stake tier. Duel describes 0.1% as its net edge after rakeback, so it is noted as a rakeback line, not tested (4.6). Duel states the side bets as zero edge; that line is noted, not tested, and the side bets are not in the table.

The claim is scored on Step 16 against a ±0.1 pp band, using the exact optimal-play RTP per initial bet (the oracle fraction). 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 cards themselves pass.

5 columns
SettingExact RTPClaimGapOutcome
Main bet, optimal play (infinite deck, S17, DAS, no surrender, no re-split), per initial bet99.429612%99.43%−0.000388 ppPass
Verifier output, as run at v1.2.1 (rtp-claim lines; the source sentence shortened) · Verified
rtp-claim: ENFORCED — PASSrtp-claim:   claim flat 99.430000% — source: Duel staff statement, not one of the six places: … The game settings (E18) state house_edge 0.001 on the main bet's first scaling-edge tier, which Duel describes as the net edge after its rakeback (E19 §1): a rakeback line, noted, not tested (D3)rtp-claim:   band ±0.10 pp · 1 settings · true min 99.429612% (main bet, optimal play (infinite deck, S17, DAS, no surrender, no re-split), per initial bet) · true max 99.429612% (main bet, optimal play (infinite deck, S17, DAS, no surrender, no re-split), per initial bet)rtp-claim:   house side beyond band: 0 · player-favourable beyond band: 0 · worst main bet, optimal play (infinite deck, S17, DAS, no surrender, no re-split), per initial bet at -0.000388 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 18ac6e4eea89ec13… matches the pin
Result: PASS. The true figure, 7016161098045143337706614398 / 7056410014866816666030739693, is 0.000388 pp below the claim, well inside the band. The table is outputs/rtp-claim-table.json, pinned by SHA-256.
4.6Duel's Edge Model & Stake Tiers (5 October 2026 config)

Every captured bet carries an effective_edge field: 0.1 on all 6,000 main hands and 0 on all 5,800 Perfect Pairs and 5,800 21+3 bets (Step 10). It is not applied to the hand: every captured hand paid standard odds and every side bet its full multiplier (Steps 7, 8, 20, 21, 24, 26). It reads the same as Duel's description of its rakeback on 22 April 2026: a rakeback of about 0.44% that makes the net edge 0.1%, with the side bets at exactly 0 edge within the daily limit. On 22 May 2026, explaining Castle Roulette, Duel gave that limit as up to $50,000 a day, $1,000 per bet. Duel's statements don't name the field.

Duel's config as fetched on 5 October 2026 (GET /api/v2/blackjack/config, E18) serves a stake-scaled edge for each bet. The captured stakes sit in the first tier of each ladder by stake, but the captured Perfect Pairs bets were paid 27 / 11 / 7 with effective_edge 0, where that tier pays 26.973 / 10.989 / 6.993 at 0.1%. The config was fetched five months after the capture, and the package does not show which ladder applied on 30 April – 1 May 2026. Explained from the config, not certified. The rakeback, its rate, what it is paid on and the daily limit were not tested.

5 columns
LadderTiersFirst tierFirst-tier edgeAbove it
Main bet48$0 – $45,748.050.1%Rises in 0.01% steps to 0.57% at the last tier, which ends at $260,608.48
Perfect Pairs91$0 – $1,452.010.1% (pays 26.973 / 10.989 / 6.993)Rises to 1% in the last tier, which ends at $14,621.93; the capture was paid 27 / 11 / 7
21+3101$0 – $0.01240% (Suited Trips 121.23076923)Next tier to $114.70 at 0.01% (flush 4.9995); 1% in the last tier, which ends at $11,422.06
tests/steps/dataset.ts · Step 10 (excerpt) · Verified
for (const b of ctx.bets) {  // Main bet effective_edge — at the bet root  if (Math.abs(b.effective_edge - 0.1) < EDGE_TOL) mainOk++;  else { mainBad++; if (badExamples.length < 3) badExamples.push(`Bet ${b.id}: main edge=${b.effective_edge}`); }   // Side bet effective_edges  const sb = b.deal?.blackjack?.side_bet_results;  if (sb) {    if (sb.side_perfect_pairs && parseFloat(sb.side_perfect_pairs.amount_placed || '0') > 0) {      if (Math.abs((sb.side_perfect_pairs.effective_edge ?? -1) - 0) < EDGE_TOL) ppOk++;      else { ppBad++; if (badExamples.length < 3) badExamples.push(`Bet ${b.id}: PP edge=${sb.side_perfect_pairs.effective_edge}`); }    }    if (sb.side_21_plus_3 && parseFloat(sb.side_21_plus_3.amount_placed || '0') > 0) {      if (Math.abs((sb.side_21_plus_3.effective_edge ?? -1) - 0) < EDGE_TOL) t3Ok++;      else { t3Bad++; if (badExamples.length < 3) badExamples.push(`Bet ${b.id}: 21+3 edge=${sb.side_21_plus_3.effective_edge}`); }    }  }}
Result: effective_edge 0.1 on 6,000 / 6,000 main hands, 0 on 5,800 / 5,800 Perfect Pairs and 5,800 / 5,800 21+3 bets, and never applied to a payout. The capture wagered $2,440.12 in all, under one day's zero-edge limit. The game's own edge, 0.5704%, comes from the engine (4.2), not from this field.
4.7Simulation Pass 1 — 10M Hands (Step 17)

4.2 derives the theoretical RTP from first principles. Does the RNG deliver it in practice? Pass 1 plays 10 million hands, 10 streams of 1,000,000 on pinned seed pairs, through src/rng.ts under the engine's strategy. Each stream's RTP is z-tested against 99.4296% at its own standard error, and the 10 p-values are combined by Fisher's method. Step 17 re-derives every figure from the stored stream rows.

Simulation Pass 1 — 10M Hands (Step 17) — illustrated flow

Fisher's combined test: Per-stream p-values combined as T = −2 Σ ln(pᵢ) ~ χ²(2K): T = 16.48 (df = 20), p = 0.686432 over 10 streams of 1M hands.

Simulated RTP: 99.4670% over 10M hands against 99.4296%: +0.0374 pp, about one standard error (0.036 pp). Streams range from 99.28% to 99.63%.

Serial independence: 0 / 10 streams flagged at α = 0.001 per stream (lag-1 and runs). Combined, first 100,000 hands, for information: lag-1 r = +0.0018, runs p = 0.2446.

2 columns
Hands per streamMean running RTP of the 10 streams
1,00098.2350%
5,00098.9120%
10,00099.3665%
50,00099.7229%
100,00099.4323%
500,00099.4257%
1,000,00099.4670%
src/simulate.ts · Fisher's method · Verified
const streamPValues: number[] = [];for (const sr of streamResults) {  const z = sr.seRTP > 0 ? (sr.rtp - expectedRTP) / sr.seRTP : 0;  const p = 2 * (1 - normalCDF(Math.abs(z)));  streamPValues.push(Math.max(p, 1e-10));}const fisherStat = -2 * streamPValues.reduce((sum, p) => sum + Math.log(p), 0);const fisherDf = 2 * PASS1_STREAMS;const fisherP = chi2PValue(fisherStat, fisherDf);
Result: Fisher's combined p = 0.686432: no concentration in either tail. The simulated 99.4670% is consistent with the theoretical 99.4296%, about one standard error away. 0 / 10 streams flagged for serial dependence, and first-card ranks are uniform in every stream.
4.8Cherry-Pick Detection — Pass 2 (Step 18)

Could the casino hand out server seeds whose first hands go badly for players? Pass 2 replays each of the 120 revealed seeds for 10,000 nonces under the same strategy, 1.2 million hands, and asks whether the 50 hands the capture actually played on that seed returned unusually little.

Test C decides. For each seed, the served window (the capture's own 50 nonces) is ranked against that seed's other 199 windows of 50. The rule was fixed in src/cherry-pick.ts before the rows were generated: p = (1 + rank) / 200, a seed flags at p < 0.05, and the step fails above 17.75 flags. Only a low served window flags.

Test B (kept for comparison): The original two-sided test of each seed's first 50 hands against its other 9,950: 11 / 120 flagged (6 low, 5 high; 6.0 expected), binomial p = 0.038450, above the 0.01 threshold. It would reject at a single-test 0.05 reading. Two non-malicious readings fit, sampling variance (11 is about 2.1σ above the mean) and an artifact of the test's construction; Test C decides.

3 columns
Candidate windows (K)Per-seed detectionAudit-level detection, half the seeds picked
20.1250.013
50.2000.214
100.3330.890
200.4670.998
src/cherry-pick.ts · the pre-registered rule · Verified
export const TEST_C_ALPHA = 0.05;/** Largest rank that flags: (1 + rank) / TEST_C_WINDOWS < TEST_C_ALPHA. */export const TEST_C_FLAG_RANK = Math.ceil(TEST_C_ALPHA * TEST_C_WINDOWS) - 2;       // 8/** Null flag probability with no ties: (TEST_C_FLAG_RANK + 1) / TEST_C_WINDOWS = 9/200. */export const TEST_C_NULL_P = (TEST_C_FLAG_RANK + 1) / TEST_C_WINDOWS;
Result: 7 / 120 seeds flag, against 5.40 expected and a fail bound of 17.75; smallest p 0.010. The stored rows equal the replay on 120 / 120 seeds. First-card ranks per seed: 0 / 120 below 0.001. No sign of seed pre-selection, at the power below.
Detection power: Against an operator serving the lowest-returning of K candidate windows. A selector choosing among 10 or more on half the seeds would usually be caught; a best-of-2 or best-of-5 selector on part of the seeds would usually go undetected in 120 seeds.
4.9Side-Bet Edge (Step 16)

Both side bets settle on the deal's three cards, drawn independently from an infinite deck. Their edge at the paytable the captured $0.01 side bets were paid at can be enumerated exactly. Multipliers are total returns, stake included.

Perfect Pairs: edge exactly 0

Given your first card, your second is one of 52 equally likely cards: 1 makes a Perfect Pair (27×), 1 a Coloured Pair (11×), 2 a Mixed Pair (7×) and the other 48 no pair. Every $1 staked returns exactly $1 on average, with no rounding:

E[return] = (1/52) × 27 + (1/52) × 11 + (2/52) × 7
          = (27 + 11 + 14) / 52
          = 52 / 52
          = 1

21+3: edge 16 / 1,406,080,000,000. 21+3 pays on your two cards and the dealer's up-card (cursors 0, 2 and 1). Over the 52³ = 140,608 equally likely ordered deals:

3 columns
CombinationDeals of 140,608Published multiplier
Suited Trips (same rank, same suit)52121.2307692×
Straight Flush (consecutive, one suit)28853×
Three of a Kind (same rank, not one suit)78032×
Straight (consecutive, not one suit; Ace high or low)4,32012×
Flush (one suit, not trips or straight flush)8,4485×
E[return] = (52 × 121.2307692 + 288 × 53 + 780 × 32 + 4,320 × 12 + 8,448 × 5) / 140,608
          = 140,607.9999984 / 140,608
          = 1 − 16 / 1,406,080,000,000

The edge comes only from the 7-decimal rounding of the Suited Trips multiplier: at exactly 121 3/13 the table balances to 1. That is about 1.14 × 10⁻¹¹ of each dollar staked. This checks the paytable's internal consistency; it does not verify the multipliers from first principles.

Result: At the paytable the captured $0.01 side bets were paid at, Perfect Pairs has an edge of exactly 0 and 21+3 an edge of 16 / 1,406,080,000,000. Both are computed by exact enumeration (src/sidebet-edges.ts). No other side-bet stake was captured; Duel's config prices Perfect Pairs at 0.1% from the first cent (4.6).
4.10Doubled-Hand Payouts (Step 21)

Doubling doubles the hand's stake for exactly one more card. A doubled hand returns 4× the original stake on a win, 2× on a push and 0 on a loss or bust. The engine models this in its double branch, and Step 21 reconciles every doubled hand in the capture, outcome taken from the recomputed cards.

3 columns
Doubled-hand outcomeReturnsHands
Win4× stake478
Push2× stake85
Lose0402
Bust0403
Total—1,368
Result: 1,291 / 1,291 rounds with a doubled hand reconcile exactly (1,368 doubled hands). 0 mismatches.
4.11Natural Blackjack 3:2 Payout (Step 20)

A natural, Ace plus a ten-value as your first two cards on an unsplit hand, pays 3:2: 2.5× the stake returned. Against a dealer natural it pushes. 3:2 is a direct input to the engine. Step 20 derives every natural from the recomputed cards and checks its payout.

3 columns
CaseReturnsNaturals
Natural against a non-natural dealer2.5× stake (3:2)260 / 260 paid exactly
Natural against a dealer natural1× stake (push)17 / 17
Result: 277 naturals: 260 paid exactly 2.5× plus any side returns, 17 pushed against a dealer natural. 0 wrong. A two-card 21 after a split pays as a total, not a natural (30 / 30, Step 24).
4.12Bet-Size Invariance (Step 9)

getCard has no stake input, so the theoretical RTP applies at every stake where hands pay standard odds. Phase E placed 200 hands at $10, 1,000× the $0.01 stake, to check it: all 200 recompute and settle exactly as the $0.01 hands do.

3 columns
Metric$0.01 phases (A, B, C, D, F)Phase E ($10)
Hands5,800200
Main stake$0.01$10.00
Side bets$0.01 eachNone
Cards recomputed5,800 / 5,800200 / 200
Settled exactly5,800 / 5,800200 / 200
Result: Same RNG, same rules, same settlement at both stakes. See 3.6 for the per-hand evidence.
4.13Captured Returns (Not Scored)

What the capture itself returned, for transparency. The phases mix strategies and side bets, so they are not RTP estimates. Only Phase E, main bet only under basic strategy, compares with the engine: $1,805.00 returned against $1,988.59 expected, 0.918 standard deviations below (one-sided p 0.179).

5 columns
PhaseHandsPlaced at the dealReturnedReturn
A3,300$99.00$101.62102.65%
B1,000$30.00$29.5998.63%
C500$15.00$17.86119.07%
D500$15.00$17.35115.63%
E200$2,000.00$1,805.0090.25%
F500$15.00$16.29108.62%
All6,000$2,174.00$1,987.7191.43%
Why these vary: Side-bet hits swing the small $0.01 phases (a 27× pair or a 53× straight flush moves a 500-hand phase by points), and Phase E is $2,000 of the $2,174 total. Phases A–D and F together returned $182.71 on $174 (105.0%). Step 30 labels the money path, 91.4309% returned over staked, a reconciliation, not an RTP.
4.14Worked Example — RTP & Payout Reconciliation

A real hand from Phase A: bet 13430242, nonce 13. Stakes: $0.01 main, $0.01 Perfect Pairs and $0.01 21+3, $0.03 in all. You were dealt 10H 10C against the dealer's 10S and stood on 20. The dealer turned over 9H for 19. Both side bets hit: Perfect Pairs a Mixed Pair (same rank, different colour) at 7×, and 21+3 Three of a Kind (three tens, different suits) at 32×. The return was $0.41.

serverSeed     = f92f3f630cd26f092bb6e41ea2fb791f40a45fe680c8a711bcb3bc534c28a32e
clientSeed     = pf_okZmF4PVEwbyB
nonce          = 13
phase          = A
main stake     = $0.01
PP stake       = $0.01  (Mixed Pair, 7× → won $0.07)
21+3 stake     = $0.01  (Three of a Kind, 32× → won $0.32)
actions        = ['stand']
3 columns
StepProcessOutput
1Independent HMAC-SHA256 recomputation: 4 calls with cursor 0..3Card stream [10H, 10S, 10C, 9H]
2Initial deal: cursors 0/1/2/3P=[10H, 10C]=20 · D up=10S · D hole=9H
3PP classification (cursors 0, 2): 10H + 10C — same rank, different colourmixed_pair → 7×
421+3 classification (cursors 0, 2, 1): 10H + 10C + 10S — three tens, different suitsthree_of_a_kind → 32×
5You stand on 20Hand: 20 (no double, no split)
6Dealer turns over 9H → 10S + 9H = 19, standsDealer 19
7Resolution: player 20 wins vs dealer 19 → 2 × $0.01Main return: $0.02
8PP payout: 7 × $0.01 (Mixed Pair)PP return: $0.07
921+3 payout: 32 × $0.01 (Three of a Kind)21+3 return: $0.32
10Total: $0.02 (main) + $0.07 (PP) + $0.32 (21+3)$0.41 ✓
Card trace · bet 13430242, cursors 0–3 · Verified
// getCard(serverSeed = 'f92f3f630cd26f092bb6e41ea2fb791f40a45fe680c8a711bcb3bc534c28a32e',//         clientSeed = 'pf_okZmF4PVEwbyB', nonce = 13, cursor = 0..3)//// Each cursor: HMAC-SHA256(hexDecode(serverSeed), `${clientSeed}:${nonce}:${cursor}`), read as eight// big-endian uint32 chunks. The first chunk below MAX_FAIR (4,294,967,248) is accepted: CARDS[value % 52].//// ─── CURSOR 0 (Player card 1) ─────────────────────────────────────// message = 'pf_okZmF4PVEwbyB:13:0'// HMAC    = fe2a072d16abf18e1ab8b5dd551d7f50d55461babf8fec0ef22e38264dae9d4b//   chunk[0] = 0xfe2a072d = 4264167213  →  4264167213 % 52 = 33 →  10H  ✅ accepted//   chunk[1] = 0x16abf18e =  380367246  (not read)//   chunk[2] = 0x1ab8b5dd =  448312797  (not read)//   chunk[3] = 0x551d7f50 = 1427996496  (not read)//   chunk[4] = 0xd55461ba = 3579077050  (not read)//   chunk[5] = 0xbf8fec0e = 3213880334  (not read)//   chunk[6] = 0xf22e3826 = 4063115302  (not read)//   chunk[7] = 0x4dae9d4b = 1303289163  (not read)//// ─── CURSOR 1 (Dealer up-card) ────────────────────────────────────// message = 'pf_okZmF4PVEwbyB:13:1'// HMAC    = 9bbe877a7a09051ee013c29072c99d2f193b42ce527f29fe67bf1db4951eb465//   chunk[0] = 0x9bbe877a = 2612955002  →  2612955002 % 52 = 34 →  10S  ✅ accepted//   chunk[1] = 0x7a09051e = 2047411486  (not read)//   chunk[2] = 0xe013c290 = 3759391376  (not read)//   chunk[3] = 0x72c99d2f = 1925815599  (not read)//   chunk[4] = 0x193b42ce =  423314126  (not read)//   chunk[5] = 0x527f29fe = 1384065534  (not read)//   chunk[6] = 0x67bf1db4 = 1740578228  (not read)//   chunk[7] = 0x951eb465 = 2501817445  (not read)//// ─── CURSOR 2 (Player card 2) ─────────────────────────────────────// message = 'pf_okZmF4PVEwbyB:13:2'// HMAC    = c43be16b589c83b34fa65978fd226684133e0881c00e30cbac944d498dbcdcdb//   chunk[0] = 0xc43be16b = 3292258667  →  3292258667 % 52 = 35 →  10C  ✅ accepted//   chunk[1] = 0x589c83b3 = 1486652339  (not read)//   chunk[2] = 0x4fa65978 = 1336301944  (not read)//   chunk[3] = 0xfd226684 = 4246890116  (not read)//   chunk[4] = 0x133e0881 =  322832513  (not read)//   chunk[5] = 0xc00e30cb = 3222155467  (not read)//   chunk[6] = 0xac944d49 = 2895400265  (not read)//   chunk[7] = 0x8dbcdcdb = 2377964763  (not read)//// ─── CURSOR 3 (Dealer hole) ───────────────────────────────────────// message = 'pf_okZmF4PVEwbyB:13:3'// HMAC    = 75e2cdc55caa1c94ef99abb1b05a3ef0191c9f685b54e0349eb1204925225832//   chunk[0] = 0x75e2cdc5 = 1977798085  →  1977798085 % 52 = 29 →  9H  ✅ accepted//   chunk[1] = 0x5caa1c94 = 1554652308  (not read)//   chunk[2] = 0xef99abb1 = 4019825585  (not read)//   chunk[3] = 0xb05a3ef0 = 2958704368  (not read)//   chunk[4] = 0x191c9f68 =  421306216  (not read)//   chunk[5] = 0x5b54e034 = 1532289076  (not read)//   chunk[6] = 0x9eb12049 = 2662408265  (not read)//   chunk[7] = 0x25225832 =  623007794  (not read)
Parity verified: Bet 13430242: every card recomputes from cursors 0–3 of the seed, and the payout reconciles exactly: $0.02 (main win) + $0.07 (Mixed Pair 7×) + $0.32 (Three of a Kind 32×) = $0.41. Both side bets hit on the same deal, and every piece matches.
Live GameP=[10H,10C]=20 win · D=[10S,9H]=19 · PP=Mixed Pair 7× · 21+3=Three of a Kind 32× · amount_won=$0.41
VerifierP=[10H,10C]=20 win · D=[10S,9H]=19 · PP=Mixed Pair 7× · 21+3=Three of a Kind 32× · expected=$0.41
Technical Evidence & Verification5 sections
4.15Evidence Coverage Summary11 checks
3 columns
Verification AreaCoverageResult
Anti-circularity (Step 16)Theoretical RTP 99.4296% from the rules and the rank probabilities onlyPass
Exact-rational oracle (Step 16)Engine = oracle within 1e-12 under S17 and H17Pass
External references (Step 16)E14 and E15 reproduced under their own (re-splitting) rulesPass
RTP claim (Step 16)Claim 99.43%; true 99.429612%; −0.000388 pp, inside ±0.1 ppPass
effective_edge field (Step 10)Main 0.1 on 6,000 / 6,000; side bets 0 on 5,800 / 5,800 each; not applied to the handPass
Simulation Pass 1 (Step 17)10M hands, Fisher's p = 0.686432; simulated 99.4670%; 0 / 10 streams flaggedPass
Cherry-pick detection (Step 18)Test C: 7 / 120 flag, fail above 17.75; Test B: 11 / 120, p = 0.038450Pass
Side-bet edge (Step 16)Perfect Pairs exactly 0; 21+3 16 / 1,406,080,000,000Pass
Bet-size invariance (Step 9)200 / 200 Phase E hands at $10Pass
Natural 3:2 (Step 20)260 paid 2.5×, 17 pushedPass
Double payout (Step 21)1,291 / 1,291 rounds; 1,368 doubled handsPass
4.16Code References9 source files
2 columns
FilePurpose
src/optimal-play.tsRecursive infinite-deck RTP engine (computeOptimalRTP, computeAverageWager)
anchor/oracle.pyExact-rational oracle the engine is held to
src/rtp-claim.ts, src/rtp-settings.tsThe RTP claim rule (RTP-CLAIM 1.2.0) and the claim table
src/sidebet-edges.tsExact side-bet edges by enumeration over 52² and 52³ deals
src/simulate.ts, src/cherry-pick.tsSimulation Pass 1 and Pass 2 (Test C, with power)
src/strategy.tsThe strategy the simulation plays
tests/steps/dataset.tsStep 10: the effective_edge field
tests/steps/simulation.tsSteps 16–18: engine, oracle, references and claim; Pass 1; Pass 2
tests/steps/game-specific.tsSteps 20–21: natural 3:2 and doubled hands
4.17Datasets UsedSource artifacts
Analytical reference: the engine's block in outputs/simulation-results.json and the oracle fractions pinned in src/config.ts. No casino data feeds in.
Pass 1 simulation: outputs/simulation-results.json pass1: 10 streams × 1M hands, per-stream RTP, serial and first-card figures, Fisher's p, the convergence series.
Pass 2 simulation: outputs/simulation-results.json pass2: 120 casino seeds × 10,000 nonces, Test C windows and Test B rows.
RTP claim table: outputs/rtp-claim-table.json: the exact RTP against the 99.43% claim, pinned by SHA-256.
Duel's config (E18): evidence/E18-blackjack-config-2026-10-05.json, SHA-256 6e96122e91f13f6687e8118f9f6a55b42c1575f0ed4cbb7c45894b64cabbc192. No step reads it.
Live capture: data/blackjack-dataset-6000hands.json: the effective_edge field and the payouts of naturals and doubled hands.
4.18Verified Invariants11 invariants
2 columns
InvariantResult
The engine reads only rule constants and rank probabilities; no casino inputPass
Engine = exact-rational oracle within 1e-12, 99.4296119877% (S17) and 99.2107894950% (H17)Pass
RTP claim: 99.43% within ±0.1 pp of the true 99.429612%Pass
Pass 1 simulated RTP consistent with the theoretical RTP (99.4670% against 99.4296%)Pass
Fisher's combined p ≥ 0.01 over 10 streams (p = 0.686432)Pass
0 / 10 streams flagged for serial dependencePass
Pass 2 Test C: 7 / 120 flags, below the 17.75 bound; rows equal the replayPass
effective_edge constant (main 0.1, side bets 0) and never applied to a payoutPass
Naturals pay 2.5× (260) or push against a dealer natural (17)Pass
Doubled hands: win 4×, push 2×, loss and bust 0 (1,368 hands)Pass
Perfect Pairs edge exactly 0; 21+3 edge 16 / 1,406,080,000,000 at the captured paytablePass
4.19Reproduction InstructionsRun locally

Clone the repository at the release tag, install, and run the verifier (and optionally the full simulation):

reproduce-s4.sh · 6 lines · Verified
git clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjack && git checkout v1.2.1npm cinpx ts-node src/optimal-play.ts   # the theoretical RTP onlynpm run verifynpm run test:full                 # optional: regenerate the 10M-hand simulation
Expected output, as run at v1.2.1 (lines for this section):

[PASS] Step 9 — Bet-Size Invariance
[PASS] Step 10 — Captured effective_edge Field Consistency
[PASS] Step 16 — Anti-Circularity (Optimal-Play RTP Engine)
[PASS] Step 17 — Simulation Pass 1
[PASS] Step 18 — Pass 2 Cherry-Pick Detection
[PASS] Step 20 — Blackjack Payout (3:2)
[PASS] Step 21 — Double Payout

rtp-claim: ENFORCED — PASS
rtp-claim:   outcome PASS · minimal fix: none — the claim holds for every setting it states a figure for
05

Fairness 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 17 fairness integrity tests covering nonce integrity, seed commitment, outcome determinism, cross-player isolation, payout integrity, and Blackjack-specific multi-step game-state checks. 16 tests passed and 1 is not applicable to this game type.

Fairness Integrity Testing

16pass1N/A

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, card, or hand-total values be injected client-side?
  • Parameter limits — can invalid bet amounts or actions be submitted?
  • Blackjack-specific — do consecutive hit actions advance the cursor correctly? Do parallel hits get rejected?

What this means for you

  • Across the 17 tests we ran, no request a player can send altered, replayed or injected an outcome
  • Once a bet is placed, the 50-card sequence cannot be changed or replayed
  • Each bet is cryptographically unique and isolated
  • Your results are independent of every other player
  • The server rejects malformed, out-of-range, and duplicate requests
16pass1N/A
  • 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, card, or hand-total values be injected client-side?
  • Parameter limits — can invalid bet amounts or actions be submitted?
  • Blackjack-specific — do consecutive hit actions advance the cursor correctly? Do parallel hits get rejected?
4 / 4Nonce Integrity
5 / 5Seed Commitment
1 / 1Outcome Determinism
2 / 2Player Isolation
2 / 2Payout Integrity
2 / 2Game State Integrity (Blackjack-specific)

Category Coverage

Nonce Integrity4/4
Seed Commitment5/5
Outcome Determinism1/1
Player Isolation2/2
Payout Integrity2/2
Game State Integrity (Blackjack-specific)2/2
CheckResultEvidence
Nonce integrityPassSequential, server-controlled, no duplicates across 120 primary seed pairs (7 capture-retry gaps reproduced from the revealed seed) · 7/7 invalid-nonce injections silently ignored, server-assigned nonces continued (98 → 106)
Seed commitment integrityPassLocked at bet acceptance, unique per seed pair — 120/120 primary seed pairs verified · 6/7 adversarial client seeds rejected (HTTP 422); oversized accepted (permissive but safe); 0 cross-account hash collisions across 20 rotations
Outcome determinismPassIdentical inputs produce identical card stream — 6,000 / 6,000 hands recomputed (33,194 cursors); decision-replay coverage provided by FI-BJ-ACTION-001/002
Round & player isolationPassPer-user seeds, serial independence confirmed (10M-round simulation, 0 / 10 streams flagged)
Payout integrityPassInvalid bet amounts rejected (3/3 — negative, oversized, non-numeric); injected payout fields ignored (0/4 honoured); replayed and parallel hit requests correctly handled by a deterministic idempotent response — no extra card drawn and no payout change
Nonce integrityPass
Sequential, server-controlled, no duplicates across 120 primary seed pairs (7 capture-retry gaps reproduced from the revealed seed) · 7/7 invalid-nonce injections silently ignored, server-assigned nonces continued (98 → 106)
Seed commitment integrityPass
Locked at bet acceptance, unique per seed pair — 120/120 primary seed pairs verified · 6/7 adversarial client seeds rejected (HTTP 422); oversized accepted (permissive but safe); 0 cross-account hash collisions across 20 rotations
Outcome determinismPass
Identical inputs produce identical card stream — 6,000 / 6,000 hands recomputed (33,194 cursors); decision-replay coverage provided by FI-BJ-ACTION-001/002
Round & player isolationPass
Per-user seeds, serial independence confirmed (10M-round simulation, 0 / 10 streams flagged)
Payout integrityPass
Invalid bet amounts rejected (3/3 — negative, oversized, non-numeric); injected payout fields ignored (0/4 honoured); replayed and parallel hit requests correctly handled by a deterministic idempotent response — no extra card drawn and no payout change
✓  All Fairness Guarantees Verified

17 fairness integrity tests: 16 PASS + 1 N/A. Two of the passes concern replayed and concurrent hit requests, which the server correctly handles by returning a deterministic idempotent response — identical hand data, no card drawn, no payout effect. Idempotent handling of duplicate requests is the robust, expected behaviour.

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, with Game State Integrity extending the standard matrix to cover Blackjack's multi-step decision surface (hit/stand/double/split). Scope boundary: S5 tests whether fairness guarantees hold under non-standard API interaction. Platform-level infrastructure testing (network configuration, load balancing, deployment integrity) falls outside the audit scope.

3 columns
CategoryTestsWhat It Catches
Nonce Integrity4Sequence gaps, server-side nonce manipulation, session continuity
Seed Commitment5Mid-epoch seed changes, seed reuse, predictable seed generation, cross-account seed pool, weak entropy
Outcome Determinism2Non-deterministic outputs, decision replay (covered for Blackjack by FI-BJ-ACTION tests in Game State Integrity)
Player Isolation2Cross-round correlation, cross-user outcome dependence
Payout Integrity2Parameter enforcement, server-side payout computation
Game State Integrity (BJ-specific)2Cursor advancement on consecutive hits, race-condition handling on parallel hits
5.2Severity Framework & Hard Fail Criteria

Findings are classified by severity. Hard fail criteria — any one triggers a NOT PROVABLY FAIR verdict.

3 columns
SeverityMeaningAction
PASSTest passed — no issue detectedNone
N/ATest not applicable to this game typeNone
FLAGAnomaly detected with no observed operational effect on gameplay; documented for transparencyDisclosed; does not block certification
HARD FAILFairness guarantee cannot be confirmedCertification blocked until remediated
2 columns
ConditionConsequence
Nonce gap or duplicate within epochOutcome sequence integrity broken
Server seed changed mid-epochCommit-reveal guarantee broken
Card recomputation mismatchUndisclosed inputs affecting card draws
Client seed not used in HMACPlayer has no influence on outcomes
Card sequence changes during decision sequencePer-action manipulation possible
Duplicate hit returns a different card on retryMulti-step state corruption (tested by FI-BJ-ACTION-001 and -002)
Injected payout_multiplier, cards, or hand_total honoured by serverClient-side payout fabrication possible
Cross-account hash collisionShared seed pool — outcome correlation across players
Hard fail criteria: Any single hard fail = NOT PROVABLY FAIR. The audit cannot proceed past a hard fail without operator remediation and re-verification.

17 tests · 16 pass · 1 N/A

Nonce Integrity4/4
FI-NONCE-003Pass

An invalid or out-of-sequence nonce sent with a bet is ignored — the server assigns the next nonce itself, so a client cannot choose or skip one

API probe — 7 adversarial nonce values (−1, 0, 999999999, 'abc', INT32_MAX, INT32_MAX+1, 9e18) injected into blackjack bet requests. All 7 silently ignored; server assigned valid sequential nonces. Continuity preserved (baseline 98 → post-test 106); no stack traces leaked.

Seed Commitment5/5
FI-SEED-001Pass

Empty, null, or invalid client seeds are handled deterministically — the server enforces input requirements

API probe — 6/7 invalid client seeds rejected with HTTP 422 (empty, null, special chars, emoji, CJK, whitespace-only). Oversized seed (>1000 chars) accepted — permissive but safe (long entropy is not a security issue). All blackjack bets after each rejection remained functional; no stack traces leaked.

FI-SEED-004Pass

No shared seed pool across users — each player's seeds are independently generated and isolated

API probe — 10 concurrent seed rotations on Account A and 10 on Account B. Zero hash collisions across 20 rotations; all hashes within each account distinct. Full account isolation confirmed.

FI-SEED-005Pass

Server seeds show no correlation with timestamps, sequential patterns, or other predictable inputs

API probe — 10 rotations spaced 5 seconds apart over ~51 seconds. All 10 server seed hashes distinct; no two shared 6+ leading hex characters. Time-correlated derivation ruled out.

Outcome Determinism2/2
FI-OUTCOME-002N/A

A completed bet cannot be replayed to generate a duplicate payout — card sequence is cryptographically fixed at bet time and decision actions consume cards from a fixed sequence they cannot alter

Card sequence determinism is established by FI-OUTCOME-001 (6,000/6,000 reproducible from seeds). The remaining surface — adversarial decision replay (e.g., re-submitting hit to double-credit) — is fully covered for Blackjack by FI-BJ-ACTION-001 (consecutive-hit cursor advancement) and FI-BJ-ACTION-002 (parallel-hit race detection). No separate decision-replay test is needed for this game.

Player Isolation2/2
FI-ISO-002Pass

One player's seeds, nonces, and outcomes cannot be observed or influenced by another player — complete cross-user isolation

Follows from seed uniqueness (FI-SEED-003) — if each user has a unique server seed, outcomes are isolated by construction. Confirmed by FI-SEED-004 — zero hash collisions across 20 cross-account rotations.

Payout Integrity2/2
FI-PAYOUT-001Pass

Game parameters cannot exceed defined limits — negative, oversized and non-numeric bet amounts are rejected; an unknown action field, or an action on a finished hand, is ignored and changes nothing

API probe — 3/3 invalid bet amounts rejected (negative HTTP 422, oversized HTTP 422, non-numeric 'abc' HTTP 400). Bet amounts of 0 (numeric) and '0' (string) accepted as free-play, consistent with the casino's zero-stake mode. Invalid action="cheat" field silently ignored, hit processed normally. An extra hit request sent after the hand auto-closed at 21 was accepted with HTTP 200 and returned a "Round data mismatch" echo — same hand data as the closed state, no card drawn, no payout altered. Returning a deterministic idempotent response to a redundant request is correct, robust behaviour with no fairness or integrity impact.

FI-PAYOUT-002Pass

Multiplier, card, hand-total, and dealer-bust fields in the API request are ignored — the server computes all values from the seed pair

API probe — 4 injected fields (payout_multiplier='9999', cards=["AC","KC"] to force a blackjack, hand_total=21, dealer_bust=true) all silently ignored. Server computed cards and outcome independently from the seed pair on every request. noInjectionHonoured = true.

Game State Integrity (Blackjack-specific)2/2
FI-BJ-ACTION-001Pass

Sending the same action (hit) twice in sequence does not skip cards or corrupt state — each hit advances the cursor by exactly 1

API probe — bet placed (initial deal, hand size 2, value 10), first hit returned 2S (hand size 3, value 12), second hit returned 3H (hand size 4, value 15). Both cards distinct, hand sizes incremented correctly, hand values plausible. Cursor advancement verified end-to-end.

FI-BJ-ACTION-002Pass

Two identical HIT requests fired in parallel must resolve to a single deterministic outcome — no race-condition double-card-draw

API probe — bet placed, two identical HIT requests fired simultaneously via Promise.all. Both accepted with HTTP 200 rather than one being rejected. Both responses returned the same card (8S) with the same hand size (3), consistent with the "Round data mismatch" echo behaviour observed in FI-PAYOUT-001. No second card was physically drawn from the sequence: the two concurrent requests collapse to one deterministic idempotent result. This is the correct, more robust design — rejecting one request would create client ambiguity under normal network retries — with no fairness or integrity impact.

Technical Evidence & Verification4 sections
5.3Coverage Summary17 checks
4 columns
Test IDCategoryVerification SourceStatus
FI-NONCE-001NonceS1, Step 4 (data-driven)Pass
FI-NONCE-002NonceS1, Step 4 (data-driven)Pass
FI-NONCE-003NonceAPI probePass
FI-NONCE-004NonceS1, Step 4 (data-driven)Pass
FI-SEED-001SeedAPI probePass
FI-SEED-002SeedS1, Steps 3 & 6 (data-driven)Pass
FI-SEED-003SeedS1, Step 1 (data-driven)Pass
FI-SEED-004SeedAPI probePass
FI-SEED-005SeedAPI probePass
FI-OUTCOME-001DeterminismS3, Step 5 (data-driven)Pass
FI-OUTCOME-002DeterminismCovered by FI-BJ-ACTION-001/002 (Game State Integrity)N/A
FI-ISO-001IsolationS2, Step 17 (simulation)Pass
FI-ISO-002IsolationStructural — seed uniquenessPass
FI-PAYOUT-001PayoutAPI probePass
FI-PAYOUT-002PayoutAPI probePass
FI-BJ-ACTION-001Game StateAPI probePass
FI-BJ-ACTION-002Game StateAPI probePass
Method breakdown: 9 tests verified via the verification suite steps and structural analysis; 8 tests verified via direct API probes against the running game. The Blackjack-specific game-state tests (FI-BJ-ACTION-001, FI-BJ-ACTION-002) cover the multi-step decision surface — consecutive hits and parallel hits respectively — and are grouped under Game State Integrity. 16 of 17 tests are PASS; 1 (FI-OUTCOME-002) is not applicable to this game type. The two replay/concurrency cases pass because the server returns a deterministic idempotent response — the robust, correct behaviour.
5.4Additional Integrity Evidence (S1–S4)8 records
3 columns
PropertySourceFinding
120/120 seed hashes verifiedS1, Step 1Commit-reveal chain intact
120/120 commitment links verified (nextServerSeedHash → next epoch's serverSeedHashed)S1, Step 2Seed rotation chain intact
6,000/6,000 exact parity (33,194 cursors)S3, Step 5No post-RNG conditional logic; card stream fixed at bet time
Anti-circularity proven (recursive infinite-deck enumeration)S4, Step 1699.4296% optimal-play RTP from rules + 13-rank P, no casino input
11/120 cherry-pick flags · binomial p = 0.038450S4, Step 18 (Pass 2)Above α = 0.01 dataset reject threshold; no seed pre-selection evidence
100% client seed influence (6,000/6,000 initial deals)S1, Step 6Player entropy is genuine
269/269 split-bet multiset checks · 1,291/1,291 doubled bets reconcile (1,368 doubled hands)S3, Steps 22 & 24 · S4, Step 21Multi-step payout integrity intact across split, double, and side-bet outcomes
260/260 natural blackjack 3:2 payoutsS4, Step 20Natural-21 payout ratio correct in every observed instance
5.5Scope

This certification covers the 17 fairness integrity tests listed above — the minimum required to verify that the provably fair implementation holds up under non-standard conditions, including two Blackjack-specific multi-step state integrity tests under Game State Integrity. This is not a penetration test. It focuses specifically on the provably fair implementation — not the operator's broader platform security.

Standard scope: The 17 tests above are our standard Blackjack fairness integrity matrix. The base list is applied to every game we audit, with per-game adaptations where a test does not apply (e.g., FI-OUTCOME-002 decision-replay is fully covered for Blackjack by FI-BJ-ACTION-001/002) and additions where multi-step game state requires extra coverage. Blackjack includes FI-BJ-ACTION-001 (consecutive-hit cursor advancement) and FI-BJ-ACTION-002 (parallel-hit race) which are not applicable to single-step games.

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 (2026-05-09). Post-audit changes require re-certification. The idempotency and post-close handling of the bet/hit/stand endpoints in particular should be re-tested if any change touches them.

5.6Reproduction InstructionsRun locally

Data-driven tests (9 of 17): Fully reproducible from the open-source verification repo. These tests run against the captured dataset and produce deterministic results.

API probe tests (8 of 17): Verified by issuing live adversarial requests against the running game. Per-test evidence (HTTP status codes, server-assigned nonces, seed hashes, server-computed multipliers, card-stream decisions) 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.

reproduce-s5-data.sh · 4 lines · Verified
git clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjack && git checkout v1.2.1npm cinpm run verify
Expected 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 — Card Recomputation (declared draw order)  → FI-OUTCOME-001
[PASS] Step 6 — Client Seed Influence                     → FI-SEED-002
[PASS] Step 17 — Simulation Pass 1                        → FI-ISO-001
[PASS] Step 22 — Split Draw Order (declared, strict)      → FI-OUTCOME-001 (split)

API Probe Tests (completed):

fi-api-probes.sh
[PASS] FI-NONCE-003       — Invalid nonce handling          → 7/7 invalid nonces ignored (HTTP 200), continuity 98 → 106[PASS] FI-SEED-001        — Invalid client seed handling    → 6/7 rejected HTTP 422; oversized accepted (permissive)[PASS] FI-SEED-004        — Cross-user seed pool check      → 0/20 collisions across 2 accounts[PASS] FI-SEED-005        — Seed timing analysis            → 10 distinct hashes, no time correlation[PASS] FI-PAYOUT-001      — Parameter limits + post-close hit → 3/3 invalid amounts rejected; post-close hit idempotently echoed (no card, no payout change)[PASS] FI-PAYOUT-002      — Field injection handling        → 0 injections honoured (multiplier, cards, hand_total, dealer_bust)[PASS] FI-BJ-ACTION-001   — Consecutive hit cursor advance  → cursor +1 each, 2S → 3H, hand 10 → 12 → 15[PASS] FI-BJ-ACTION-002   — Parallel hit idempotency         → concurrent hits collapse to one deterministic result, same card 8S (no second draw)
API probes: All 8 API probe tests completed. Per-test evidence — requests, server responses, HTTP status codes, server-assigned nonces and seed hashes, multiplier values, card-stream decisions — is retained in our private adversarial-testing archive and summarised in the integrity test review document. The testing harness itself is kept private; per-test evidence is available to operators and regulators on request.
06

Player Verification

Can a player verify their own bets without trusting anyone?

Every Blackjack hand can be checked from public inputs. Save the hashed server seed before you bet. After you rotate, compare the revealed seed's hash with your saved copy, then recompute the cards. This section walks through it, with the ProvablyFair.org verifier, whose code the package pins and runs on all 6,000 captured rounds (Step 38).

Independent Result Verification

4 Stepsto verify any hand

Key principles

  • Save the hashed server seed before you bet: your saved copy is what proves the timing
  • Every hand can be reproduced from the server seed, client seed, nonce and your actions
  • If your recomputed cards match the ones you saw, the cards were the committed ones
  • Every captured hand paid standard odds and every side bet its full multiplier

What you need

  • Server Seed — revealed after seed rotation (casino entropy)
  • Client Seed — your player-controlled seed
  • Nonce — the hand number in sequence (one per hand, not per action)
  • Your actions — hit, stand, double and split in order, to replay which cards each hand drew
4 Stepsto verify any hand
  • Save the hashed server seed before you bet: your saved copy is what proves the timing
  • Every hand can be reproduced from the server seed, client seed, nonce and your actions
  • If your recomputed cards match the ones you saw, the cards were the committed ones
  • Every captured hand paid standard odds and every side bet its full multiplier
From Bet to Independent Verification — 5 steps: save the hash and bet, see and play the hand, rotate the seed, verify — illustrated flow
Server SeedRevealed after rotation
Client SeedPlayer-controlled input
NonceRecorded bet sequence
Your actionshit, stand, double and split in order, to replay which cards each hand drew
  1. 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. 2

    Play, Then Rotate

    Play your hands. When you're done, rotate the seed pair to reveal the server seed.

  3. 3

    Open a Past Hand

    Open the hand from Transactions. It shows the client seed, the revealed server seed and the nonce.

  4. 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 cards and compare them with the ones you saw.

Visual Walkthroughstep-by-step
6.1Step 1: Play a Blackjack Hand

Choose your stake, and the side bets if you want them, and deal. Every card of the hand is fixed by the seeds, the nonce and its cursor before the deal animation plays: the first four are your first card, the dealer's up-card, your second card and the hole card. Hits, doubles and splits draw the next cursors in order. Your decisions don't change which cards come out, only how many are used.

Illustrative: Duel.com Blackjack — the table with the dealer's and player's hands, the side-bet toggle and the stake selector. The "Zero Edge" label is noted, not tested.

Illustrative: Duel.com Blackjack — the table with the dealer's and player's hands, the side-bet toggle and the stake selector. The "Zero Edge" label is noted, not tested.

6.2Step 2: Open the Fairness Modal

Open the Provably Fair panel on the game page. You'll see the active client seed, the hashed server seed (the casino's commitment) and your current nonce. Copy the hashed server seed now, before you bet, and keep it outside Duel: it is your proof of when the seed was fixed. You can also set the client seed for the next pair. Clicking "Rotate seed" retires the active pair and reveals its server seed for your past hands.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action.

6.3Step 3: Open a Past Hand

Open Transactions and click a past Blackjack round. It shows the revealed server seed with the client seed and nonce, and the hands as dealt. SHA-256 of the hex-decoded revealed seed must equal the hash you saved in Step 2:

Server Seed (revealed) — the plaintext value the casino committed to before your hand. Hash it and compare with the commitment you saved before betting.

Client Seed — your player-controlled entropy input.

Nonce — the hand number for this seed pair, one per hand.

Per-hand transaction record — revealed server seed, client seed, nonce and the hands as dealt (account details masked).

Per-hand transaction record — revealed server seed, client seed, nonce and the hands as dealt (account details masked).

6.4Step 4: Recompute & Confirm

Click Verify to open the Provably Fair page with the seeds filled in. It recomputes the cards from the disclosed inputs and shows the result. If every card matches what you saw at the table (the deal, every hit, double and split card, and the dealer's draws), and the hash matches your saved copy, the hand was dealt from the committed seed. Duel's Verify button is the casino's own tool and was not itself tested; for a check that doesn't rely on it, paste the same inputs into provablyfair.org/verify-bets/duel.

Provably Fair page — seeds filled in from the transaction record, recomputed cards shown inline.

Provably Fair page — seeds filled in from the transaction record, recomputed cards shown inline.

Manual Verification (Advanced)7 sections
6.5Why Manual Verification Matters

True provably fair verification means you don't have to trust any casino-provided tool. Recomputing on your own machine rules out a tampered verifier and shows exactly how each card is drawn. For Blackjack it also lets you check every card you saw, not just the deal: hits, doubles, both split hands and the dealer's draws.

6.6How the Algorithm Works (Plain English)6 records

Before you play, every card of the hand is fixed by three ingredients:

  • The server's secret seed — committed by showing its hash before you bet
  • Your client seed — generated in your browser by default, or set by you
  • The nonce — a counter that makes each hand unique

Each card: HMAC-SHA256 runs on the hex-decoded server seed with the message clientSeed:nonce:cursor. The 32-byte result is read as eight 4-byte numbers, and the first one below MAX_FAIR = 4,294,967,248 (52 × ⌊2³² / 52⌋) is taken modulo 52 to pick from the 52 cards [2D, 2H, 2S, 2C, 3D, …, AS, AC]. Every card has probability exactly 1/52, and a card can repeat within a hand. Cursors map to the hand like this:

2 columns
CursorRole
0Your first card
1Dealer up-card
2Your second card
3Dealer hole card (turned over at play-out)
4, 5, …Your draws in order, then the dealer's
After a split4 = hand 1's second card, 5 = hand 2's; then hand 1 plays, then hand 2, then the dealer

Because the server committed to its seed before you sent your client seed, it can't change the cards afterwards. Your hit, stand, double and split choices only decide how many cursors are used. The rules then settle the hand: win 2×, natural 2.5×, push 1×, doubled 4× / 2×, each split hand on its own.

6.7Casino Verifier vs ProvablyFair.org Verifier5 records

Two verification tools are available. Both should produce identical results — if they don't, something has changed.

3 columns
Duel.com VerifierProvablyFair.org Verifier
SourceCasino-controlledIndependent (audit codebase)
Accessduel.com/provably-fair/verifyprovablyfair.org/verify-bets/duel
Checked by this auditDuel's Verify-tab code, run unmodified as a cross-check on 6,000 rounds: 300,000 / 300,000 cursors agreeSame code Step 38 runs on 6,000 rounds: 0 differ
Trust modelRequires trusting the casinoOpen-source, version-controlled
ShowsThe card streamThe card stream: your two cards, the dealer's two and the next 20
6.8JavaScript Verification Script

Run this in Node.js to verify any hand. It checks the commitment against the hash you saved, recomputes the cards as the specification describes, replays your actions under Duel's rules (split order included), and works out amount_won exactly, side bets included. It reproduces all 6,000 captured hands: every card, result and payout.

verify-blackjack.js · Standalone Node.js
// verify-blackjack.js: check one Blackjack hand on Duel.com. Node 18+, no install.const crypto = require('crypto'); // ── Your hand (example: captured hand 13419067, a split round) ─────────────const serverSeed = '306d29e25ef7d076d1085071808420823ad2596e049af39aa41284d3b5ac6643'; // revealed after rotationconst savedCommitment = '27674345267704331cc6f6f2ee91e94ca47d2d1076774a75b2191a7ec9b2fddd'; // the hash you saved BEFORE bettingconst clientSeed = 'pf_hc9GvK8F3fFn7';const nonce = 45;const actions = ['split', 'double', 'double']; // your actions, in orderconst stake = '0.01';                           // main betconst sideStakes = { perfectPairs: '0.01', twentyOnePlus3: '0.01' }; // '0' if not placed // ── The draw: one HMAC-SHA256 per card ─────────────────────────────────────const CARDS = [];for (const r of ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']) for (const s of ['D', 'H', 'S', 'C']) CARDS.push(r + s);const MAX_FAIR = 4294967248; // 52 × 82,595,524const key = Buffer.from(serverSeed, 'hex'); // hex-decoded, not the textfunction card(cursor) {  const h = crypto.createHmac('sha256', key).update(`${clientSeed}:${nonce}:${cursor}`).digest();  for (let i = 0; i < 32; i += 4) { const v = h.readUInt32BE(i); if (v < MAX_FAIR) return CARDS[v % 52]; }  throw new Error('all eight chunks rejected');}const rank = (c) => c.slice(0, -1), suit = (c) => c.slice(-1);function total(cards) {  let t = 0, aces = 0;  for (const c of cards) { const r = rank(c); if (r === 'A') { t += 11; aces++; } else t += ['10', 'J', 'Q', 'K'].includes(r) ? 10 : Number(r); }  while (t > 21 && aces) { t -= 10; aces--; }  return t;}const natural = (cs) => cs.length === 2 && total(cs) === 21; // 1. The commitment: SHA-256 of the 32 decoded bytesconst commitment = crypto.createHash('sha256').update(key).digest('hex');console.log('commitment matches your saved copy:', commitment === savedCommitment); // 2. Replay the round under Duel's rules: peek, S17, split once, DAS, split aces one cardconst acts = actions.filter((a) => a !== 'insurance' && a !== 'no_insurance'); // insurance is not coveredlet cursor = 0;const next = () => card(cursor++);const p1 = next(), up = next(), p2 = next(), hole = next(); // cursors 0, 1, 2, 3const dealer = [up, hole];let hands = [{ cards: [p1, p2], doubled: false }], split = false, i = 0;if (!natural([p1, p2]) && !natural(dealer)) {     // a natural on either side ends the round  if (acts[0] === 'split') {                       // cursor 4 to hand 1, cursor 5 to hand 2    split = true; i = 1;    hands = [{ cards: [p1, next()], doubled: false }, { cards: [p2, next()], doubled: false }];  }  for (const h of hands) {    if (split && rank(p1) === 'A') break;          // split aces take one card each    while (total(h.cards) < 21) {                  // 21 stands automatically      const a = acts[i++];      if (a === 'hit') h.cards.push(next());      else if (a === 'double') { h.cards.push(next()); h.doubled = true; break; }      else break;                                  // stand    }  }  if (hands.some((h) => total(h.cards) <= 21)) while (total(dealer) < 17) dealer.push(next()); // stands on all 17s} // 3. Settle each hand: gross return in halves of the hand's stakeconst dn = natural(dealer.slice(0, 2)), d = total(dealer);const results = hands.map((h) => {  const t = total(h.cards), w = h.doubled ? 2n : 1n;  if (!split && natural(h.cards)) return dn ? ['push', 2n] : ['blackjack', 5n]; // 3:2  if (dn) return ['lose', 0n];  if (t > 21) return ['bust', 0n];  if (d > 21 || t > d) return ['win', 4n * w];  if (t === d) return ['push', 2n * w];  return ['lose', 0n];}); // 4. Side bets on your two cards and the dealer's up-card (multipliers are total returns)const red = (c) => suit(c) === 'D' || suit(c) === 'H';function perfectPairs(a, b) {  if (rank(a) !== rank(b)) return null;  if (suit(a) === suit(b)) return 'perfect pair';  return red(a) === red(b) ? 'coloured pair' : 'mixed pair';}function twentyOnePlus3(a, b, c) {  const ORDER = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'];  const v = [a, b, c].map((x) => ORDER.indexOf(rank(x)) + 2).sort((x, y) => x - y);  const flush = suit(a) === suit(b) && suit(b) === suit(c), trips = v[0] === v[2];  const straight = new Set(v).size === 3 && (v[2] - v[0] === 2 || v.join() === '2,3,14');  if (trips && flush) return 'suited trips';  if (straight && flush) return 'straight flush';  if (trips) return 'three of a kind';  if (straight) return 'straight';  return flush ? 'flush' : null;}const PAY = { 'perfect pair': [27n, 1n], 'coloured pair': [11n, 1n], 'mixed pair': [7n, 1n], 'suited trips': [1212307692n, 10000000n],  'straight flush': [53n, 1n], 'three of a kind': [32n, 1n], 'straight': [12n, 1n], 'flush': [5n, 1n] }; // 5. The payout, exactly, in 1e-18 unitsconst units = (s) => { const [w, f = ''] = s.split('.'); return BigInt(w) * 10n ** 18n + BigInt((f + '0'.repeat(18)).slice(0, 18)); };const show = (u) => { const s = u.toString().padStart(19, '0'); return (s.slice(0, -18) + '.' + s.slice(-18)).replace(/\.?0+$/, ''); };let won = units(stake) * results.reduce((sum, r) => sum + r[1], 0n) / 2n;const pp = perfectPairs(p1, p2), t3 = twentyOnePlus3(p1, p2, up);if (pp) won += units(sideStakes.perfectPairs) * PAY[pp][0] / PAY[pp][1];if (t3) won += units(sideStakes.twentyOnePlus3) * PAY[t3][0] / PAY[t3][1]; console.log('you', p1, p2, '| dealer', up, '(hole', hole + ')');hands.forEach((h, k) => console.log(`hand ${k + 1}:`, h.cards.join(' '), '=', total(h.cards), h.doubled ? 'doubled' : '', '→', results[k][0]));console.log('dealer:', dealer.join(' '), '=', total(dealer));console.log('side bets: Perfect Pairs', pp || 'none', '· 21+3', t3 || 'none');console.log('amount_won:', show(won));
6.9Python Verification Script

The same verification in Python (standard library only):

verify_blackjack.py · Standalone Python
# verify_blackjack.py: check one Blackjack hand on Duel.com. Python 3, standard library only.import hashlib, hmacfrom decimal import Decimalfrom fractions import Fraction # ── Your hand (example: captured hand 13419067, a split round) ─────────────server_seed = '306d29e25ef7d076d1085071808420823ad2596e049af39aa41284d3b5ac6643'  # revealed after rotationsaved_commitment = '27674345267704331cc6f6f2ee91e94ca47d2d1076774a75b2191a7ec9b2fddd'  # the hash you saved BEFORE bettingclient_seed = 'pf_hc9GvK8F3fFn7'nonce = 45actions = ['split', 'double', 'double']  # your actions, in orderstake = '0.01'                           # main betside_stakes = {'perfect_pairs': '0.01', 'twenty_one_plus_3': '0.01'}  # '0' if not placed # ── The draw: one HMAC-SHA256 per card ─────────────────────────────────────RANKS = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']CARDS = [r + s for r in RANKS for s in 'DHSC']MAX_FAIR = 4294967248  # 52 × 82,595,524key = bytes.fromhex(server_seed)  # hex-decoded, not the text def card(cursor):    h = hmac.new(key, f'{client_seed}:{nonce}:{cursor}'.encode(), hashlib.sha256).digest()    for i in range(0, 32, 4):        v = int.from_bytes(h[i:i + 4], 'big')        if v < MAX_FAIR:            return CARDS[v % 52]    raise ValueError('all eight chunks rejected') def rank(c): return c[:-1]def suit(c): return c[-1] def total(cards):    t, aces = 0, 0    for c in cards:        r = rank(c)        if r == 'A': t, aces = t + 11, aces + 1        else: t += 10 if r in ('10', 'J', 'Q', 'K') else int(r)    while t > 21 and aces:        t, aces = t - 10, aces - 1    return t def natural(cs): return len(cs) == 2 and total(cs) == 21 # 1. The commitment: SHA-256 of the 32 decoded bytesprint('commitment matches your saved copy:', hashlib.sha256(key).hexdigest() == saved_commitment) # 2. Replay the round under Duel's rules: peek, S17, split once, DAS, split aces one cardacts = [a for a in actions if a not in ('insurance', 'no_insurance')]  # insurance is not coveredcursor = 0def nxt():    global cursor    cursor += 1    return card(cursor - 1)p1, up, p2, hole = nxt(), nxt(), nxt(), nxt()  # cursors 0, 1, 2, 3dealer = [up, hole]hands, split, i = [{'cards': [p1, p2], 'doubled': False}], False, 0if not natural([p1, p2]) and not natural(dealer):  # a natural on either side ends the round    if acts[:1] == ['split']:                       # cursor 4 to hand 1, cursor 5 to hand 2        split, i = True, 1        hands = [{'cards': [p1, nxt()], 'doubled': False}, {'cards': [p2, nxt()], 'doubled': False}]    for h in hands:        if split and rank(p1) == 'A':               # split aces take one card each            break        while total(h['cards']) < 21:               # 21 stands automatically            a = acts[i]; i += 1            if a == 'hit': h['cards'].append(nxt())            elif a == 'double':                h['cards'].append(nxt()); h['doubled'] = True; break            else: break                             # stand    if any(total(h['cards']) <= 21 for h in hands):        while total(dealer) < 17:                   # stands on all 17s            dealer.append(nxt()) # 3. Settle each hand: gross return in units of the hand's stakedn, d = natural(dealer[:2]), total(dealer)def settle(h):    t, w = total(h['cards']), 2 if h['doubled'] else 1    if not split and natural(h['cards']): return ('push', Fraction(1)) if dn else ('blackjack', Fraction(5, 2))  # 3:2    if dn: return ('lose', Fraction(0))    if t > 21: return ('bust', Fraction(0))    if d > 21 or t > d: return ('win', Fraction(2 * w))    if t == d: return ('push', Fraction(w))    return ('lose', Fraction(0))results = [settle(h) for h in hands] # 4. Side bets on your two cards and the dealer's up-card (multipliers are total returns)def red(c): return suit(c) in 'DH'def perfect_pairs(a, b):    if rank(a) != rank(b): return None    if suit(a) == suit(b): return 'perfect pair'    return 'coloured pair' if red(a) == red(b) else 'mixed pair'def twenty_one_plus_3(a, b, c):    v = sorted(RANKS.index(rank(x)) + 2 for x in (a, b, c))    flush, trips = suit(a) == suit(b) == suit(c), v[0] == v[2]    straight = len(set(v)) == 3 and (v[2] - v[0] == 2 or v == [2, 3, 14])    if trips and flush: return 'suited trips'    if straight and flush: return 'straight flush'    if trips: return 'three of a kind'    if straight: return 'straight'    return 'flush' if flush else NonePAY = {'perfect pair': Fraction(27), 'coloured pair': Fraction(11), 'mixed pair': Fraction(7),       'suited trips': Fraction('121.2307692'), 'straight flush': Fraction(53), 'three of a kind': Fraction(32),       'straight': Fraction(12), 'flush': Fraction(5)} # 5. The payout, exactlywon = Fraction(stake) * sum(r[1] for r in results)pp, t3 = perfect_pairs(p1, p2), twenty_one_plus_3(p1, p2, up)if pp: won += Fraction(side_stakes['perfect_pairs']) * PAY[pp]if t3: won += Fraction(side_stakes['twenty_one_plus_3']) * PAY[t3] print('you', p1, p2, '| dealer', up, f'(hole {hole})')for k, (h, r) in enumerate(zip(hands, results), 1):    print(f'hand {k}:', ' '.join(h['cards']), '=', total(h['cards']), 'doubled' if h['doubled'] else '', '→', r[0])print('dealer:', ' '.join(dealer), '=', total(dealer))print('side bets: Perfect Pairs', pp or 'none', '· 21+3', t3 or 'none')print('amount_won:', format((Decimal(won.numerator) / Decimal(won.denominator)).normalize(), 'f'))
What it prints for the example: commitment matches your saved copy: True; you 7H 7S, dealer 5H with the hole 2D; hand 1 7H 2D 2D = 11, doubled, loses; hand 2 7S 4D KC = 21, doubled, wins; dealer 5H 2D JS = 17; Perfect Pairs a mixed pair; amount_won: 0.11. Those are the cards and the amount Duel served for hand 13419067.
6.10Payouts and Stake Tiers

Every captured hand paid standard odds (win 2×, natural 2.5×, push 1×, doubled 4× / 2×) and every side bet its full multiplier (Perfect Pairs 27 / 11 / 7; 21+3 121.2307692 / 53 / 32 / 12 / 5), and the scripts above use exactly those. Duel's config as fetched on 5 October 2026 (E18) scales the edge with stake: its first Perfect Pairs tier already pays 26.973 / 10.989 / 6.993, its zero-edge 21+3 tier ends at $0.0124, and the main bet runs from 0.1% to 0.57%. Duel describes the main-bet figure as a net edge after rakeback. That pricing was not verified, so if your side-bet payout differs from the scripts, check the config for your stake.

Insurance: The scripts don't settle insurance, which the capture never took.
6.11Evidence Screenshots9 records
2 columns
EvidenceDescription
E03Duel's fairness page: the commit-reveal scheme with HMAC-SHA256
E04Duel's verify page with Blackjack selected; its code panel is E17
E05Illustrative: the in-game Provably Fair panel with the active hashed server seed, client seed and nonce
E06Bet history: a player can list their own hands with bet IDs, wagers and payouts
E07Illustrative: the Rotate seed control with the next seed's commitment, "Next server seed (Hashed)"
E12A player-set client seed (pfaudit_bj_seed01) accepted as typed
E13Duel's browser seed generator: 16 characters from a 63-character alphabet, rejection-sampled crypto.getRandomValues
E17Duel's Blackjack Verify-tab code, copied 25 September 2026 and run unmodified as a cross-check
E18Duel's Blackjack config as fetched 5 October 2026: side-bet multipliers and the stake ladders
From Bet to Independent Verification — 5 steps: save the hash and bet, see and play the hand, rotate the seed, verify — illustrated flow
How it works
  1. 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. 2

    Play, Then Rotate

    Play your hands. When you're done, rotate the seed pair to reveal the server seed.

  3. 3

    Open a Past Hand

    Open the hand from Transactions. It shows the client seed, the revealed server seed and the nonce.

  4. 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 cards and compare them with the ones you saw.

Visual Walkthroughstep-by-step
6.1Step 1: Play a Blackjack Hand

Choose your stake, and the side bets if you want them, and deal. Every card of the hand is fixed by the seeds, the nonce and its cursor before the deal animation plays: the first four are your first card, the dealer's up-card, your second card and the hole card. Hits, doubles and splits draw the next cursors in order. Your decisions don't change which cards come out, only how many are used.

Illustrative: Duel.com Blackjack — the table with the dealer's and player's hands, the side-bet toggle and the stake selector. The "Zero Edge" label is noted, not tested.

Illustrative: Duel.com Blackjack — the table with the dealer's and player's hands, the side-bet toggle and the stake selector. The "Zero Edge" label is noted, not tested.

6.2Step 2: Open the Fairness Modal

Open the Provably Fair panel on the game page. You'll see the active client seed, the hashed server seed (the casino's commitment) and your current nonce. Copy the hashed server seed now, before you bet, and keep it outside Duel: it is your proof of when the seed was fixed. You can also set the client seed for the next pair. Clicking "Rotate seed" retires the active pair and reveals its server seed for your past hands.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action.

Illustrative: Provably Fair panel — active client seed, hashed server seed, nonce, new client seed, next pair commitment and the Rotate seed action.

6.3Step 3: Open a Past Hand

Open Transactions and click a past Blackjack round. It shows the revealed server seed with the client seed and nonce, and the hands as dealt. SHA-256 of the hex-decoded revealed seed must equal the hash you saved in Step 2:

Server Seed (revealed) — the plaintext value the casino committed to before your hand. Hash it and compare with the commitment you saved before betting.

Client Seed — your player-controlled entropy input.

Nonce — the hand number for this seed pair, one per hand.

Per-hand transaction record — revealed server seed, client seed, nonce and the hands as dealt (account details masked).

Per-hand transaction record — revealed server seed, client seed, nonce and the hands as dealt (account details masked).

6.4Step 4: Recompute & Confirm

Click Verify to open the Provably Fair page with the seeds filled in. It recomputes the cards from the disclosed inputs and shows the result. If every card matches what you saw at the table (the deal, every hit, double and split card, and the dealer's draws), and the hash matches your saved copy, the hand was dealt from the committed seed. Duel's Verify button is the casino's own tool and was not itself tested; for a check that doesn't rely on it, paste the same inputs into provablyfair.org/verify-bets/duel.

Provably Fair page — seeds filled in from the transaction record, recomputed cards shown inline.

Provably Fair page — seeds filled in from the transaction record, recomputed cards shown inline.

Technical evidence
6.5Why Manual Verification Matters

True provably fair verification means you don't have to trust any casino-provided tool. Recomputing on your own machine rules out a tampered verifier and shows exactly how each card is drawn. For Blackjack it also lets you check every card you saw, not just the deal: hits, doubles, both split hands and the dealer's draws.

6.6How the Algorithm Works (Plain English)6 records

Before you play, every card of the hand is fixed by three ingredients:

  • The server's secret seed — committed by showing its hash before you bet
  • Your client seed — generated in your browser by default, or set by you
  • The nonce — a counter that makes each hand unique

Each card: HMAC-SHA256 runs on the hex-decoded server seed with the message clientSeed:nonce:cursor. The 32-byte result is read as eight 4-byte numbers, and the first one below MAX_FAIR = 4,294,967,248 (52 × ⌊2³² / 52⌋) is taken modulo 52 to pick from the 52 cards [2D, 2H, 2S, 2C, 3D, …, AS, AC]. Every card has probability exactly 1/52, and a card can repeat within a hand. Cursors map to the hand like this:

2 columns
CursorRole
0Your first card
1Dealer up-card
2Your second card
3Dealer hole card (turned over at play-out)
4, 5, …Your draws in order, then the dealer's
After a split4 = hand 1's second card, 5 = hand 2's; then hand 1 plays, then hand 2, then the dealer

Because the server committed to its seed before you sent your client seed, it can't change the cards afterwards. Your hit, stand, double and split choices only decide how many cursors are used. The rules then settle the hand: win 2×, natural 2.5×, push 1×, doubled 4× / 2×, each split hand on its own.

6.7Casino Verifier vs ProvablyFair.org Verifier5 records

Two verification tools are available. Both should produce identical results — if they don't, something has changed.

3 columns
Duel.com VerifierProvablyFair.org Verifier
SourceCasino-controlledIndependent (audit codebase)
Accessduel.com/provably-fair/verifyprovablyfair.org/verify-bets/duel
Checked by this auditDuel's Verify-tab code, run unmodified as a cross-check on 6,000 rounds: 300,000 / 300,000 cursors agreeSame code Step 38 runs on 6,000 rounds: 0 differ
Trust modelRequires trusting the casinoOpen-source, version-controlled
ShowsThe card streamThe card stream: your two cards, the dealer's two and the next 20
6.8JavaScript Verification Script

Run this in Node.js to verify any hand. It checks the commitment against the hash you saved, recomputes the cards as the specification describes, replays your actions under Duel's rules (split order included), and works out amount_won exactly, side bets included. It reproduces all 6,000 captured hands: every card, result and payout.

verify-blackjack.js · Standalone Node.js
// verify-blackjack.js: check one Blackjack hand on Duel.com. Node 18+, no install.const crypto = require('crypto'); // ── Your hand (example: captured hand 13419067, a split round) ─────────────const serverSeed = '306d29e25ef7d076d1085071808420823ad2596e049af39aa41284d3b5ac6643'; // revealed after rotationconst savedCommitment = '27674345267704331cc6f6f2ee91e94ca47d2d1076774a75b2191a7ec9b2fddd'; // the hash you saved BEFORE bettingconst clientSeed = 'pf_hc9GvK8F3fFn7';const nonce = 45;const actions = ['split', 'double', 'double']; // your actions, in orderconst stake = '0.01';                           // main betconst sideStakes = { perfectPairs: '0.01', twentyOnePlus3: '0.01' }; // '0' if not placed // ── The draw: one HMAC-SHA256 per card ─────────────────────────────────────const CARDS = [];for (const r of ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']) for (const s of ['D', 'H', 'S', 'C']) CARDS.push(r + s);const MAX_FAIR = 4294967248; // 52 × 82,595,524const key = Buffer.from(serverSeed, 'hex'); // hex-decoded, not the textfunction card(cursor) {  const h = crypto.createHmac('sha256', key).update(`${clientSeed}:${nonce}:${cursor}`).digest();  for (let i = 0; i < 32; i += 4) { const v = h.readUInt32BE(i); if (v < MAX_FAIR) return CARDS[v % 52]; }  throw new Error('all eight chunks rejected');}const rank = (c) => c.slice(0, -1), suit = (c) => c.slice(-1);function total(cards) {  let t = 0, aces = 0;  for (const c of cards) { const r = rank(c); if (r === 'A') { t += 11; aces++; } else t += ['10', 'J', 'Q', 'K'].includes(r) ? 10 : Number(r); }  while (t > 21 && aces) { t -= 10; aces--; }  return t;}const natural = (cs) => cs.length === 2 && total(cs) === 21; // 1. The commitment: SHA-256 of the 32 decoded bytesconst commitment = crypto.createHash('sha256').update(key).digest('hex');console.log('commitment matches your saved copy:', commitment === savedCommitment); // 2. Replay the round under Duel's rules: peek, S17, split once, DAS, split aces one cardconst acts = actions.filter((a) => a !== 'insurance' && a !== 'no_insurance'); // insurance is not coveredlet cursor = 0;const next = () => card(cursor++);const p1 = next(), up = next(), p2 = next(), hole = next(); // cursors 0, 1, 2, 3const dealer = [up, hole];let hands = [{ cards: [p1, p2], doubled: false }], split = false, i = 0;if (!natural([p1, p2]) && !natural(dealer)) {     // a natural on either side ends the round  if (acts[0] === 'split') {                       // cursor 4 to hand 1, cursor 5 to hand 2    split = true; i = 1;    hands = [{ cards: [p1, next()], doubled: false }, { cards: [p2, next()], doubled: false }];  }  for (const h of hands) {    if (split && rank(p1) === 'A') break;          // split aces take one card each    while (total(h.cards) < 21) {                  // 21 stands automatically      const a = acts[i++];      if (a === 'hit') h.cards.push(next());      else if (a === 'double') { h.cards.push(next()); h.doubled = true; break; }      else break;                                  // stand    }  }  if (hands.some((h) => total(h.cards) <= 21)) while (total(dealer) < 17) dealer.push(next()); // stands on all 17s} // 3. Settle each hand: gross return in halves of the hand's stakeconst dn = natural(dealer.slice(0, 2)), d = total(dealer);const results = hands.map((h) => {  const t = total(h.cards), w = h.doubled ? 2n : 1n;  if (!split && natural(h.cards)) return dn ? ['push', 2n] : ['blackjack', 5n]; // 3:2  if (dn) return ['lose', 0n];  if (t > 21) return ['bust', 0n];  if (d > 21 || t > d) return ['win', 4n * w];  if (t === d) return ['push', 2n * w];  return ['lose', 0n];}); // 4. Side bets on your two cards and the dealer's up-card (multipliers are total returns)const red = (c) => suit(c) === 'D' || suit(c) === 'H';function perfectPairs(a, b) {  if (rank(a) !== rank(b)) return null;  if (suit(a) === suit(b)) return 'perfect pair';  return red(a) === red(b) ? 'coloured pair' : 'mixed pair';}function twentyOnePlus3(a, b, c) {  const ORDER = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'];  const v = [a, b, c].map((x) => ORDER.indexOf(rank(x)) + 2).sort((x, y) => x - y);  const flush = suit(a) === suit(b) && suit(b) === suit(c), trips = v[0] === v[2];  const straight = new Set(v).size === 3 && (v[2] - v[0] === 2 || v.join() === '2,3,14');  if (trips && flush) return 'suited trips';  if (straight && flush) return 'straight flush';  if (trips) return 'three of a kind';  if (straight) return 'straight';  return flush ? 'flush' : null;}const PAY = { 'perfect pair': [27n, 1n], 'coloured pair': [11n, 1n], 'mixed pair': [7n, 1n], 'suited trips': [1212307692n, 10000000n],  'straight flush': [53n, 1n], 'three of a kind': [32n, 1n], 'straight': [12n, 1n], 'flush': [5n, 1n] }; // 5. The payout, exactly, in 1e-18 unitsconst units = (s) => { const [w, f = ''] = s.split('.'); return BigInt(w) * 10n ** 18n + BigInt((f + '0'.repeat(18)).slice(0, 18)); };const show = (u) => { const s = u.toString().padStart(19, '0'); return (s.slice(0, -18) + '.' + s.slice(-18)).replace(/\.?0+$/, ''); };let won = units(stake) * results.reduce((sum, r) => sum + r[1], 0n) / 2n;const pp = perfectPairs(p1, p2), t3 = twentyOnePlus3(p1, p2, up);if (pp) won += units(sideStakes.perfectPairs) * PAY[pp][0] / PAY[pp][1];if (t3) won += units(sideStakes.twentyOnePlus3) * PAY[t3][0] / PAY[t3][1]; console.log('you', p1, p2, '| dealer', up, '(hole', hole + ')');hands.forEach((h, k) => console.log(`hand ${k + 1}:`, h.cards.join(' '), '=', total(h.cards), h.doubled ? 'doubled' : '', '→', results[k][0]));console.log('dealer:', dealer.join(' '), '=', total(dealer));console.log('side bets: Perfect Pairs', pp || 'none', '· 21+3', t3 || 'none');console.log('amount_won:', show(won));
6.9Python Verification Script

The same verification in Python (standard library only):

verify_blackjack.py · Standalone Python
# verify_blackjack.py: check one Blackjack hand on Duel.com. Python 3, standard library only.import hashlib, hmacfrom decimal import Decimalfrom fractions import Fraction # ── Your hand (example: captured hand 13419067, a split round) ─────────────server_seed = '306d29e25ef7d076d1085071808420823ad2596e049af39aa41284d3b5ac6643'  # revealed after rotationsaved_commitment = '27674345267704331cc6f6f2ee91e94ca47d2d1076774a75b2191a7ec9b2fddd'  # the hash you saved BEFORE bettingclient_seed = 'pf_hc9GvK8F3fFn7'nonce = 45actions = ['split', 'double', 'double']  # your actions, in orderstake = '0.01'                           # main betside_stakes = {'perfect_pairs': '0.01', 'twenty_one_plus_3': '0.01'}  # '0' if not placed # ── The draw: one HMAC-SHA256 per card ─────────────────────────────────────RANKS = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']CARDS = [r + s for r in RANKS for s in 'DHSC']MAX_FAIR = 4294967248  # 52 × 82,595,524key = bytes.fromhex(server_seed)  # hex-decoded, not the text def card(cursor):    h = hmac.new(key, f'{client_seed}:{nonce}:{cursor}'.encode(), hashlib.sha256).digest()    for i in range(0, 32, 4):        v = int.from_bytes(h[i:i + 4], 'big')        if v < MAX_FAIR:            return CARDS[v % 52]    raise ValueError('all eight chunks rejected') def rank(c): return c[:-1]def suit(c): return c[-1] def total(cards):    t, aces = 0, 0    for c in cards:        r = rank(c)        if r == 'A': t, aces = t + 11, aces + 1        else: t += 10 if r in ('10', 'J', 'Q', 'K') else int(r)    while t > 21 and aces:        t, aces = t - 10, aces - 1    return t def natural(cs): return len(cs) == 2 and total(cs) == 21 # 1. The commitment: SHA-256 of the 32 decoded bytesprint('commitment matches your saved copy:', hashlib.sha256(key).hexdigest() == saved_commitment) # 2. Replay the round under Duel's rules: peek, S17, split once, DAS, split aces one cardacts = [a for a in actions if a not in ('insurance', 'no_insurance')]  # insurance is not coveredcursor = 0def nxt():    global cursor    cursor += 1    return card(cursor - 1)p1, up, p2, hole = nxt(), nxt(), nxt(), nxt()  # cursors 0, 1, 2, 3dealer = [up, hole]hands, split, i = [{'cards': [p1, p2], 'doubled': False}], False, 0if not natural([p1, p2]) and not natural(dealer):  # a natural on either side ends the round    if acts[:1] == ['split']:                       # cursor 4 to hand 1, cursor 5 to hand 2        split, i = True, 1        hands = [{'cards': [p1, nxt()], 'doubled': False}, {'cards': [p2, nxt()], 'doubled': False}]    for h in hands:        if split and rank(p1) == 'A':               # split aces take one card each            break        while total(h['cards']) < 21:               # 21 stands automatically            a = acts[i]; i += 1            if a == 'hit': h['cards'].append(nxt())            elif a == 'double':                h['cards'].append(nxt()); h['doubled'] = True; break            else: break                             # stand    if any(total(h['cards']) <= 21 for h in hands):        while total(dealer) < 17:                   # stands on all 17s            dealer.append(nxt()) # 3. Settle each hand: gross return in units of the hand's stakedn, d = natural(dealer[:2]), total(dealer)def settle(h):    t, w = total(h['cards']), 2 if h['doubled'] else 1    if not split and natural(h['cards']): return ('push', Fraction(1)) if dn else ('blackjack', Fraction(5, 2))  # 3:2    if dn: return ('lose', Fraction(0))    if t > 21: return ('bust', Fraction(0))    if d > 21 or t > d: return ('win', Fraction(2 * w))    if t == d: return ('push', Fraction(w))    return ('lose', Fraction(0))results = [settle(h) for h in hands] # 4. Side bets on your two cards and the dealer's up-card (multipliers are total returns)def red(c): return suit(c) in 'DH'def perfect_pairs(a, b):    if rank(a) != rank(b): return None    if suit(a) == suit(b): return 'perfect pair'    return 'coloured pair' if red(a) == red(b) else 'mixed pair'def twenty_one_plus_3(a, b, c):    v = sorted(RANKS.index(rank(x)) + 2 for x in (a, b, c))    flush, trips = suit(a) == suit(b) == suit(c), v[0] == v[2]    straight = len(set(v)) == 3 and (v[2] - v[0] == 2 or v == [2, 3, 14])    if trips and flush: return 'suited trips'    if straight and flush: return 'straight flush'    if trips: return 'three of a kind'    if straight: return 'straight'    return 'flush' if flush else NonePAY = {'perfect pair': Fraction(27), 'coloured pair': Fraction(11), 'mixed pair': Fraction(7),       'suited trips': Fraction('121.2307692'), 'straight flush': Fraction(53), 'three of a kind': Fraction(32),       'straight': Fraction(12), 'flush': Fraction(5)} # 5. The payout, exactlywon = Fraction(stake) * sum(r[1] for r in results)pp, t3 = perfect_pairs(p1, p2), twenty_one_plus_3(p1, p2, up)if pp: won += Fraction(side_stakes['perfect_pairs']) * PAY[pp]if t3: won += Fraction(side_stakes['twenty_one_plus_3']) * PAY[t3] print('you', p1, p2, '| dealer', up, f'(hole {hole})')for k, (h, r) in enumerate(zip(hands, results), 1):    print(f'hand {k}:', ' '.join(h['cards']), '=', total(h['cards']), 'doubled' if h['doubled'] else '', '→', r[0])print('dealer:', ' '.join(dealer), '=', total(dealer))print('side bets: Perfect Pairs', pp or 'none', '· 21+3', t3 or 'none')print('amount_won:', format((Decimal(won.numerator) / Decimal(won.denominator)).normalize(), 'f'))
What it prints for the example: commitment matches your saved copy: True; you 7H 7S, dealer 5H with the hole 2D; hand 1 7H 2D 2D = 11, doubled, loses; hand 2 7S 4D KC = 21, doubled, wins; dealer 5H 2D JS = 17; Perfect Pairs a mixed pair; amount_won: 0.11. Those are the cards and the amount Duel served for hand 13419067.
6.10Payouts and Stake Tiers

Every captured hand paid standard odds (win 2×, natural 2.5×, push 1×, doubled 4× / 2×) and every side bet its full multiplier (Perfect Pairs 27 / 11 / 7; 21+3 121.2307692 / 53 / 32 / 12 / 5), and the scripts above use exactly those. Duel's config as fetched on 5 October 2026 (E18) scales the edge with stake: its first Perfect Pairs tier already pays 26.973 / 10.989 / 6.993, its zero-edge 21+3 tier ends at $0.0124, and the main bet runs from 0.1% to 0.57%. Duel describes the main-bet figure as a net edge after rakeback. That pricing was not verified, so if your side-bet payout differs from the scripts, check the config for your stake.

Insurance: The scripts don't settle insurance, which the capture never took.
6.11Evidence Screenshots9 records
2 columns
EvidenceDescription
E03Duel's fairness page: the commit-reveal scheme with HMAC-SHA256
E04Duel's verify page with Blackjack selected; its code panel is E17
E05Illustrative: the in-game Provably Fair panel with the active hashed server seed, client seed and nonce
E06Bet history: a player can list their own hands with bet IDs, wagers and payouts
E07Illustrative: the Rotate seed control with the next seed's commitment, "Next server seed (Hashed)"
E12A player-set client seed (pfaudit_bj_seed01) accepted as typed
E13Duel's browser seed generator: 16 characters from a 63-character alphabet, rejection-sampled crypto.getRandomValues
E17Duel's Blackjack Verify-tab code, copied 25 September 2026 and run unmodified as a cross-check
E18Duel's Blackjack config as fetched 5 October 2026: side-bet multipliers and the stake ladders
✓  Any Player Can Reproduce Blackjack Results

Only disclosed inputs are used, and identical inputs always give the same cards. Your hit, stand, double and split decisions only decide how many cards are drawn. Save the hashed seed before you bet, so the timing rests on your own record.

07

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.

Open-Source Audit Repository

v1.2.1release tag

Repository Details

Prerequisites

  • Node.js 22.x (.nvmrc)
  • npm
  • Git
  • Python 3 (optional: re-runs the exact-rational oracle in the unit tests)
v1.2.1release tag
github.com/ProvablyFair-org/duel-blackjackRelease v1.2.1 · original audit bff0ef5

Commands to Reproduce

npm test runs the 81 unit tests, then the 38 scored steps against the captured hands, then the reproduction gate. It scores the committed simulation and replays Pass 2 Test C; it doesn't rerun the full simulation. npm run test:full does.

sh
git clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjackgit checkout v1.2.1npm ci npm test
Expected output
Passed:     36/38Hard fails: 0Flags:      2 (0 verdict-affecting, 2 capture-origin) CAPTURE-ORIGIN LIMITATIONS (disclosed, verdict-neutral):⚑ Step 4: Nonce Audit⚑ Step 37: Rule & Coverage Register VERDICT: PROVABLY FAIR — Full Pass Committed artifact NOT modified.Reproduction vs the committed artifact on Node 22.22.0: REPRODUCED (2 within tolerance, largest 1.67e-16 at steps[17].data.testC.power[1].perSeedExact)

Audit Reproducibility Pinning

Release
v1.2.1 (Framework 1.1)
Original audit
bff0ef5f791208731f9ef113dabb506204b3dbb0 (4 June 2026)
Node Version
22.x (.nvmrc, package.json engines)
Dataset
data/blackjack-dataset-6000hands.json (6,000 hands, 121 seed records, 33,194 cards)
Dataset Hash (SHA-256)
55d4b4b1850856c8a3ecf6e59021f1f80bb3d8053376c42929e58b6733b8cae4
Blackjack Config Hash (E18, SHA-256)
6e96122e91f13f6687e8118f9f6a55b42c1575f0ed4cbb7c45894b64cabbc192
Capture
30 April – 1 May 2026
Audit ID
PF-2026-DL09
Output Artifacts4 files of record
3 columns
FileContentsSize
verification-results.jsonAll 38 step results, profile coverage, verdict~79KB
simulation-results.jsonPass 1 (10M hands) + Pass 2 (120 seeds × 10,000 nonces) + the engine's RTP block~440KB
rtp-claim-table.jsonRTP claim: the exact RTP against 99.43% (PASS)~3KB
rtp-convergence.htmlSelf-contained RTP convergence chart (inline SVG)~4KB
Repository Structure
duel-blackjack/  (release v1.2.1)
├── src/
│   ├── rng.ts                  → HMAC-SHA256 single-card draw, written from docs/ALGORITHM.md
│   ├── round.ts                → The declared draw order, the round replay, the settlement from the cards
│   ├── sidebets.ts             → Perfect Pairs and 21+3 classifiers
│   ├── money.ts                → Exact money: 1e-18 integer units and exact fractions
│   ├── config.ts               → The stated rules, the paytable, the pinned oracle fractions
│   ├── optimal-play.ts         → Recursive infinite-deck RTP engine
│   ├── sidebet-edges.ts        → Exact side-bet edges by enumeration
│   ├── simulate.ts, sim-plan.ts, sim-hand.ts, strategy.ts → Monte Carlo: 10M Pass 1 hands + Pass 2 on casino seeds
│   ├── cherry-pick.ts          → Pass 2 Test C, with detection power
│   ├── rtp-claim.ts            → Framework rule RTP-CLAIM 1.2.0
│   ├── rtp-settings.ts         → The flat 99.43% claim and the RTP claim table
│   ├── operator-verifier.ts    → Runs Duel's Verify-tab code unmodified (cross-check)
│   ├── site-verifier.ts, live-site-verifier.ts → Load the pinned ProvablyFair.org verifiers
│   ├── loader.ts               → Dataset loader, hash check, capture plan, capture-retry register
│   ├── artifact-pins.ts        → SHA-256 pins for the artifacts of record
│   ├── profile-map.ts          → Step → Blackjack profile check (BLACKJACK-01 … BLACKJACK-30)
│   └── stats.ts, domains.ts, diff.ts, chart.ts, types.ts, rtp-claim-switch.ts
├── tests/
│   ├── verify.ts               → 38 scored steps + the reproduction gate
│   ├── steps/                  → commitment, determinism, payouts, dataset, simulation,
│   │                             game-specific, rules, artifacts, framework, parity
│   ├── blackjack/              → Mocha unit tests, incl. the spec self-test
│   └── mutations.json          → Mutation battery registry
├── anchor/oracle.py            → Exact-rational RTP oracle (Python standard library)
├── docs/ALGORITHM.md, INTERFACE.md → The written specification and module interface
├── data/blackjack-dataset-6000hands.json → 6,000 live hands (6 phases, 121 seed records)
├── evidence/                   → Screenshots, Duel's Verify-tab code (E17), Blackjack config (E18), Duel's statements (E19)
├── verifier-parity/            → Pinned copies of both ProvablyFair.org verifiers and the operator runner
├── capture/                    → Reference record of the capture script
├── outputs/                    → Committed evidence of record (runs write to outputs/run/)
├── scripts/                    → release-manifest.mjs, check-site-verifier.mjs, check-live-site-verifier.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-Reference38 verification steps mapped
3 columns
StepTest NameReport Section
1Seed Hash IntegrityS1, S5
2Commitment LinkageS1, S5
3Hash Consistency Within EpochS1, S5
4Nonce Audit (capture flag)S1, S5
5Card Recomputation (declared draw order)S1, S2, S3, S5
6Client Seed InfluenceS1, S2, S5
7Settlement from the Cards (exact money)S3, S4
8Multiplier ProvenanceS3, S4
9Bet-Size InvarianceS3, S4
10Captured effective_edge Field ConsistencyS4
11Config CompletenessS3
12Epoch SizeS1
13Population of Record & Phase LabelsS7
14Dataset Hash & Config BlockS7
15Phase D Client Seed VariationS1, S3
16Anti-Circularity (Optimal-Play RTP Engine)S2, S4, S5
17Simulation Pass 1S2, S4, S5
18Pass 2 Cherry-Pick DetectionS2, S4, S5
19Dealer Rule ComplianceS3
20Blackjack Payout (3:2)S3, S4
21Double PayoutS3, S4, S5
22Split Draw Order (declared, strict)S1, S3, S5
23Split Rules VerificationS3
24Split Payout IndependenceS3, S4, S5
25Insurance Prompt ConditionS3
26Perfect Pairs + 21+3 PayoutS3
27Side Bet IndependenceS3
28Available Actions SetS3
29Infinite-Deck ConfirmationS2
30Outcome Distribution & Live-Sample FitS3, S4
31Side Bet Stake EqualityS3
32Initial Deal Structure & Hidden-State SweepS3
33Stake Bracket BoundsS3
34Artifact Integrity (pinned artifacts of record)S7
35Draw Bias BoundS2
36Round Replay & Action GrammarS1, S3, S5
37Rule & Coverage Register (capture flag)S3
38Player-Verifier Parity (docs site + live site)S3, S6
reproduce-audit.sh
reproduce-audit.sh
# Clone the releasegit clone https://github.com/ProvablyFair-org/duel-blackjack.gitcd duel-blackjackgit checkout v1.2.1npm ci   # Node 22.x, as pinned in .nvmrc # 81 unit tests, the 38 scored steps and the reproduction gatenpm test # Optional: also regenerate the 10M-hand simulationnpm run test:fullnode scripts/release-manifest.mjs --check # This run's results (the committed evidence is never overwritten)cat outputs/run/verification-results.jsoncat outputs/run/diff.json
provablyfair.org/verify-bets/duel
This is an open-source audit. Every finding, dataset, and line of verification code is publicly accessible. Clone the repo at the release tag, run the tests, and check every claim yourself.
✓  Reproduced at v1.2.1

npm test at release v1.2.1 reproduces the committed results: 36 PASS + 2 capture-origin FLAGs, 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:

2 columns
CodeMeaning
0PROVABLY FAIR — Full Pass, and this run reproduces the committed artifact. The capture flags of Steps 4 and 37 are printed and recorded but exit 0
1At least one hard fail, or a reproduction difference beyond tolerance; also a committed RTP claim table that differs from the run or its pin
2At least one operator-origin FLAG — PROVABLY FAIR — Conditional Pass
5RTP FIGURE OVERSTATED: no draw check failed, but the RTP claim rule found the RTP below the stated figure by more than the 0.1 pp band
This run: exit 0 — PROVABLY FAIR — Full Pass, REPRODUCED.
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.

Verifier output, as run at v1.2.1 (Node 22.22.0) · Verified
Committed artifact NOT modified.Reproduction vs the committed artifact on Node 22.22.0: REPRODUCED (2 within tolerance, largest 1.67e-16 at steps[17].data.testC.power[1].perSeedExact)
7.3SHA-256 Pinned Artifacts

The verifier checks the dataset hash before any step runs, and again in Step 14. Step 34 hashes the two simulation artifacts and holds every numeric value to its declared domain; the RTP claim table has its own pin. A missing or altered one fails. The release manifest hashes all five files below.

2 columns
FileSHA-256
data/blackjack-dataset-6000hands.json55d4b4b1850856c8a3ecf6e59021f1f80bb3d8053376c42929e58b6733b8cae4
outputs/simulation-results.jsond1e4e4cf8836f3369fef73bc61530f0539b8cf2e061b102600f636c4d414301c
outputs/rtp-convergence.htmlae2618ec3e77e55f82ad49979672df9ebcf810a2287e3bed84a5aa0dc0842d23
outputs/verification-results.json81b384a1b4725a1a4709b6230ae0eea5cff4c2952a41c3be1d5a005288e9881a
outputs/rtp-claim-table.json18ac6e4eea89ec13311c71cdf7c5b71188afa7d537b287eacf58948f1f75996b

node scripts/release-manifest.mjs --check checks that all five hashes match the files on disk.

7.4Mutation Battery & Runtime

Mutation battery: 68 / 68 mutations caught by the step they name, and all 38 scored steps have one; one declared survivor, S02, tied to the unfunded insurance (npm run mutate, 20 October 2026).

Runtime: npm test took 102 s on an Apple M2 Max shared with other runs (release manifest, 28 September 2026); npm run test:full, with the full simulation, took 167 s. Runtime varies by machine.

7.5Release History
3 columns
ReleaseWhat changedVerdict
v1.0.0The original auditPROVABLY FAIR — Full Pass
v1.0.1A capture-metadata field removed from the dataset; no hand, seed or payout changed; dataset hash re-pinnedUnchanged
v1.1.0Re-certified under Framework 1.1: 38 scored steps, the split order checked strictly, exact money, Pass 2 Test C, the RTP claim rule switched on, Steps 4 and 37 reported as capture flags, a mutation battery; dataset unchangedUnchanged
v1.2.0Card code rebuilt from a written specification; Duel's Verify-tab code kept as a cross-check onlyUnchanged
v1.2.1Adds .gitattributes so a Windows clone keeps every file byte-identicalUnchanged
Framework 1.1

Game Profile Coverage

Is every check in the Blackjack profile covered?

The Blackjack profile (version 1.0.2) lists 30 checks, BLACKJACK-01 to BLACKJACK-30. Each one is covered by a scored step, a package check, or marked n/a with a reason. Five are partial, where the package says so.

30Profile checks
23By scored steps
6By package checks
1 n/a · 5 partialMarked as such
4 columns
CheckCovered byCoverageWhat it covers
BLACKJACK-01Step 1FullRevealed seeds hash to their commitments; every bet-bearing commitment has its seed
BLACKJACK-02Step 2PartialForward links checked from the raw fields. Partial: no link from before the capture (captured before the standard)
BLACKJACK-03Step 3FullEach epoch bound to its rotation record by transaction order and the rotation timeline, not by the hash field
BLACKJACK-04Step 4PartialGaps, repeats and reorders fail unless they match the capture-retry register (7, capture flag). Partial: no recorded closing nonce per epoch
BLACKJACK-05Steps 5, 7, 12, 13, 33FullHands, seed records, phases, epoch size and stakes bound to the capture plan in code
BLACKJACK-06Steps 6, 15PartialClient seed influence on every deal and the Phase D seeds. Partial: the capture's A, B, C, E and F seeds came from Math.random(), not a CSPRNG
BLACKJACK-07Steps 5, 22FullEvery card at its declared cursor; split rounds strictly in the declared split order
BLACKJACK-08Step 35FullDraw-bias bound exact (0); rejection census
BLACKJACK-09Package checkFullCard code rebuilt from the written specification; Duel's Verify-tab code run unmodified as a cross-check
BLACKJACK-10Steps 19, 28, 32, 36FullDeal structure, S17 both ways, the action list and a full round replay from seed and actions
BLACKJACK-11Steps 7, 26FullMoney exact on the 18-decimal grid, no tolerance, main and side bets
BLACKJACK-12Step 9FullPhase E: the 200 hands at $10 recompute and settle like the $0.01 hands
BLACKJACK-13Steps 7, 20, 21, 24PartialEvery hand settled from the cards: naturals, doubles, splits. Partial: insurance 2:1 assumed, never funded
BLACKJACK-14Steps 8, 11, 26, 27, 31FullSide-bet category, served multiplier, exact payout, deal-time invariance and stake equality
BLACKJACK-15Steps 23, 25, 33, 37FullEvery stated rule with its witness count: split rules, insurance offer, stakes, the rule register
BLACKJACK-16—n/aNo hand record carries a wallet balance
BLACKJACK-17Steps 29, 32FullInfinite deck against the with-replacement expectation; hole card hidden in every pre-settlement response
BLACKJACK-18Step 16FullRTP engine with no casino input, held to an exact-rational oracle within 1e-12; H17 control; dated external references
BLACKJACK-19Steps 10, 16PartialRTP per initial bet and per total wagered, exact side-bet edges and the RTP claim. Partial: the effective_edge field and the stake ladders are not scored
BLACKJACK-20Step 17Full10M-hand simulation re-derived from the stored stream rows
BLACKJACK-21Step 18FullPass 2 Test C on all 120 revealed seeds, replayed, with detection power
BLACKJACK-22Step 30FullLive-sample fit: first-card ranks and naturals (informational)
BLACKJACK-23Package checkFullThe package’s S5 matrix, tied to what the steps show
BLACKJACK-24Step 38FullBoth ProvablyFair.org verifiers (pinned copies) run on every round
BLACKJACK-25Package checkFullPlayer verification steps in order, with the commitment encoding and the split order
BLACKJACK-26Step 14FullDataset pinned by SHA-256; the rules and paytable single-sourced
BLACKJACK-27Step 34FullPinned artifacts and value domains
BLACKJACK-28Package checkFullFresh-clone reproduction record
BLACKJACK-29Package checkFullMutation battery: every scored step has a mutation that fails it by name
BLACKJACK-30Package checkFullLimitations register and load-bearing premises
Partial coverage: BLACKJACK-02, -04 and -06 are partial because the capture (30 April – 1 May 2026) predates the September 2026 standard; BLACKJACK-13 because insurance was never funded; BLACKJACK-19 because the effective_edge field and Duel's stake ladders are explained, not scored. BLACKJACK-16 is n/a: no hand record carries a balance field.