Duel.com Blackjack

Mathematical Analysis Engine — Pre-Audit Research Document

ProvablyFair.org | April 2026

Table of Contents

  1. RNG Algorithm — HMAC-SHA256 Card Generation
  2. Dealer Markov Chain — Exact Probability Tables
  3. Basic Strategy — Infinite Deck Optimal Play
  4. Perfect Pairs — Zero-Edge Proof
  5. 21+3 — Zero-Edge Proof
  6. House Edge Analysis
  7. Reference Benchmarks
  8. Proposed Verification Tests (28 Tests)
  9. Proposed Audit Plan — Phases, Steps, Report, Cost

1. RNG Algorithm — HMAC-SHA256 Card Generation

Duel.com Blackjack uses the same commit-reveal provably fair scheme as all Duel Originals. Each hand pre-generates 50 cards from a deterministic hash chain.

Algorithm

  1. Server generates a random serverSeed and commits SHA-256(serverSeed) before play
  2. Player provides clientSeed (can be customized)
  3. Each hand has a sequential nonce (0, 1, 2, ...)
  4. For each card position (cursor 0–49):
    hash = HMAC-SHA256(hex_decode(serverSeed), clientSeed + ":" + nonce + ":" + cursor)
  5. Read 4 bytes from hash as big-endian uint32
  6. Rejection sampling: if value >= 4,294,967,248, skip to next 4 bytes
  7. Card index = value mod 52 → CARDS[index]

Card Array (52 cards, index 0–51)

0: 2D | 1: 2H | 2: 2S | 3: 2C | 4: 3D | 5: 3H | 6: 3S | 7: 3C | 8: 4D | 9: 4H | 10: 4S | 11: 4C | 12: 5D | 13: 5H | 14: 5S | 15: 5C | 16: 6D | 17: 6H | 18: 6S | 19: 6C | 20: 7D | 21: 7H | 22: 7S | 23: 7C | 24: 8D | 25: 8H | 26: 8S | 27: 8C | 28: 9D | 29: 9H | 30: 9S | 31: 9C | 32: 10D | 33: 10H | 34: 10S | 35: 10C | 36: JD | 37: JH | 38: JS | 39: JC | 40: QD | 41: QH | 42: QS | 43: QC | 44: KD | 45: KH | 46: KS | 47: KC | 48: AD | 49: AH | 50: AS | 51: AC

Deal Order

CursorRecipientCard
0Player — Card 1Face up
1Dealer — Card 1 (hole)Face down
2Player — Card 2Face up
3Dealer — Card 2 (upcard)Face up
4+Hits / Splits / DoublesSequential

Visual Deal Sequence — Verified Hand

Player Card 1
4
cursor 0
Dealer Hole
8
cursor 1
Player Card 2
7
cursor 2
Dealer Upcard
3
cursor 3

Worked Example — HMAC Trace

Server seed: 27fa3967c605e599f2580abe7a33e36cada3bd3610ee8639fdafe7b78394a215
Client seed: wcJKB0KlS07Nrg2_ | Nonce: 5
SHA-256 commitment: 28270a5db414681ca20549fedc6c2284d365b122414dd68cf31f6f7b0bfe16bf

Cursor 0:
Message: "wcJKB0KlS07Nrg2_:5:0"
HMAC-SHA256: c76e27a9b9c03bb20d3668b6c418900f95f50cbd4abf25fb9f741569250331ea
First 4 bytes: 0xc76e27a9 = 3,345,885,097
Bias check: 3345885097 < 4,294,967,248 = PASS
Card index: 3345885097 mod 52 = 9
Card: 4H
Cursor 1:
Message: "wcJKB0KlS07Nrg2_:5:1"
HMAC-SHA256: 078d912e0462d1cac345b1bf195ccac37371f751e20b09c6b8de8793cbeb99eb
First 4 bytes: 0x078d912e = 126,718,254
Bias check: 126718254 < 4,294,967,248 = PASS
Card index: 126718254 mod 52 = 26
Card: 8S
Cursor 2:
Message: "wcJKB0KlS07Nrg2_:5:2"
HMAC-SHA256: ebc16e5b5caef06660c06c8307d065dda93aed323e35281ca731d4d8027e8f02
First 4 bytes: 0xebc16e5b = 3,955,322,459
Bias check: 3955322459 < 4,294,967,248 = PASS
Card index: 3955322459 mod 52 = 23
Card: 7C
Cursor 3:
Message: "wcJKB0KlS07Nrg2_:5:3"
HMAC-SHA256: 56b7f6506924ffd07b87e3a42c7dccb2b2d1a7b58e780e38369aed17a5d52aee
First 4 bytes: 0x56b7f650 = 1,454,896,720
Bias check: 1454896720 < 4,294,967,248 = PASS
Card index: 1454896720 mod 52 = 4
Card: 3D

Generated Cards (first 10 of 50)

Cursor 0: 4H → Cursor 1: 8S → Cursor 2: 7C → Cursor 3: 3D → Cursor 4: KS → Cursor 5: 9D → Cursor 6: 3C → Cursor 7: 8S → Cursor 8: 2D → Cursor 9: 5D
Key Property — Infinite Deck: Each card is drawn independently at probability 1/52. The same card (rank+suit) can appear multiple times in a single hand. This is confirmed by live observation: dealer dealt 2S, 2S in the same hand. Card counting is provably useless against this model.

2. Dealer Markov Chain — Exact Probability Tables

Under infinite deck, dealer outcomes are computed exactly via Markov chain with constant transition probabilities. Each card drawn has P(rank) = 1/13 for ranks 2–9 and Ace, P(10-value) = 4/13.

Overall Bust Rate (S17)
27.38%
Dealer stands all 17s
Overall Bust Rate (H17)
27.71%
Dealer hits soft 17
S17 vs H17 Difference
0.33%
Impact on bust rate
House Edge Impact
+0.22%
H17 adds to house edge

Dealer Final Value Probabilities — Dealer Stands on Soft 17 (S17)

UpcardBust1718192021BJTotal
235.36%13.98%13.49%12.97%12.40%11.80%0.00%100.00%
337.39%13.50%13.05%12.56%12.03%11.47%0.00%100.00%
439.45%13.05%12.59%12.14%11.65%11.12%0.00%100.00%
541.64%12.23%12.23%11.77%11.31%10.82%0.00%100.00%
642.32%16.54%10.63%10.63%10.17%9.72%0.00%100.00%
726.23%36.86%13.78%7.86%7.86%7.41%0.00%100.00%
824.47%12.86%35.93%12.86%6.94%6.94%0.00%100.00%
922.84%12.00%12.00%35.08%12.00%6.08%0.00%100.00%
1019.58%10.29%10.29%10.29%31.59%10.29%7.69%100.00%
A7.98%9.05%9.05%9.05%9.05%25.03%30.77%100.00%

Dealer Final Value Probabilities — Dealer Hits on Soft 17 (H17)

UpcardBust1718192021BJTotal
235.67%13.01%13.65%13.13%12.57%11.96%0.00%100.00%
337.67%12.63%13.20%12.71%12.18%11.62%0.00%100.00%
439.71%12.24%12.73%12.28%11.79%11.26%0.00%100.00%
541.77%11.84%12.29%11.84%11.38%10.89%0.00%100.00%
643.95%11.48%11.48%11.48%11.03%10.57%0.00%100.00%
726.23%36.86%13.78%7.86%7.86%7.41%0.00%100.00%
824.47%12.86%35.93%12.86%6.94%6.94%0.00%100.00%
922.84%12.00%12.00%35.08%12.00%6.08%0.00%100.00%
1019.58%10.29%10.29%10.29%31.59%10.29%7.69%100.00%
A9.62%3.98%9.91%9.91%9.91%25.89%30.77%100.00%

Dealer Bust Rate by Upcard

Audit Target: The dealer bust rate per upcard is our primary game-rules verification metric. The Markov chain gives exact values. In 6,000 hands we expect ~460 hands per upcard (for 2-9) and ~1,846 for 10-value. Chi-squared per upcard detects rule violations that aggregate testing misses.

3. Basic Strategy — Infinite Deck Optimal Play

Under infinite deck, only total-dependent strategy matters — composition-dependent benefit is exactly 0% because deck composition never changes. Only 2 cells differ from standard 6/8-deck strategy.

H = Hit
S = Stand
D = Double
Ds = Dbl/Stand
P = Split
Ph = Split/Hit

Hard Totals

2345678910A
5HHHHHHHHHH
6HHHHHHHHHH
7HHHHHHHHHH
8HHHHHHHHHH
9HDDDDHHHHH
10DDDDDDDDHH
11DDDDDDDDDH
12HHSSSHHHHH
13SSSSSHHHHH
14SSSSSHHHHH
15SSSSSHHHHH
16SSSSSHHHHH
17SSSSSSSSSS
18SSSSSSSSSS
19SSSSSSSSSS
20SSSSSSSSSS
21SSSSSSSSSS

Soft Totals (Ace counted as 11)

2345678910A
13HHHHHHHHHH
14HHHHHHHHHH
15HHHHHHHHHH
16HHDDDHHHHH
17HDDDDHHHHH
18SDsDsDsDsSSHHH
19SSSSSSSSSS
20SSSSSSSSSS
21SSSSSSSSSS

Pairs

2345678910A
APPPPPPPPPP
10SSSSSSSSSS
9PPPPPSPPSS
8PPPPPPPPPP
7PPPPPPHHHH
6PPPPPHHHHH
5DDDDDDDDHH
4HHHPPHHHHH
3PPPPPPHHHH
2PPPPPPHHHH
Infinite Deck Differences (vs 6/8-deck):
1. Soft 13 (A,2) vs dealer 5: HIT instead of Double
2. Soft 15 (A,4) vs dealer 4: HIT instead of Double
All other cells are identical to standard 6/8-deck S17 basic strategy.

4. Perfect Pairs — Zero-Edge Proof

Perfect Pairs evaluates the player's first two cards. Under infinite deck (independent draws at 1/52), the probabilities simplify to exact fractions.

Perfect Pair
27x
Q
Q
Same rank + same suit
P = 1/52 = 1.923%
Colored Pair
11x
9
9
Same rank + same color + different suit
P = 1/52 = 1.923%
Mixed Pair
7x
5
5
Same rank + different color
P = 2/52 = 3.846%

Perfect Pairs — Infinite Deck Analysis

OutcomeProbabilityMultiplierEV ContributionFormula
Perfect Pair0.019230769227x+0.5192307692P = 1/52 (same rank + same suit)
Colored Pair0.019230769211x+0.2115384615P = 1/52 (same rank + same color + different suit)
Mixed Pair0.03846153857x+0.2692307692P = 2/52 (same rank + different color)
No Pair (loss)0.9230769231−1+0.0000000000P = 48/52 (different rank)
Total EV0.0000000000
ZERO-EDGE CONFIRMED — House Edge: 0.0000%
Multipliers are GROSS returns (total payout including original bet).

EV = Σ P(outcome) × multiplier − 1 (cost of bet)
   = (1/52)(27) + (1/52)(11) + (2/52)(7) − 1
   = 27/52 + 11/52 + 14/52 − 1
   = 52/52 − 1
   = 0

The multiplier-weighted sum: 1×27 + 1×11 + 2×7 = 52 = denominator.
This is algebraically exact — not an approximation.

QED: Perfect Pairs has exactly 0.000000% house edge under infinite deck.

At 6-deck: EV = (5/311)(27) + (6/311)(11) + (12/311)(7) − 1 = -99.08% house edge.

EV Breakdown

The Smoking Gun: The multiplier sum 1×27 + 1×11 + 2×7 = 52 = the denominator. This is not coincidence — the pay table was algebraically designed so that EV = 52/52 − 1 = 0 under infinite deck. At 6-deck, the same table would produce ~8.4% house edge because P(perfect pair) drops from 1/52 to 5/311.

Perfect Pairs: Infinite Deck vs 6-Deck Comparison

OutcomeInfinite Deck P6-Deck PMultiplierEV (Infinite)EV (6-Deck)
Perfect Pair0.0192310.01607727x0.5192310.434084
Colored Pair0.0192310.01929311x0.2115380.212219
Mixed Pair0.0384620.0385857x0.2692310.270096
No Pair0.9230770.926045-1-0.923077-0.926045
Total EV0.000000-0.083601

5. 21+3 — Zero-Edge Proof

21+3 evaluates a 3-card poker hand from Player Card 1, Player Card 2, and Dealer Upcard. Under infinite deck, each of the three cards is drawn independently at 1/52.

Suited Trips
121.23x
K
K
K
All same rank + same suit
P = 1/2704 = 0.037%
Straight Flush
53x
7
8
9
3 consecutive + same suit
P = 0.205%
Three of a Kind
32x
J
J
J
Same rank, mixed suits
P = 0.555%
Straight
12x
9
10
J
3 consecutive, mixed suits
P = 3.072%
Flush
5x
3
7
K
Same suit, not consecutive
P = 6.008%

21+3 — Infinite Deck Analysis

OutcomeProbabilityMultiplierEV ContributionFormula
Suited Trips0.0003698225121.2307692x+0.0448338643P = 1/2704 = 0.0003698225
Straight Flush0.002048247653x+0.1085571234P = 288/140608 = 0.0020482476
Three of a Kind0.005547337332x+0.1775147929P = 15/2704 = 0.0055473373
Straight0.030723714212x+0.3686845699P = 4320/140608 = 0.0307237142
Flush0.06008192995x+0.3004096495P = 8448/140608 = 0.0600819299
No Win (loss)0.9012289486−1+0.0000000000P = 1 - sum(above) = 0.9012289486
Total EV-0.0000000000
ZERO-EDGE CONFIRMED — House Edge: 0.0000%
Multipliers are GROSS returns (total payout including original bet).

EV = Σ P(outcome) × multiplier − 1
   = 1.0000000000 − 1
   = -0.0000000000
   = -0.0000%

The suited trips multiplier 121.2307692... = 121 + 3/13 = 1576/13.
This precise irrational value was back-calculated to bring the 21+3 EV as close to 0% as possible under infinite deck.
The small residual (-0.0000%) is due to the limited decimal precision of the stored multiplier.

EV Breakdown

The 121.2307692 Mystery Solved: This irrational-looking multiplier = 121 + 3/13 = 1576/13. It was back-calculated to make the 21+3 EV exactly (or near-exactly) 0% under infinite deck. The fractional part 3/13 compensates for the precise probability of suited trips at 1/2704. No standard pay table uses this value — it is unique to Duel's infinite deck implementation.

6. House Edge Analysis

The base game house edge under infinite deck depends on the rule set. Duel's confirmed rules and their impact:

RuleStatusEffect on House Edge
Dealer hits soft 17 (H17 vs S17)TBD+0.22%
Double after split allowed (DAS)Confirmed-0.14%
No surrenderConfirmed+0.07%
Resplit acesTBD-0.08%
No resplit acesTBD+0.08%
Blackjack pays 3:2Confirmed0.00%
Infinite deck (vs 8-deck)Confirmed+0.08%
Baseline House Edge (S17, Infinite Deck)0.5117%

Zero-Edge Mechanism

Duel's "zero edge" is achieved via fee structure, not game math. The base game runs at ~0.51% house edge under infinite deck with S17. Duel offers a daily wagering allowance at 0% edge. The API field "effective_edge: 0.1" represents the fee/rake — distinct from the game's mathematical house edge.

Out of Scope: Rakeback mechanics, zero-edge promotion structure, daily wagering allowances, and fee calculations are excluded from this audit. The audit verifies the game's mathematical fairness (RNG, card generation, dealer rules, payouts, side bets) — not the platform's commercial fee model. The effective_edge field is reported as observed but not audited for correctness.

The effective_edge Field

Bet Typeeffective_edge ValueInterpretation
Main bet0.1 (10%)Fee/rake on net winnings — distinct from game math
Perfect Pairs0 (0%)Zero edge — confirmed by analytical proof above
21+30 (0%)Zero edge — confirmed by analytical proof above

7. Reference Benchmarks

These expected values validate the simulation engine. If simulated outcomes don't match within 2σ at 10M rounds, the engine has a bug.

House Edge (S17)
0.51%
Infinite deck, DAS, split 3x
Player Win Rate
43.5%
Basic strategy
Push Rate
8.6%
Basic strategy
Player Loss Rate
47.9%
Basic strategy
Natural BJ
4.73%
P = 8/169
Dealer Bust
27.38%
S17, all upcards
Double Frequency
~10%
Basic strategy
Split Frequency
~2.4%
Basic strategy

Insurance Expected Value (Infinite Deck)

MetricValue
P(dealer BJ | Ace upcard)4/13 = 0.307692 = 30.77%
Insurance payout2:1
Insurance EV2 × (4/13) − 1 × (9/13) = −1/13 = -7.69%
Expected in 6K hands~460 Ace upcards, ~142 dealer BJs

Natural Blackjack Probability

MetricValue
P(player BJ)2 × (4/13) × (1/13) = 8/169 = 0.047337 = 4.73%
Expected in 6K hands284 ± 16.4 (1σ)
P(dealer BJ)8/169 = 4.73% (same as player)

8. Proposed Verification Tests — 27 Tests

Each test is classified as DETERMINISTIC (zero tolerance — any failure is a finding) or STATISTICAL (threshold-based — p-value determines pass/fail). The audit will execute all 27 tests against the captured dataset.

Revision note: Four tests from the initial 28 were removed per reviewer feedback — BJ frequency (derivable from per-cursor uniformity + conditional independence), side/main bet correlation (dominated by Pass 2 cherry-pick detection), duplicate card confirmation (reframed as narrative callout), and rank distribution (dominated by 52-card chi-squared). Three tests added: Optimal-Play RTP Engine, Split Rules Verification, Insurance Payout Verification.

Total Tests
27
Deterministic
18
Zero tolerance
Statistical
9
Threshold-based
Categories
8

Cryptographic Integrity

#1Card Generation VerificationDETERMINISTIC

Description: For every hand in the dataset, recompute all dealt cards using HMAC-SHA256(hex_decode(serverSeed), clientSeed:nonce:cursor) and rejection sampling. Every card must match.

Mathematical Basis: The HMAC is deterministic: same inputs = same output. If any card mismatches, the casino is not using the committed algorithm.

Expected Value: 100% match rate. Zero tolerance.

Interpretation: Any mismatch = critical finding.

Example:
HMAC-SHA256(hex_decode("27fa39..."), "wcJKB0KlS07Nrg2_:5:0") → hash → readUint32BE(0) → mod 52 → card index → CARDS[index]
#2Seed Hash CommitmentDETERMINISTIC

Description: For every revealed server seed, verify SHA-256(serverSeed) matches the hash committed before play began.

Mathematical Basis: SHA-256 is collision-resistant. If the hash matches, the seed was determined before the bet was placed.

Expected Value: 100% match. Zero tolerance.

Interpretation: Any mismatch = the casino changed the seed after seeing the player's actions.

Example:
SHA-256("27fa3967c605e599...") = "5e71cdbf40dc2486..." → matches committed hash
#3Split Cursor OrderingDETERMINISTIC

Description: When a player splits, verify cards are drawn from sequential cursor positions with no gaps or reuse.

Mathematical Basis: The committed deck (50 pre-generated cards) must be consumed in order. Cursor 4 is the 5th card regardless of whether the player hits or splits.

Expected Value: Sequential cursors, no reuse, cards match HMAC output.

Interpretation: Cursor reuse = reduced entropy. Cursor gaps = possible manipulation.

Example:
P1=cursor0, D_hole=cursor1, P2=cursor2, D_up=cursor3, split_card1=cursor4, split_card2=cursor5...
#4Nonce Sequential ContinuityDETERMINISTIC

Description: Verify nonces are sequential (0, 1, 2, ...) within each seed epoch. Detect gaps or duplicates.

Mathematical Basis: Each hand increments the nonce by exactly 1. Gaps = undisclosed hands. Duplicates = reused randomness.

Expected Value: Strictly sequential. Any gap requires explanation.

Interpretation: Small gaps at phase boundaries: capture artifacts. Gaps mid-phase: suspicious.

Example:
Epoch 1: nonces 0,1,2,3,4,5. Gap at 6 → investigate.

RNG Fairness

#5Card Distribution Uniformity (52-value Chi-Squared)STATISTICAL

Description: Count occurrences of each of 52 card types across ALL draws. Under infinite deck, each should appear at 1/52.

Mathematical Basis: Chi-squared goodness-of-fit, 51 df. Critical value at alpha=0.01: 76.15.

Expected Value: Each card at N/52. At 30,000 draws: ~577 per card, sigma 23.4.

Interpretation: p < 0.01 = biased. p >= 0.01 = consistent with fair infinite deck.

Example:
X2 = sum((observed_i - expected_i)^2 / expected_i) for i = 0..51
#6Per-Cursor Position UniformitySTATISTICAL

Description: Test card distribution at EACH cursor position independently. Each position should produce uniform 1/52 distribution.

Mathematical Basis: Each cursor is an independent HMAC call. Per-position testing catches position-dependent bias that aggregate testing misses.

Expected Value: Chi-squared per position, 51 df. At 6,000 hands: ~115 draws per card per position.

Interpretation: Failed positions = cursor-to-hash mapping flaw at specific offsets.

Example:
Cursor 0: count each card across all hands. Expected = 6000/52 = 115.4
#7Conditional Independence (Upcard vs Hole Card)STATISTICAL

Description: For each dealer upcard value (2-A), compute P(hole card = 10-value). Must be exactly 4/13 regardless of upcard.

Mathematical Basis: With independent draws, upcard provides zero information about hole card. Any correlation = draws not independent.

Expected Value: P(10-value hole | any upcard) = 4/13 = 0.30769. Binomial test per upcard group.

Interpretation: Deviation in any upcard group = draws are correlated = not truly infinite deck.

Example:
For upcard=6: count hole card in {10,J,Q,K}. Expected ratio: 4/13.
#8Serial Independence (Hand-to-Hand)STATISTICAL

Description: Lag-1 autocorrelation and Wald-Wolfowitz runs test on main bet outcomes. Consecutive hands should be independent.

Mathematical Basis: Each hand uses a different nonce. Correlation suggests seed-level manipulation.

Expected Value: |lag1_z| < 3 AND runs_p >= 0.01.

Interpretation: Positive autocorrelation = streaks beyond chance. Negative = alternating pattern.

Example:
Encode: win=1, push=0, loss=-1. lag-1 r, z = r * sqrt(N).

Game Rules

#9Dealer Rule ComplianceDETERMINISTIC

Description: For every hand, verify dealer hit when total < 17 (or soft 17 under H17) and stood when total >= 17 (or soft 18+ under S17).

Mathematical Basis: Dealer rules are deterministic. Any deviation is a game logic error.

Expected Value: 100% compliance. Zero tolerance.

Interpretation: Any rule violation = bug or manipulation.

Example:
Dealer: 6 → draws 3 (9) → draws A (soft 20). S17: stand. Verify dealer stood.
#10Dealer Final Value DistributionSTATISTICAL

