How to Verify Blackjack Games

Provably Fair Verification

Every blackjack game is provably fair - anyone can independently verify the card dealing using the same algorithm the server uses. The operator cannot manipulate the outcome because card shuffling uses blockchain entropy that cannot be predicted in advance.

How It Works

Our provably fair system uses two sources of entropy:

  1. Server Seed: A random 32-byte seed generated by the server. The server publishes a SHA256 hash of this seed before the game starts, committing to the seed without revealing it.
  2. Block Hash: The Monero block hash at game start, obtained from the blockchain. This provides unpredictable entropy that neither the server nor player can control.

The shuffle: The deck is shuffled using these two entropy sources combined, making the dealing order completely unpredictable and verifiable.

What You Need to Verify

To verify any blackjack game, you need:

  1. Game ID from the game page URL or API response
  2. Server Seed Hash shown on the game board (published before game starts)
  3. Block Hash shown on the game board (Monero blockchain at game start)
  4. Server Seed Hex revealed after game ends (proves the seed used)
  5. Actions Log showing all player actions (hit, stand, double)

Verification Steps

Step 1: Get the game verification data from the game board or API

After each game, the verification section shows:

Step 2: Verify the seed commitment

SHA256(server_seed_hex) must equal server_seed_hash

Step 3: Reproduce the deck shuffle

seed_material = bytes.fromhex(server_seed_hex) + bytes.fromhex(block_hash)
seed_hash = SHA256(seed_material)
rng = ProvablyFairRNG(seed_hash)
# Fisher-Yates shuffle using rng.next_int()

Step 4: Deal the cards in the same order and verify the outcome

The Verification Algorithm

Step 1 - Seed Commitment Check:

SHA256(server_seed_hex) == server_seed_hash

This proves the server used the seed they committed to.

Step 2 - Deck Shuffle:

seed_material = server_seed_bytes + block_hash_bytes
seed_hash = SHA256(seed_material)
rng = ProvablyFairRNG(seed_hash)

# Create standard 52-card deck
deck = [♠A, ♠2, ..., ♣K]

# Fisher-Yates shuffle
for i in range(51, 0, -1):
    j = rng.next_int(i + 1)
    deck[i], deck[j] = deck[j], deck[i]

Step 3 - Card Dealing:

Player: deck[0], deck[2]
Dealer: deck[1], deck[3]

For each hit/double:
    next_card = deck.pop(0)

Step 4 - Final Entropy (for additional verification):

actions_hash = SHA256(actions_log_json)
final_entropy = SHA256(server_seed + block_hash + actions_hash)

Why It's Provably Fair

The verification is provably fair because:

Verification on the Game Board

After each game, the Game Verification section shows all the data you need:

You can save this data and write your own verification script using the algorithm above, or verify manually by reproducing the deck shuffle.

Blackjack Rules Applied

Our game follows standard blackjack rules: