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 $50,000 daily wagering allowance at 0% edge (losses rebated). After the daily cap, 0.1% house edge (99.9% RTP) applies. The API field "effective_edge: 0.1" represents the 10% fee/rake on net winnings — distinct from the game's mathematical house edge.

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 — 28 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 28 tests against the captured dataset.

Total Tests
28
Deterministic
17
Zero tolerance
Statistical
11
Threshold-based
Categories
9

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. The casino either changed the algorithm or tampered with the committed seed.

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. This is the core trust guarantee.

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

Description: When a player splits, verify cards are drawn from sequential cursor positions with no gaps or reuse. Trace the full cursor sequence across all split hands.

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 = same randomness applied twice (reduces entropy). Cursor gaps = skipped cards (possible manipulation).

Example:
Split hand: P1=cursor0, D_down=cursor1, P2=cursor2, D_up=cursor3, split_card_1=cursor4, split_card_2=cursor5, hit_hand1=cursor6...
#16Nonce Sequential ContinuityDETERMINISTIC

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

Mathematical Basis: Each hand increments the nonce by exactly 1. Gaps mean hands were played but not disclosed. Duplicates mean the same randomness was reused.

Expected Value: Strictly sequential. Any gap requires explanation (capture-retry artifact vs manipulation).

Interpretation: Small gaps at phase boundaries: capture artifacts (explain in report). Gaps mid-phase: suspicious.

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

RNG Fairness

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

Description: Count occurrences of each of 52 card types across ALL draws (player + dealer + hits). Under infinite deck, each should appear with frequency 1/52.

Mathematical Basis: Chi-squared goodness-of-fit with 51 degrees of freedom. Under H0 (fair deck), X² ~ χ²(51). Critical value at α=0.01: 76.15.

Expected Value: Each card ≈ N/52 where N = total draws. At 30,000 draws: ~577 per card, σ ≈ 23.4.

Interpretation: p < 0.01 → reject H0, card distribution is biased. p >= 0.01 → consistent with fair infinite deck.

Example:
X² = Σ(observed_i - expected_i)² / expected_i for i = 0..51. Expected = N/52 for each card.
#4Per-Cursor Position UniformitySTATISTICAL

Description: Test card distribution at EACH cursor position independently. Cursor 0 (first player card), cursor 1 (dealer downcard), cursor 2 (second player card), cursor 3 (dealer upcard). Each position should produce uniform 1/52 distribution.

Mathematical Basis: If the HMAC chain is correct, each cursor position is an independent hash → independent card. Testing per-position catches position-dependent bias that aggregate testing misses.

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

Interpretation: Failed positions suggest the cursor-to-hash mapping has a flaw at specific offsets.

Example:
For cursor 0: count each card across all hands. Expected = 6000/52 = 115.4. Chi-squared test.
#5Conditional Independence (Upcard vs Hole Card)STATISTICAL

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

Mathematical Basis: With independent draws, knowing the upcard provides zero information about the hole card. Any correlation means draws are not independent.

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

Interpretation: Significant deviation in any upcard group → draws are correlated → not truly infinite deck.

Example:
Group all hands by dealer upcard. For upcard=6: count how many times hole card ∈ {10,J,Q,K}. Expected ratio: 4/13.
#8Natural Blackjack FrequencySTATISTICAL

Description: Count player naturals (A + 10-value in first 2 cards). Under infinite deck: P(BJ) = 2 × (4/13) × (1/13) = 8/169.

Mathematical Basis: Two ways to get BJ: (A then 10-value) or (10-value then A). Each independent at 1/52.

Expected Value: P = 8/169 = 4.734%. At 6,000 hands: expected 284, σ = 16.4.

Interpretation: z > 3: too many BJs (generous). z < -3: too few BJs (unfair). Both merit investigation.

Example:
z = (observed - 284) / 16.4. p-value from standard normal.
#27Serial Independence (Hand-to-Hand)STATISTICAL

Description: Lag-1 autocorrelation and Wald-Wolfowitz runs test on main bet outcomes (win/push/loss). Consecutive hands should be statistically independent.

Mathematical Basis: Under infinite deck with commit-reveal, each hand uses a different nonce. Outcomes should be independent. Correlation suggests seed-level manipulation.

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

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

Example:
Encode outcomes: win=1, push=0, loss=-1. Compute lag-1 r, z = r × sqrt(N). Wald-Wolfowitz on binary (win vs not-win).
#28Rank Distribution by Deal PositionSTATISTICAL

Description: For each of the 13 ranks (2-A), test whether the frequency is 4/52 = 1/13 across all draws. Separate from the 52-card test — this aggregates suits.

Mathematical Basis: Rank-level test catches a different class of bias than the full 52-card test. A biased suit distribution could pass rank testing but fail 52-card testing, and vice versa.

Expected Value: Each rank at 1/13. Chi-squared with 12 df. Critical value at α=0.01: 26.22.

Interpretation: Failed rank test with passed 52-card test: impossible (52-card is strictly more powerful). Failed 52-card with passed rank: suit bias only.

Example:
At 30,000 draws: expected 2,308 per rank. χ²(12) on observed vs expected.

Game Rules

#6Dealer Rule ComplianceDETERMINISTIC

Description: For every completed hand, reconstruct the dealer's card sequence. Verify dealer hit when total < 17 (or soft 17 under H17) and stood when total >= 17 (or hard 17+ and soft 18+ under S17).

Mathematical Basis: Dealer rules are deterministic — zero player discretion. Any deviation from stated rules is a game logic error.

Expected Value: 100% compliance. Zero tolerance.

Interpretation: Any rule violation = the game engine has a bug or is manipulating dealer behavior.

Example:
Hand: dealer shows 6, draws 3 (total 9), draws A (soft 20, or hard 10 if S17). Under S17: stand at 20. Under H17: stand at 20. Verify dealer stood.
#7Dealer Final Value DistributionSTATISTICAL

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

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

Expected Value: Overall bust rate ≈ 29.6% (S17). Chi-squared with 5 df. Per-upcard bust rates from Markov chain table.

Interpretation: Aggregate deviation → systematic dealer error. Per-upcard deviation → rule applied incorrectly for specific starting hands.

Example:
At 6,000 hands: expected busts ≈ 1,776. Observed: compare. χ²(5) test on {17,18,19,20,21,bust} categories.
#9Insurance EV VerificationSTATISTICAL

Description: When dealer shows Ace and insurance is offered, P(dealer BJ) = 4/13 = 30.77%. Insurance pays 2:1. EV = -1/13 = -7.69%.

Mathematical Basis: Under infinite deck, the upcard provides no information about hole card composition. P(hole = 10-value) = 4/13 exactly.

Expected Value: From all Ace-upcard hands: ~30.77% dealer BJ rate. At ~460 Ace upcards in 6K hands: expect ~142 dealer BJs, σ ≈ 9.9.

Interpretation: If dealer BJ rate with Ace upcard deviates from 30.77%: insurance payout is mis-priced or deck is not infinite.

Example:
Count Ace upcards: N. Count dealer BJs among those: k. z = (k/N - 4/13) / sqrt((4/13)(9/13)/N).
#14Payout Math CorrectnessDETERMINISTIC

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

Mathematical Basis: Win = bet × 2. Push = bet × 1. BJ = bet × 2.5. Double win = bet × 4. Double push = bet × 2. Split: per-hand. Loss = 0. Side bet wins added.

Expected Value: 100% match. Zero tolerance.

Interpretation: Any discrepancy = payout calculation error. Check edge cases: BJ vs dealer BJ (push), split BJ (usually not 3:2).

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

Description: For every natural blackjack in the dataset, verify amount_won = bet × 2.5 (3:2 net payout + original bet returned).

Mathematical Basis: Standard blackjack pays 3:2 on naturals. 6:5 would add ~1.39% house edge — a massive difference.

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