Description: Compare observed dealer final values (17, 18, 19, 20, 21, bust) to Markov chain probabilities, stratified by upcard.

Mathematical Basis: Dealer outcomes follow a Markov chain with constant transition probabilities (infinite deck).

Expected Value: Overall bust rate ~28-29% (S17). Chi-squared with 5 df. Per-upcard bust rates from Markov chain.

Interpretation: Per-upcard deviation = rule applied incorrectly for specific starting hands.

Example:
At 6,000 hands: expected busts ~1,700. Chi-squared on {17,18,19,20,21,bust}.
#11Insurance Payout VerificationDETERMINISTIC

Description: When insurance is accepted and dealer has blackjack, verify payout = 3x insurance stake (2:1 net + stake returned). When dealer does not have BJ, verify insurance stake is lost.

Mathematical Basis: Insurance is a deterministic side bet — payout depends only on whether dealer has BJ. Not a statistical test.

Expected Value: 100% payout correctness. Zero tolerance.

Interpretation: Any discrepancy = payout calculation error on insurance.

Example:
Insurance $0.005 (half main bet). Dealer BJ: amount_won includes $0.015 (3x). No BJ: $0.005 lost.
#12Payout Math CorrectnessDETERMINISTIC

Description: For every hand, recompute the correct total payout and compare to amount_won.

Mathematical Basis: Win = 2x. Push = 1x. BJ = 2.5x. Double win = 4x. Double push = 2x. Loss = 0. Side bet wins added.

Expected Value: 100% match. Zero tolerance.

Interpretation: Any discrepancy = payout error. Check edge cases: BJ vs dealer BJ = push.

Example:
Bet $0.01, BJ win: amount_won = $0.025. PP 27x: add $0.27.
#13Blackjack Payout (3:2)DETERMINISTIC

Description: For every natural blackjack, verify amount_won = bet x 2.5. 6:5 would add ~1.39% house edge.

Expected Value: 100% of naturals pay exactly 2.5x. Zero tolerance.

Interpretation: Any deviation from 2.5x: check if 6:5 (2.2x) or even money (2x).

Example:
Bet $0.01: natural BJ amount_won = $0.025. Confirmed in test hands.
#14Double Down PayoutDETERMINISTIC

Description: For every doubled hand, verify: win = 4x original, push = 2x, loss = 0.

Expected Value: 100% match. Zero tolerance.

Interpretation: Common bug: paying 2x instead of 4x on double win.

Example:
Bet $0.01, double. Total wager $0.02. Win: amount_won = $0.04.
#15Split Rules VerificationDETERMINISTIC

Description: Once split rules are observed during capture, lock them as deterministic checks: (a) re-split allowed/denied correctly, (b) hit after split aces allowed/denied correctly, (c) double after split allowed/denied correctly, (d) surrender correctly rejected (not available).

Mathematical Basis: Game rules are fixed by the implementation. Once observed, any deviation is a logic error.

Expected Value: 100% consistency with observed rules. Zero tolerance.

Interpretation: Inconsistent rule application = non-deterministic game logic.

Example:
If re-split observed in Phase H: verify re-split is offered on all subsequent pairs-after-split. If denied: verify never offered.
#16Split Payout IndependenceDETERMINISTIC

Description: Each split hand is evaluated and paid independently. Verify payout per split hand matches the hand's outcome.

Expected Value: 100% match. Zero tolerance.

Interpretation: One split hand winning while the other loses must produce correct net payout.

Example:
Split 8s: hand 1 = 18 (win), hand 2 = 15 (lose). Payout = 1x bet (net: +0 from hand1 win, -1x from hand2 loss).

Side Bets

#17Perfect Pairs Payout VerificationDETERMINISTIC

Description: For every PP-active hand, classify first 2 player cards. Verify payout: perfect = 27x, colored = 11x, mixed = 7x, no pair = 0.

Expected Value: 100% match. Zero tolerance.

Interpretation: Any mismatch = classification or payout error.

Example:
QS + QS → same rank, same suit → Perfect Pair → payout = bet x 27.
#1821+3 Payout VerificationDETERMINISTIC

Description: For every 21+3 active hand, evaluate the 3-card poker hand (P1, P2, D_upcard). Verify payout matches config.

Expected Value: 100% match. Zero tolerance. Priority: suited trips > SF > 3oaK > straight > flush.

Interpretation: Any mismatch = hand classification or payout error.

Example:
9H, JD, 10S → consecutive (9,10,J) → different suits → Straight → bet x 12.
#19Side Bet IndependenceDETERMINISTIC

Description: Verify side bet results use ONLY initial 3 cards (P1, P2, D_upcard), unchanged by subsequent player actions.

Expected Value: side_bet_results identical in deal response and final response.

Interpretation: If results change after player actions: evaluation is not based solely on initial cards.

Example:
Compare side_bet_results from POST /blackjack (deal) vs POST /blackjack/{id}/stand (final).
#20Suited Trips Multiplier PrecisionDETERMINISTIC

Description: Verify suited trips uses full-precision multiplier 121.2307692... = 1576/13, not a rounded approximation.

Mathematical Basis: Truncation at 121.23 instead of 121.2307692 creates measurable edge over millions of bets.

Expected Value: amount_won = amount_placed x 121.2307692... with API-level precision.

Example:
Bet $0.01: payout should be $1.212307692..., not $1.2123.

RTP Verification

#21Optimal-Play RTP Engine (Analytical)DETERMINISTIC

Description: Compute the exact optimal-play RTP via dynamic programming over all player/dealer states under infinite deck. This produces the headline RTP figure. Parallel to Video Poker's exhaustive C(52,5) enumeration.

Mathematical Basis: For infinite deck, enumerate all (player_total, dealer_upcard) states. For each, compute EV of hit/stand/double/split via recursive expectation. The max EV across actions = optimal play. Weight by deal probabilities = theoretical RTP.

