Mathematical Analysis Engine — Pre-Audit Research Document
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.
serverSeed and commits SHA-256(serverSeed) before playclientSeed (can be customized)nonce (0, 1, 2, ...)hash = HMAC-SHA256(hex_decode(serverSeed), clientSeed + ":" + nonce + ":" + cursor)| Cursor | Recipient | Card |
|---|---|---|
| 0 | Player — Card 1 | Face up |
| 1 | Dealer — Card 1 (hole) | Face down |
| 2 | Player — Card 2 | Face up |
| 3 | Dealer — Card 2 (upcard) | Face up |
| 4+ | Hits / Splits / Doubles | Sequential |
Server seed: 27fa3967c605e599f2580abe7a33e36cada3bd3610ee8639fdafe7b78394a215
Client seed: wcJKB0KlS07Nrg2_ | Nonce: 5
SHA-256 commitment: 28270a5db414681ca20549fedc6c2284d365b122414dd68cf31f6f7b0bfe16bf
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.
| Upcard | Bust | 17 | 18 | 19 | 20 | 21 | BJ | Total |
|---|---|---|---|---|---|---|---|---|
| 2 | 35.36% | 13.98% | 13.49% | 12.97% | 12.40% | 11.80% | 0.00% | 100.00% |
| 3 | 37.39% | 13.50% | 13.05% | 12.56% | 12.03% | 11.47% | 0.00% | 100.00% |
| 4 | 39.45% | 13.05% | 12.59% | 12.14% | 11.65% | 11.12% | 0.00% | 100.00% |
| 5 | 41.64% | 12.23% | 12.23% | 11.77% | 11.31% | 10.82% | 0.00% | 100.00% |
| 6 | 42.32% | 16.54% | 10.63% | 10.63% | 10.17% | 9.72% | 0.00% | 100.00% |
| 7 | 26.23% | 36.86% | 13.78% | 7.86% | 7.86% | 7.41% | 0.00% | 100.00% |
| 8 | 24.47% | 12.86% | 35.93% | 12.86% | 6.94% | 6.94% | 0.00% | 100.00% |
| 9 | 22.84% | 12.00% | 12.00% | 35.08% | 12.00% | 6.08% | 0.00% | 100.00% |
| 10 | 19.58% | 10.29% | 10.29% | 10.29% | 31.59% | 10.29% | 7.69% | 100.00% |
| A | 7.98% | 9.05% | 9.05% | 9.05% | 9.05% | 25.03% | 30.77% | 100.00% |
| Upcard | Bust | 17 | 18 | 19 | 20 | 21 | BJ | Total |
|---|---|---|---|---|---|---|---|---|
| 2 | 35.67% | 13.01% | 13.65% | 13.13% | 12.57% | 11.96% | 0.00% | 100.00% |
| 3 | 37.67% | 12.63% | 13.20% | 12.71% | 12.18% | 11.62% | 0.00% | 100.00% |
| 4 | 39.71% | 12.24% | 12.73% | 12.28% | 11.79% | 11.26% | 0.00% | 100.00% |
| 5 | 41.77% | 11.84% | 12.29% | 11.84% | 11.38% | 10.89% | 0.00% | 100.00% |
| 6 | 43.95% | 11.48% | 11.48% | 11.48% | 11.03% | 10.57% | 0.00% | 100.00% |
| 7 | 26.23% | 36.86% | 13.78% | 7.86% | 7.86% | 7.41% | 0.00% | 100.00% |
| 8 | 24.47% | 12.86% | 35.93% | 12.86% | 6.94% | 6.94% | 0.00% | 100.00% |
| 9 | 22.84% | 12.00% | 12.00% | 35.08% | 12.00% | 6.08% | 0.00% | 100.00% |
| 10 | 19.58% | 10.29% | 10.29% | 10.29% | 31.59% | 10.29% | 7.69% | 100.00% |
| A | 9.62% | 3.98% | 9.91% | 9.91% | 9.91% | 25.89% | 30.77% | 100.00% |
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.
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | A | |
|---|---|---|---|---|---|---|---|---|---|---|
| 5 | H | H | H | H | H | H | H | H | H | H |
| 6 | H | H | H | H | H | H | H | H | H | H |
| 7 | H | H | H | H | H | H | H | H | H | H |
| 8 | H | H | H | H | H | H | H | H | H | H |
| 9 | H | D | D | D | D | H | H | H | H | H |
| 10 | D | D | D | D | D | D | D | D | H | H |
| 11 | D | D | D | D | D | D | D | D | D | H |
| 12 | H | H | S | S | S | H | H | H | H | H |
| 13 | S | S | S | S | S | H | H | H | H | H |
| 14 | S | S | S | S | S | H | H | H | H | H |
| 15 | S | S | S | S | S | H | H | H | H | H |
| 16 | S | S | S | S | S | H | H | H | H | H |
| 17 | S | S | S | S | S | S | S | S | S | S |
| 18 | S | S | S | S | S | S | S | S | S | S |
| 19 | S | S | S | S | S | S | S | S | S | S |
| 20 | S | S | S | S | S | S | S | S | S | S |
| 21 | S | S | S | S | S | S | S | S | S | S |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | A | |
|---|---|---|---|---|---|---|---|---|---|---|
| 13 | H | H | H | H | H | H | H | H | H | H |
| 14 | H | H | H | H | H | H | H | H | H | H |
| 15 | H | H | H | H | H | H | H | H | H | H |
| 16 | H | H | D | D | D | H | H | H | H | H |
| 17 | H | D | D | D | D | H | H | H | H | H |
| 18 | S | Ds | Ds | Ds | Ds | S | S | H | H | H |
| 19 | S | S | S | S | S | S | S | S | S | S |
| 20 | S | S | S | S | S | S | S | S | S | S |
| 21 | S | S | S | S | S | S | S | S | S | S |
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | A | |
|---|---|---|---|---|---|---|---|---|---|---|
| A | P | P | P | P | P | P | P | P | P | P |
| 10 | S | S | S | S | S | S | S | S | S | S |
| 9 | P | P | P | P | P | S | P | P | S | S |
| 8 | P | P | P | P | P | P | P | P | P | P |
| 7 | P | P | P | P | P | P | H | H | H | H |
| 6 | P | P | P | P | P | H | H | H | H | H |
| 5 | D | D | D | D | D | D | D | D | H | H |
| 4 | H | H | H | P | P | H | H | H | H | H |
| 3 | P | P | P | P | P | P | H | H | H | H |
| 2 | P | P | P | P | P | P | H | H | H | H |
Perfect Pairs evaluates the player's first two cards. Under infinite deck (independent draws at 1/52), the probabilities simplify to exact fractions.
| Outcome | Probability | Multiplier | EV Contribution | Formula |
|---|---|---|---|---|
| Perfect Pair | 0.0192307692 | 27x | +0.5192307692 | P = 1/52 (same rank + same suit) |
| Colored Pair | 0.0192307692 | 11x | +0.2115384615 | P = 1/52 (same rank + same color + different suit) |
| Mixed Pair | 0.0384615385 | 7x | +0.2692307692 | P = 2/52 (same rank + different color) |
| No Pair (loss) | 0.9230769231 | −1 | +0.0000000000 | P = 48/52 (different rank) |
| Total EV | 0.0000000000 |
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.
| Outcome | Infinite Deck P | 6-Deck P | Multiplier | EV (Infinite) | EV (6-Deck) |
|---|---|---|---|---|---|
| Perfect Pair | 0.019231 | 0.016077 | 27x | 0.519231 | 0.434084 |
| Colored Pair | 0.019231 | 0.019293 | 11x | 0.211538 | 0.212219 |
| Mixed Pair | 0.038462 | 0.038585 | 7x | 0.269231 | 0.270096 |
| No Pair | 0.923077 | 0.926045 | -1 | -0.923077 | -0.926045 |
| Total EV | 0.000000 | -0.083601 |
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.
| Outcome | Probability | Multiplier | EV Contribution | Formula |
|---|---|---|---|---|
| Suited Trips | 0.0003698225 | 121.2307692x | +0.0448338643 | P = 1/2704 = 0.0003698225 |
| Straight Flush | 0.0020482476 | 53x | +0.1085571234 | P = 288/140608 = 0.0020482476 |
| Three of a Kind | 0.0055473373 | 32x | +0.1775147929 | P = 15/2704 = 0.0055473373 |
| Straight | 0.0307237142 | 12x | +0.3686845699 | P = 4320/140608 = 0.0307237142 |
| Flush | 0.0600819299 | 5x | +0.3004096495 | P = 8448/140608 = 0.0600819299 |
| No Win (loss) | 0.9012289486 | −1 | +0.0000000000 | P = 1 - sum(above) = 0.9012289486 |
| Total EV | -0.0000000000 |
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.
The base game house edge under infinite deck depends on the rule set. Duel's confirmed rules and their impact:
| Rule | Status | Effect on House Edge |
|---|---|---|
| Dealer hits soft 17 (H17 vs S17) | TBD | +0.22% |
| Double after split allowed (DAS) | Confirmed | -0.14% |
| No surrender | Confirmed | +0.07% |
| Resplit aces | TBD | -0.08% |
| No resplit aces | TBD | +0.08% |
| Blackjack pays 3:2 | Confirmed | 0.00% |
| Infinite deck (vs 8-deck) | Confirmed | +0.08% |
| Baseline House Edge (S17, Infinite Deck) | 0.5117% |
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.
| Bet Type | effective_edge Value | Interpretation |
|---|---|---|
| Main bet | 0.1 (10%) | Fee/rake on net winnings — distinct from game math |
| Perfect Pairs | 0 (0%) | Zero edge — confirmed by analytical proof above |
| 21+3 | 0 (0%) | Zero edge — confirmed by analytical proof above |
These expected values validate the simulation engine. If simulated outcomes don't match within 2σ at 10M rounds, the engine has a bug.
| Metric | Value |
|---|---|
| P(dealer BJ | Ace upcard) | 4/13 = 0.307692 = 30.77% |
| Insurance payout | 2:1 |
| Insurance EV | 2 × (4/13) − 1 × (9/13) = −1/13 = -7.69% |
| Expected in 6K hands | ~460 Ace upcards, ~142 dealer BJs |
| Metric | Value |
|---|---|
| P(player BJ) | 2 × (4/13) × (1/13) = 8/169 = 0.047337 = 4.73% |
| Expected in 6K hands | 284 ± 16.4 (1σ) |
| P(dealer BJ) | 8/169 = 4.73% (same as player) |
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.
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.
HMAC-SHA256(hex_decode("27fa39..."), "wcJKB0KlS07Nrg2_:5:0") → hash → readUint32BE(0) → mod 52 → card index → CARDS[index]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.
SHA-256("27fa3967c605e599...") = "5e71cdbf40dc2486..." → matches committed hashDescription: 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).
Split hand: P1=cursor0, D_down=cursor1, P2=cursor2, D_up=cursor3, split_card_1=cursor4, split_card_2=cursor5, hit_hand1=cursor6...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.
Epoch 1: nonces 0,1,2,3,4,5. Gap at 6 → investigate. Nonce 7 continues → 1 gap.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.
X² = Σ(observed_i - expected_i)² / expected_i for i = 0..51. Expected = N/52 for each card.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.
For cursor 0: count each card across all hands. Expected = 6000/52 = 115.4. Chi-squared test.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.
Group all hands by dealer upcard. For upcard=6: count how many times hole card ∈ {10,J,Q,K}. Expected ratio: 4/13.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.
z = (observed - 284) / 16.4. p-value from standard normal.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.
Encode outcomes: win=1, push=0, loss=-1. Compute lag-1 r, z = r × sqrt(N). Wald-Wolfowitz on binary (win vs not-win).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.
At 30,000 draws: expected 2,308 per rank. χ²(12) on observed vs expected.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.
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.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.
At 6,000 hands: expected busts ≈ 1,776. Observed: compare. χ²(5) test on {17,18,19,20,21,bust} categories.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.
Count Ace upcards: N. Count dealer BJs among those: k. z = (k/N - 4/13) / sqrt((4/13)(9/13)/N).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).
Bet $0.01, BJ win: amount_won should be 0.01 × 2.5 = $0.025. PP win 27x: add 0.01 × 27 = $0.27.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).
Bet $0.01: natural BJ amount_won = $0.025. Confirmed in test hands (nonces 20, 34).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.
Bet $0.01, double: total wager $0.02. Win: amount_won = $0.04. Push: amount_won = $0.02.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.
Cards: QS, QS → same rank (Q), same suit (S) → Perfect Pair → payout = bet × 27.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.
Cards: 9H, JD, 10S → ranks 9,J,10 → consecutive (9,10,J) → different suits → Straight → payout = bet × 12.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.
Compare side_bet_results from POST /blackjack (deal) vs POST /blackjack/{id}/stand (final).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).
r = Σ((xi - x̄)(yi - ȳ)) / (n × sx × sy) where x = side bet profit, y = main bet profit.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.
Bet $0.01: suited trips payout should be $1.212307692..., not $1.2123.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.
After seeing 100 aces in 1000 hands: P(next card = Ace) still = 4/52 = 1/13. Card counting advantage = 0.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.
Phase A bet at nonce 5: cards [8H, JH, 3C, KD, ...]. Phase E same seed/nonce: must produce identical sequence.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.
Seeds tested: 110. Flags: k. Binomial p = P(X >= k | n=110, p=0.05). PASS if p >= 0.01.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.
In 6 cards per hand: P(at least one duplicate) ≈ 1 - (52!/46!) / 52^6 ≈ 26.3%.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.
10 streams × 1M hands each. Per-stream: compute RTP, chi-squared on outcome distribution. Fisher's T = -2 Σ ln(p_i).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.
27/52 + 11/52 + 14/52 = 52/52 = 1.000000. Subtract 1 (cost of bet) = 0.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.
P(suited trips) × 121.23 + P(SF) × 53 + P(3oaK) × 32 + P(straight) × 12 + P(flush) × 5 - P(no win) = ~0%.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.
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.
| Phase | Hands | Stake | Side Bets | Strategy | Purpose |
|---|---|---|---|---|---|
| A | 2,500 | $0.01 | Both $0.01 | Basic strategy | Baseline coverage — main game + both side bets under optimal play |
| B | 1,000 | $0.01 | Both $0.01 | Aggressive (hit to 16+) | Extended cursor consumption — verifies cards beyond cursor 4 |
| C | 500 | $0.01 | Both $0.01 | Split/double priority | Force splits and doubles whenever available — cursor ordering verification |
| D | 500 | $0.01 | Both $0.01 | Custom client seed | 16 auditor-chosen client seeds — proves client seed influences outcome |
| E | 200 | $10 | None | Basic strategy | Bet-size invariance — same RNG at 1000x the stake |
| F | 300 | $0.01 | PP $0.10 | Basic strategy | Perfect Pairs payout isolation — higher side bet for precision |
| G | 500 | $0.01 | 21+3 $0.10 | Basic strategy | 21+3 payout isolation — higher side bet for precision |
| H | 500 | $0.01 | Both $0.01 | Multi-split focus | Split every pair — cursor ordering across split hands, re-split testing |
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 Name | Type | What It Proves |
|---|---|---|---|
| 1 | Seed Hash Integrity | DET | SHA-256(serverSeed) matches pre-committed hash |
| 2 | Commitment Linkage | DET | nextServerSeedHash chains to next epoch's serverSeedHashed |
| 3 | Hash Consistency Within Epoch | DET | All bets in epoch use the same server seed hash |
| 4 | Nonce Audit | DET | Sequential nonces 0,1,2,...,n-1 — no gaps or duplicates |
| 5 | Outcome Recomputation | DET | Every card matches HMAC-SHA256 output at correct cursor |
| 6 | Client Seed Influence | DET | Changing client seed produces different cards |
| 7 | Payout Math | DET | amount_won = correct payout for outcome (BJ 2.5x, win 2x, push 1x, etc.) |
| 8 | Multiplier Provenance | DET | Side bet multipliers match /api/v2/blackjack/config |
| 9 | Bet-Size Invariance | DET | Phase E ($10) cards recompute identically to $0.01 cards |
| 10 | House Edge Audit | DET | effective_edge field consistent across all hands |
| 11 | Config Completeness | DET | All side bet hand types present in config |
| 12 | Epoch Size | DET | All epochs within expected nonce range |
| 13 | Phase Labels | DET | All 8 phases (A-H) present in dataset |
| 14 | Dataset Hash | DET | SHA-256 of dataset file matches pinned value |
| 15 | Phase D Client Seed Variation | DET | 500 hands with auditor client seeds — all recomputed correctly |
| 16 | Anti-Circularity | DET | RTP computed from independent probability model, not casino data |
| 17 | Simulation Pass 1 | STAT | 10M+ hands, Fisher's method — empirical RTP matches theoretical |
| 18 | Pass 2 Cherry-Pick Detection | STAT | Casino seeds tested for early-nonce bias |
| Blackjack-Specific Steps | |||
| 19 | Card Recomputation (All Cursors) | DET | Every cursor position verified — player, dealer, hits, splits, doubles |
| 20 | Dealer Rule Compliance | DET | Dealer hits/stands correctly per H17 or S17 for every hand |
| 21 | Blackjack Payout (3:2) | DET | Every natural BJ pays exactly 2.5x |
| 22 | Double Payout | DET | Win=4x, push=2x, loss=0 on doubled hands |
| 23 | Split Cursor Ordering | DET | Sequential cursors across split hands — no reuse, no gaps |
| 24 | Split Payout Independence | DET | Each split hand evaluated and paid independently |
| 25 | Perfect Pairs Payout | DET | PP classification matches cards, payout matches config (27/11/7) |
| 26 | 21+3 Payout | DET | Hand classification correct, payout matches config (121.23/53/32/12/5) |
| 27 | Side Bet Independence | DET | Results based only on initial 3 cards, unchanged by player actions |
| 28 | Card Distribution Chi-Squared | STAT | All 52 card types at 1/52 frequency across ~30,000 draws |
| Parameter | Value | Rationale |
|---|---|---|
| Pass 1 — Fresh Seeds | 10 streams x 1M hands = 10M | Fisher's method eliminates single-seed bias |
| Strategy | Full basic strategy (hit/stand/double/split) | Infinite deck optimal play — total-dependent only |
| Side Bets | Both active on all simulated hands | Validates PP + 21+3 RTP independently |
| Pass 2 — Casino Seeds | ~110 seeds x 100K nonces | Cherry-pick detection via early vs extended window |
| Serial Independence | Lag-1 + Wald-Wolfowitz per stream | Bonferroni-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 |
| # | Chapter | Content |
|---|---|---|
| 1 | Executive Summary | Verdict, key numbers, scope |
| 2 | Game Rules | Infinite deck, BJ 3:2, dealer rules, insurance, side bets |
| 3 | RNG Algorithm Analysis | HMAC-SHA256, rejection sampling, card mapping, worked example |
| 4 | Game Logic Verifiability | Deal sequence, cursor ordering, split mechanics |
| 5 | Live Parity Testing | Seed management, epoch structure, commitment chain |
| 6 | RTP Analysis | Main game + PP + 21+3, anti-circularity, simulation results |
| 7 | Side Bet Analysis | Zero-edge proofs, probability tables, pay table design |
| 8 | Dealer Behavior Analysis | Markov chain, H17/S17 determination, bust rate verification |
| 9 | Optimal Play Engine | Basic strategy derivation, infinite deck differences, RTP computation |
| 10 | Edge-Case Analysis | Card distribution, cursor uniformity, conditional independence |
| 11 | Exploit Testing | 28-test matrix, attack surface coverage |
| 12 | Simulation Methodology | Fisher's method, multi-stream, Pass 1 + Pass 2 |
| 13 | Operator Trust Analysis | Commit-reveal model, cherry-pick risk, entropy assessment |
| 14 | Recommendations | Findings, future audit items, disclosure notes |
| 15 | Conclusion | Final verdict with evidence chain |
| 16 | Glossary | Terms, definitions, formulas |
| 17 | Reproducibility | Dataset hash, npm commands, dependencies |
| 18 | Evidence Appendix | Artifacts, screenshots, JSON outputs |
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.
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.
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.
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.
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.
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.
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.
| Phase | Hands | Main Stake | Side Bets | Wager/Hand | Total Wagered |
|---|---|---|---|---|---|
| A | 2,500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $75.00 |
| B | 1,000 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $30.00 |
| C | 500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $15.00 |
| D | 500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $15.00 |
| E | 200 | $10.00 | None | $10.00 | $2,000.00 |
| F | 300 | $0.01 | PP $0.10 | $0.11 | $33.00 |
| G | 500 | $0.01 | 21+3 $0.10 | $0.11 | $55.00 |
| H | 500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $15.00 |
| Total Wagered | $2,238.00 | ||||
| Metric | Value | Explanation |
|---|---|---|
| Total wagered | $2,238.00 | Sum of all bets placed across 6,000 hands |
| Expected loss (0% edge / zero edge window) | $0.00 | Under 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.00 | Both side bets are 0% edge under infinite deck (proven in Sections 4-5) |
| Worst-case variance (3σ) | ~$80 | At $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 | $150 | Comfortable buffer. Phase E runs 200 hands at $10 — balance fluctuates ±$50 around starting point. |
| Phase | Hands | Main Stake | Side Bets | Wager/Hand | Total Wagered |
|---|---|---|---|---|---|
| A | 2,500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $75.00 |
| B | 1,000 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $30.00 |
| C | 500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $15.00 |
| D | 500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $15.00 |
| E | 200 | $1.00 | None | $1.00 | $200.00 |
| F | 300 | $0.01 | PP $0.10 | $0.11 | $33.00 |
| G | 500 | $0.01 | 21+3 $0.10 | $0.11 | $55.00 |
| H | 500 | $0.01 | PP $0.01 + 21+3 $0.01 | $0.03 | $15.00 |
| Total Wagered | $438.00 | ||||
| Metric | Value | Explanation |
|---|---|---|
| Total wagered | $438.00 | Sum of all bets placed across 6,000 hands |
| Expected loss (0% edge / zero edge window) | $0.00 | Under 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.00 | Both side bets are 0% edge under infinite deck |
| Worst-case variance (3σ) | ~$25 | At $1/hand, manageable swings |
| Minimum wallet balance needed | $20 | $1/hand + small buffer. Most phases run at $0.01. |
| Recommended wallet balance | $30 | Comfortable for all phases including $1 Phase E. |
| Question | How It Gets Answered | Impact If Different |
|---|---|---|
| Soft 17 — dealer hits or stands? | Observe ~400 dealer soft-17 hands | H17 adds +0.22% house edge |
| Split cursor ordering | Phase C + Phase H split hands | Wrong ordering = card manipulation |
| Re-split allowed? | Phase H multi-split focus | Affects 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 multiplier | Accept insurance on dealer Ace, verify 2:1 | Non-standard payout = different EV |
| Colored Pair (11x) | Observe same-rank+same-color+different-suit | Already proven analytically — need empirical confirmation |
BLACKJACK MATH ENGINE v1.0 | PROVABLYFAIR.ORG | APRIL 2026