Interpretation: Any deviation from 2.5x: check if it's 6:5 (2.2x) or even money (2x). Also check: BJ vs dealer BJ should push (1x return).

Example:
Bet $0.01: natural BJ amount_won = $0.025. Confirmed in test hands (nonces 20, 34).
#25Double Down PayoutDETERMINISTIC

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

Mathematical Basis: Doubling doubles the wager and draws exactly one more card. Payout is based on doubled wager.

Expected Value: 100% match. Zero tolerance.

Interpretation: Errors here directly affect RTP. Common bug: paying 2x instead of 4x on double win.

Example:
Bet $0.01, double: total wager $0.02. Win: amount_won = $0.04. Push: amount_won = $0.02.

Side Bets

#10Perfect Pairs Payout VerificationDETERMINISTIC

Description: For every hand with PP active, classify the first 2 player cards and verify the payout matches: perfect pair (same rank+suit) = 27x, colored pair (same rank+color+different suit) = 11x, mixed pair (same rank+different color) = 7x, no pair = 0.

Mathematical Basis: Side bet classification is deterministic from the dealt cards. Multipliers come from /api/v2/blackjack/config.

Expected Value: 100% match. Zero tolerance.

Interpretation: Any mismatch = payout calculation error in the game engine.

Example:
Cards: QS, QS → same rank (Q), same suit (S) → Perfect Pair → payout = bet × 27.
#1121+3 Payout VerificationDETERMINISTIC

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

Mathematical Basis: Hand classification: suited trips (same rank+suit), straight flush (consecutive+same suit), three of a kind (same rank), straight (consecutive), flush (same suit). Priority order matters — suited trips > SF > 3oaK > straight > flush.

Expected Value: 100% match. Zero tolerance.

Interpretation: Any mismatch = hand classification or payout error.

Example:
Cards: 9H, JD, 10S → ranks 9,J,10 → consecutive (9,10,J) → different suits → Straight → payout = bet × 12.
#12Side Bet IndependenceDETERMINISTIC

Description: Verify side bet results use ONLY the initial 3 cards (P1, P2, D_upcard) and are not affected by subsequent hits, doubles, or splits.

Mathematical Basis: Side bets are resolved on deal before player acts. The side_bet_results field is populated in the deal response.

Expected Value: side_bet_results identical in deal response and final response for every hand.

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

Example:
Compare side_bet_results from POST /blackjack (deal) vs POST /blackjack/{id}/stand (final).
#13Side Bet / Main Bet CorrelationSTATISTICAL

Description: Compute Pearson correlation between side bet profit and main bet profit across all hands. Under fair play: zero correlation.

Mathematical Basis: If the casino manipulates which seeds produce good side bet outcomes vs good main outcomes, you'd see negative correlation (win one, lose the other).

Expected Value: r ≈ 0 (slight positive expected due to BJ being good for both). |r| < 0.05 typical.

Interpretation: Strong negative r (< -0.1): suspicious seed selection. Strong positive r: natural (good cards help both).

Example:
r = Σ((xi - x̄)(yi - ȳ)) / (n × sx × sy) where x = side bet profit, y = main bet profit.
#26Suited Trips Multiplier PrecisionDETERMINISTIC

Description: Verify that the payout for suited trips uses the full-precision multiplier 121.2307692... (= 121 + 3/13 = 1576/13), not a rounded approximation.

Mathematical Basis: Floating-point truncation at bet × 121.23 instead of bet × 121.2307692... would create a tiny house edge on every suited trips hit.

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

Interpretation: Rounding to 121.23 loses 0.0007692..., which over millions of bets creates measurable edge.

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

Positive Findings

#17Card Counting Impossibility ProofDETERMINISTIC

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

Mathematical Basis: Each draw is independent with replacement. The deck never depletes. Running count provides zero predictive value.

Expected Value: Confirmed by per-cursor uniformity tests and conditional independence tests.

Interpretation: This is a positive finding — the game is immune to advantage play techniques that exploit finite-deck card removal.

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