Expected Value: ~99.49% (S17) or ~99.27% (H17). Cross-validate against Wizard of Odds published figure of 0.5117% house edge for infinite deck S17.

Interpretation: If independently computed RTP does not match WoO within 0.001%, the engine has a bug. This is the anti-circularity proof for blackjack.

Example:
~340 states (34 player totals x 10 upcards). Hard 16 vs dealer 10: EV(hit) = -0.5386, EV(stand) = -0.5401 → optimal = HIT.
#22Simulation Pass 1 — Monte Carlo RTPSTATISTICAL

Description: Simulate 10M+ hands with basic strategy using fresh random seeds. Compare empirical RTP to analytical engine output.

Mathematical Basis: Law of large numbers + Fisher's method across 10 streams. Eliminates single-seed bias.

Expected Value: Simulated RTP within 0.05% of analytical. Fisher's p > 0.01.

Interpretation: Deviation > 0.1% at 10M rounds: investigate.

Example:
10 streams x 1M hands. Per-stream: chi-squared on outcome distribution. Fisher's T = -2 * sum(ln(p_i)).
#23Simulation Pass 2 — Cherry-Pick DetectionSTATISTICAL

Description: For each revealed casino seed, simulate 100K hands. Compare early-nonce vs extended-nonce RTP. Flag systematic early-window depression.

Expected Value: ~5% flagged by chance. Binomial test on flag count. PASS if p >= 0.01.

Interpretation: Significantly more flags = evidence of cherry-pick bias.

Example:
Seeds: 110. Flags: k. Binomial p = P(X >= k | n=110, p=0.05).

Side Bet Proofs

#24Perfect Pairs Zero-Edge ProofDETERMINISTIC

Description: Prove analytically that PP(27/11/7) = exactly 0% edge under infinite deck.

Mathematical Basis: EV = (1/52)(27) + (1/52)(11) + (2/52)(7) - 1 = 52/52 - 1 = 0.

Expected Value: EV = 0.000000. Exact.

Example:
1x27 + 1x11 + 2x7 = 52 = denominator. QED.
#2521+3 Zero-Edge ProofDETERMINISTIC

Description: Prove analytically that 21+3 pay table = ~0% edge under infinite deck. The multiplier 121+3/13 was back-calculated for this.

Expected Value: EV within rounding of 0.00%.

Example:
P(suited trips) x 121.23 + P(SF) x 53 + P(3oaK) x 32 + P(straight) x 12 + P(flush) x 5 - P(loss) = ~0%.

Positive Findings

#26Card Counting Impossibility ProofDETERMINISTIC

Description: Prove analytically that card counting is impossible against infinite deck. P(next card = X) = 1/52 regardless of history.