Anti-Manipulation

#18Bet-Size InvarianceDETERMINISTIC

Description: Verify that hands played at different stakes (Phase A: $0.01 vs Phase E: $10) produce the same cards given the same seed/nonce/cursor.

Mathematical Basis: The bet amount is not an input to the HMAC. Cards are determined solely by serverSeed, clientSeed, nonce, cursor.

Expected Value: Card generation is independent of bet size. Any correlation = bet discrimination.

Interpretation: Run same seed+nonce+cursor at different stakes: must produce identical cards.

Example:
Phase A bet at nonce 5: cards [8H, JH, 3C, KD, ...]. Phase E same seed/nonce: must produce identical sequence.
#21Simulation Pass 2 — Cherry-Pick DetectionSTATISTICAL

Description: For each revealed casino seed, simulate 100K hands. Compare early-nonce RTP (nonces used in live play) vs extended-nonce RTP. Flag if early window is systematically worse.

Mathematical Basis: If the casino pre-computes multiple seeds and picks the one that produces the worst early outcomes, early-nonce RTP will be lower than extended-nonce RTP.

Expected Value: ~5% of seeds flagged by chance (binomial at α=0.05). Binomial test on flag count.

Interpretation: Significantly more flags than expected → evidence of cherry-pick bias.

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

Infinite Deck Proof

#19Duplicate Card ConfirmationDETERMINISTIC

Description: Find hands where the same card (rank+suit) appears multiple times. Under infinite deck this is expected (P ≈ 1 - (51/52)^(n-1) per additional card). Under finite deck it would be impossible.

Mathematical Basis: Independent draws with replacement produce duplicates naturally. This is direct proof of infinite deck implementation.

Expected Value: Multiple duplicate-card hands in 6,000 hands. Already confirmed: dealer dealt 2S, 2S in same hand.

Interpretation: Duplicates found → infinite deck confirmed. Zero duplicates in 6K hands → P < 0.001, would reject infinite deck model.

Example:
In 6 cards per hand: P(at least one duplicate) ≈ 1 - (52!/46!) / 52^6 ≈ 26.3%.

RTP Verification

#20Simulation Pass 1 — Monte Carlo RTPSTATISTICAL

Description: Simulate 10M+ hands with basic strategy using fresh random seeds. Compute empirical RTP. Compare to theoretical ~99.49% (S17, infinite deck, no edge deduction).

Mathematical Basis: Law of large numbers: empirical RTP converges to theoretical. Fisher's method across multiple streams eliminates single-seed bias.

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

Interpretation: Deviation > 0.1% at 10M rounds: investigate. The simulation validates the basic strategy engine AND the RNG implementation.

Example:
10 streams × 1M hands each. Per-stream: compute RTP, chi-squared on outcome distribution. Fisher's T = -2 Σ ln(p_i).

Side Bet Verification

#22Perfect Pairs Zero-Edge ProofDETERMINISTIC

Description: Prove analytically that the PP pay table (27/11/7) has exactly 0% house edge under infinite deck by computing EV = Σ P(outcome) × multiplier - 1.

Mathematical Basis: EV = (1/52)(27) + (1/52)(11) + (2/52)(7) - 1 = 52/52 - 1 = 0. The multiplier sum 1×27 + 1×11 + 2×7 = 52 = denominator.

Expected Value: EV = 0.000000. Exact.

Interpretation: This proves the side bet is fair by construction. The pay table was designed for infinite deck.

Example:
27/52 + 11/52 + 14/52 = 52/52 = 1.000000. Subtract 1 (cost of bet) = 0.
#2321+3 Zero-Edge ProofDETERMINISTIC

Description: Prove analytically that the 21+3 pay table has approximately 0% house edge under infinite deck. The suited trips multiplier 121+3/13 was back-calculated for this purpose.

Mathematical Basis: Enumerate all 52^3 ordered triplets, classify each into hand types, compute weighted EV. The irrational multiplier 121.230769... = 1576/13 is the exact value that zeros the EV.

Expected Value: EV ≈ 0.00% (within rounding of the multiplier precision).

Interpretation: Near-zero EV confirms the multiplier was designed for infinite deck. Any material deviation would indicate the game uses a different deck model.

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

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

Eight 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 unless otherwise noted.

PhaseHandsStakeSide BetsStrategyPurpose
A2,500$0.01Both $0.01Basic strategyBaseline coverage — main game + both side bets under optimal play
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 seed16 auditor-chosen client seeds — proves client seed influences outcome
E200$10NoneBasic strategyBet-size invariance — same RNG at 1000x the stake
F300$0.01PP $0.10Basic strategyPerfect Pairs payout isolation — higher side bet for precision
G500$0.0121+3 $0.10Basic strategy21+3 payout isolation — higher side bet for precision
H500$0.01Both $0.01Multi-split focusSplit every pair — cursor ordering across split hands, re-split testing

Expected Coverage at 6,000 Hands

Natural Blackjacks
~284
4.73% of hands
Doubles
~600
10% of hands
Splits
~150
2.5% of hands
Perfect Pair Hits
~230
At 3K active hands
21+3 Wins
~300
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 — 28 Scored Steps

Steps 1–18 follow the standardized ProvablyFair.org framework (identical ordering across all audits). Steps 19–28 are blackjack-specific. Each step is either DETERMINISTIC (zero tolerance) or STATISTICAL (threshold-based with Bonferroni correction where applicable).

#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 outcome (BJ 2.5x, win 2x, push 1x, etc.)
8Multiplier ProvenanceDETSide bet multipliers match /api/v2/blackjack/config
9Bet-Size InvarianceDETPhase E ($10) 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 8 phases (A-H) 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-CircularityDETRTP computed from independent probability model, not casino data
17Simulation Pass 1STAT10M+ hands, Fisher's method — empirical RTP matches theoretical
18Pass 2 Cherry-Pick DetectionSTATCasino seeds tested for early-nonce bias
Blackjack-Specific Steps
19Card Recomputation (All Cursors)DETEvery cursor position verified — player, dealer, hits, splits, doubles
20Dealer Rule ComplianceDETDealer hits/stands correctly per H17 or S17 for every hand
21Blackjack Payout (3:2)DETEvery natural BJ pays exactly 2.5x
22Double PayoutDETWin=4x, push=2x, loss=0 on doubled hands
23Split Cursor OrderingDETSequential cursors across split hands — no reuse, no gaps
24Split Payout IndependenceDETEach split hand evaluated and paid independently
25Perfect Pairs PayoutDETPP classification matches cards, payout matches config (27/11/7)
2621+3 PayoutDETHand classification correct, payout matches config (121.23/53/32/12/5)
27Side Bet IndependenceDETResults based only on initial 3 cards, unchanged by player actions
28Card Distribution Chi-SquaredSTATAll 52 card types at 1/52 frequency across ~30,000 draws

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
A2,500$0.01PP $0.01 + 21+3 $0.01$0.03$75.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
F300$0.01PP $0.10$0.11$33.00
G500$0.0121+3 $0.10$0.11$55.00
H500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
Total Wagered$2,238.00
MetricValueExplanation
Total wagered$2,238.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.41$2,238 x 0.51% = $11.41 — 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σ)~$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,238 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
A2,500$0.01PP $0.01 + 21+3 $0.01$0.03$75.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
F300$0.01PP $0.10$0.11$33.00
G500$0.0121+3 $0.10$0.11$55.00
H500$0.01PP $0.01 + 21+3 $0.01$0.03$15.00
Total Wagered$438.00
MetricValueExplanation
Total wagered$438.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)$2.23$438 x 0.51% = $2.23
Side bet expected loss$0.00Both side bets are 0% edge under infinite deck
Worst-case variance (3σ)~$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,238
Total wagered
Scenario B ($1)
$438
Total wagered
Expected Loss (A)
$11.41
At 0.51% edge
Expected Loss (B)
$2.23
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