Expected Value: Confirmed by per-cursor uniformity (#6) and conditional independence (#7).

Interpretation: Positive finding — immune to advantage play.

Example:
After 100 aces in 1000 hands: P(next = Ace) still = 1/13. Card counting advantage = 0.

Anti-Manipulation

#27Bet-Size InvarianceDETERMINISTIC

Description: Verify hands at different stakes produce identical cards given same seed/nonce/cursor. Bet amount is not an HMAC input.

Expected Value: Card generation independent of bet size. Zero tolerance.

Interpretation: Any correlation = bet discrimination.

Example:
Phase A ($0.01) nonce 5: [8H, JH, 3C, KD]. Phase E ($10) same seed/nonce: identical sequence.
Narrative Callout — Infinite Deck Confirmation: During capture, duplicate cards (same rank+suit) appearing in a single hand serve as empirical confirmation that the deck model is truly infinite (with-replacement). Already observed: dealer dealt 2S, 2S in the same hand. This is expected under infinite deck (P(at least one duplicate in 6 cards) = 26.3%) and impossible under finite deck. Reported as a positive finding in the report narrative, not as a numbered verification step, since it is a consequence of the stronger per-cursor uniformity and conditional independence tests (#6, #7).

9. Proposed Audit Plan

This section defines the complete audit methodology for Duel.com Blackjack — capture phases, verification steps, simulation approach, report structure, and what makes this audit unique in the provably fair space.

9.1 Capture Phases — 6,000 Hands

Six capture phases, each targeting specific game mechanics. All phases use the same test account with seed rotation between phases. Side bets placed at $0.01.

Revision note: Phases F and G (PP-only $0.10 and 21+3-only $0.10) were removed per reviewer feedback. The standard multipliers (27x, 11x, 7x, 53x, 32x, 12x, 5x) all multiply cleanly into $0.01 — no rounding ambiguity at either stake. The one precision-sensitive multiplier (suited trips 121.2307692x) hits at P=1/2704, making empirical capture infeasible at any sane sample size. It is handled analytically in Step 20. The 800 freed hands are rolled into Phase A for a stronger baseline.

PhaseHandsStakeSide BetsStrategyPurpose
A3,300$0.01Both $0.01Basic strategyBaseline coverage — main game + both side bets under optimal play. ~250 PP hits, ~330 21+3 wins expected.
B1,000$0.01Both $0.01Aggressive (hit to 16+)Extended cursor consumption — verifies cards beyond cursor 4
C500$0.01Both $0.01Split/double priorityForce splits and doubles whenever available — cursor ordering verification
D500$0.01Both $0.01Custom client seed10 auditor-chosen client seeds (50 hands each) — proves client seed influences outcome
E200$10NoneBasic strategyBet-size invariance — same RNG at 1000x the stake
F500$0.01Both $0.01Multi-split focusSplit every pair — cursor ordering across split hands, re-split testing

Expected Coverage at 6,000 Hands (6 Phases)

Natural Blackjacks
~284
4.73% of hands
Doubles
~600
10% of hands
Splits
~150
2.5% of hands
Perfect Pair Hits
~450
At 5.8K side-bet-active hands
21+3 Wins
~580
All hand types combined
Total Card Draws
~30,000
Chi-squared on 52 values
Insurance Offers
~460
Dealer Ace upcard
Dealer Soft 17
~400
Confirms H17/S17 rule

9.2 Verification Steps — 27 Scored Steps

Steps 1–18 follow the standardized ProvablyFair.org framework. Steps 19–27 are blackjack-specific. Each step is DETERMINISTIC (zero tolerance) or STATISTICAL (threshold-based with Bonferroni correction). Revised per reviewer feedback: 4 redundant tests removed, 3 higher-value tests added.

#Step NameTypeWhat It Proves
1Seed Hash IntegrityDETSHA-256(serverSeed) matches pre-committed hash
2Commitment LinkageDETnextServerSeedHash chains to next epoch's serverSeedHashed
3Hash Consistency Within EpochDETAll bets in epoch use the same server seed hash
4Nonce AuditDETSequential nonces 0,1,2,...,n-1 — no gaps or duplicates
5Outcome RecomputationDETEvery card matches HMAC-SHA256 output at correct cursor
6Client Seed InfluenceDETChanging client seed produces different cards
7Payout MathDETamount_won = correct payout for all outcome types
8Multiplier ProvenanceDETSide bet multipliers match /api/v2/blackjack/config
9Bet-Size InvarianceDETPhase E cards recompute identically to $0.01 cards
10House Edge AuditDETeffective_edge field consistent across all hands
11Config CompletenessDETAll side bet hand types present in config
12Epoch SizeDETAll epochs within expected nonce range
13Phase LabelsDETAll 6 phases (A-F) present in dataset
14Dataset HashDETSHA-256 of dataset file matches pinned value
15Phase D Client Seed VariationDET500 hands with auditor client seeds — all recomputed correctly
16Anti-Circularity (Optimal-Play RTP Engine)DETHeadline RTP from independent DP computation — cross-validated against WoO
17Simulation Pass 1STAT10M+ hands, Fisher's method — empirical RTP matches analytical engine
18Pass 2 Cherry-Pick DetectionSTATCasino seeds tested for early-nonce bias
Blackjack-Specific Steps
19Dealer Rule ComplianceDETDealer hits/stands correctly per H17 or S17 for every hand
20Blackjack Payout (3:2)DETEvery natural BJ pays exactly 2.5x
21Double PayoutDETWin=4x, push=2x, loss=0 on doubled hands
22Split Cursor OrderingDETSequential cursors across split hands — no reuse, no gaps
23Split Rules VerificationDETRe-split / hit-split-aces / DAS / surrender rejection — consistent with observed rules
24Split Payout IndependenceDETEach split hand evaluated and paid independently
25Insurance PayoutDETAccepted: 3x stake on dealer BJ, 0 otherwise. Deterministic, not statistical.
26Perfect Pairs + 21+3 PayoutDETClassification + payout match config for all side bet hands
27Side Bet IndependenceDETResults from initial 3 cards only, unchanged by player actions
Informational items (not scored): Card distribution chi-squared (52-value), per-cursor uniformity, conditional independence (upcard vs hole card), dealer final value distribution, serial independence — reported as supporting evidence in the narrative. BJ frequency, rank distribution, and side/main correlation removed as dominated by stronger tests per reviewer feedback. Duplicate card observation reported as infinite-deck confirmation callout.

9.3 Simulation Approach

ParameterValueRationale
Pass 1 — Fresh Seeds10 streams x 1M hands = 10MFisher's method eliminates single-seed bias
StrategyFull basic strategy (hit/stand/double/split)Infinite deck optimal play — total-dependent only
Side BetsBoth active on all simulated handsValidates PP + 21+3 RTP independently
Pass 2 — Casino Seeds~110 seeds x 100K noncesCherry-pick detection via early vs extended window
Serial IndependenceLag-1 + Wald-Wolfowitz per streamBonferroni-corrected across 10 streams
Expected RTP (main)~99.49% (S17) or ~99.27% (H17)Before Duel's edge deduction
Expected RTP (PP)100.00%Proven analytically — see Section 4
Expected RTP (21+3)~100.00%Proven analytically — see Section 5

9.4 Report Structure — 20+ Chapters

#ChapterContent
1Executive SummaryVerdict, key numbers, scope
2Game RulesInfinite deck, BJ 3:2, dealer rules, insurance, side bets
3RNG Algorithm AnalysisHMAC-SHA256, rejection sampling, card mapping, worked example
4Game Logic VerifiabilityDeal sequence, cursor ordering, split mechanics
5Live Parity TestingSeed management, epoch structure, commitment chain
6RTP AnalysisMain game + PP + 21+3, anti-circularity, simulation results
7Side Bet AnalysisZero-edge proofs, probability tables, pay table design
8Dealer Behavior AnalysisMarkov chain, H17/S17 determination, bust rate verification
9Optimal Play EngineBasic strategy derivation, infinite deck differences, RTP computation
10Edge-Case AnalysisCard distribution, cursor uniformity, conditional independence
11Exploit Testing28-test matrix, attack surface coverage
12Simulation MethodologyFisher's method, multi-stream, Pass 1 + Pass 2
13Operator Trust AnalysisCommit-reveal model, cherry-pick risk, entropy assessment
14RecommendationsFindings, future audit items, disclosure notes
15ConclusionFinal verdict with evidence chain
16GlossaryTerms, definitions, formulas
17ReproducibilityDataset hash, npm commands, dependencies
18Evidence AppendixArtifacts, screenshots, JSON outputs

9.5 What Makes This Audit Unique

No prior provably fair blackjack audit has included these elements:
Analytical Side Bet Zero-Edge Proofs

Mathematical proof that PP(27/11/7) = exactly 0% edge and 21+3(121.23/53/32/12/5) = ~0% edge under infinite deck. The multiplier sum 52/52 = 1.000 is algebraically exact. No simulation needed — this is a closed-form result.

Dealer Markov Chain Verification

Exact dealer outcome probabilities per upcard from first principles. Compare observed dealer final values to Markov chain theory stratified by upcard — catches rule violations at individual card levels that aggregate tests miss.

Card Counting Impossibility Proof

Formal proof that infinite deck makes card counting provably useless: P(next card) = 1/52 regardless of history. This is a positive finding — the game is immune to advantage play. Verified empirically via conditional independence testing.

Per-Cursor Position Uniformity

Testing the HMAC chain itself, not just outcomes. Each cursor position (0–49) should produce uniform 1/52 distribution independently. Catches position-dependent bias in the hash-to-card mapping that outcome-level tests cannot detect.

Conditional Independence Testing

For each dealer upcard (2-A), verify P(hole card = 10-value) = 4/13 exactly. Any deviation proves draws are correlated — the deck is not truly infinite. This test is specific to infinite-deck implementations and has no analogue in finite-deck audits.

121.2307692 Multiplier Investigation

The suited trips payout 121+3/13 = 1576/13 is a non-standard irrational value. We prove it was back-calculated for infinite deck zero-edge. We also verify floating-point precision: truncation at bet x 121.23 instead of 121.2307692... creates measurable edge over millions of bets.

9.6 Cost & Balance Analysis

The numbers below represent total amount wagered, not money lost. Blackjack at ~99.49% RTP with basic strategy means nearly all wagered money returns to the balance. The account acts as a float — money circulates through bets and payouts, with only a tiny fraction lost to house edge.

Scenario A — Phase E at $10/hand (1000x baseline)

PhaseHandsMain StakeSide BetsWager/HandTotal Wagered
A3,300$0.01PP $0.01 + 21+3 $0.01$0.03$99.00
B1,000$0.01PP $0.01 + 21+3 $0.01$0.03$30.00
C500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
D500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
E200$10.00None$10.00$2,000.00
F500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
Total Wagered$2,174.00
MetricValueExplanation
Total wagered$2,174.00Sum of all bets placed across 6,000 hands
Expected loss (0% edge / zero edge window)$0.00Under Duel's zero-edge promotion, 100% RTP — no expected loss
Expected loss (0.51% edge / outside zero edge)$11.09$2,174 x 0.51% = $11.09 — the mathematical house take
Side bet expected loss$0.00Both side bets are 0% edge under infinite deck (proven in Sections 4-5)
Worst-case variance (3-sigma)~$80At $10/hand, a 8-hand losing streak = $80 drawdown. Recoverable.
Minimum wallet balance needed$100$10/hand + buffer for variance swings. Phases A-D run first at $0.01, building confidence before Phase E.
Recommended wallet balance$150Comfortable buffer. Phase E runs 200 hands at $10 — balance fluctuates +/-$50 around starting point.
Why $100-$150 is enough for $2,174 in wagers: Blackjack at basic strategy has ~99.49% RTP. Each $10 hand returns ~$9.95 on average. The balance doesn't drain — it circulates. After 200 hands at $10, the expected balance change is -$10.20 (0.51% x $2,000). Variance causes the balance to swing +/-$50 during play, but it always mean-reverts. Under Duel's zero-edge window ($50K daily allowance), the expected loss is literally $0.

Scenario B — Phase E at $1/hand (100x baseline)

PhaseHandsMain StakeSide BetsWager/HandTotal Wagered
A3,300$0.01PP $0.01 + 21+3 $0.01$0.03$99.00
B1,000$0.01PP $0.01 + 21+3 $0.01$0.03$30.00
C500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
D500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
E200$1.00None$1.00$200.00
F500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
Total Wagered$374.00
MetricValueExplanation
Total wagered$374.00Sum of all bets placed across 6,000 hands
Expected loss (0% edge / zero edge window)$0.00Under Duel's zero-edge promotion
Expected loss (0.51% edge / outside zero edge)$1.91$374 x 0.51% = $1.91
Side bet expected loss$0.00Both side bets are 0% edge under infinite deck
Worst-case variance (3-sigma)~$25At $1/hand, manageable swings
Minimum wallet balance needed$20$1/hand + small buffer. Most phases run at $0.01.
Recommended wallet balance$30Comfortable for all phases including $1 Phase E.

Side-by-Side Comparison

Scenario A ($10)
$2,174
Total wagered
Scenario B ($1)
$374
Total wagered
Expected Loss (A)
$11.09
At 0.51% edge
Expected Loss (B)
$1.91
At 0.51% edge
Wallet Needed (A)
$150
Recommended
Wallet Needed (B)
$30
Recommended
Both scenarios prove the same thing. Bet-size invariance is a deterministic test — the bet amount is not an input to HMAC-SHA256. Cards at $10/hand are computed identically to cards at $0.01/hand. The only difference is presentation impact in the report. Scenario A ($10) is 1000x the baseline and looks more thorough. Scenario B ($1) is 100x the baseline and costs 80% less. The cryptographic proof is equally strong either way.

Current account balance: $319. Both scenarios are fully covered. Under Duel's zero-edge window, the expected loss for either scenario is $0. The balance circulates through bets and payouts — it does not drain.

9.7 Remaining Unknowns — To Be Confirmed During Capture

QuestionHow It Gets AnsweredImpact If Different
Soft 17 — dealer hits or stands?Observe ~400 dealer soft-17 handsH17 adds +0.22% house edge
Split cursor orderingPhase C + Phase H split handsWrong ordering = card manipulation
Re-split allowed?Phase H multi-split focusAffects optimal strategy + RTP
Hit after split aces?Phase H — split aces when available-0.19% if allowed
Double after split?Phase C — double after splitting-0.14% if allowed (confirmed available pre-split)
Insurance payout multiplierAccept insurance on dealer Ace, verify 2:1Non-standard payout = different EV
Colored Pair (11x)Observe same-rank+same-color+different-suitAlready proven analytically — need empirical confirmation

BLACKJACK MATH ENGINE v1.0 | PROVABLYFAIR.ORG | APRIL 2026