Page cover

cardsBlackjack

Single-player heads-up blackjack against a deterministic onchain dealer. Every card you draw is a separate Chainlink VRF random word.

How it works

Blackjack is the most stateful of the Overtime Casino games, because the player makes choices mid-hand. The contract handles this with a proper state machine — and every state transition that requires randomness issues its own Chainlink VRF request.

The hand lifecycle:

NONE
  → AWAITING_DEAL (initial 4 cards: 2 player, 2 dealer)
  → PLAYER_TURN
      → AWAITING_HIT          (player draws another card)
      → AWAITING_STAND        (dealer plays out per house rules)
      → AWAITING_DOUBLE       (player doubles stake, draws one card, dealer plays)
      → AWAITING_SPLIT        (player splits a pair into two parallel hands)
  → RESOLVED

Each of those AWAITING_* states corresponds to a pending VRF request. You cannot be dealt a card that the dealer "already knew." The contract literally does not know your next card until Chainlink's oracle network returns the random word.


House rules

  • European single-deck logic with rank values Ace through King

  • Blackjack pays 3:2 on a natural (Ace + 10-value card on the initial deal, when the dealer doesn't also have blackjack)

  • Regular wins pay 1:1

  • Push refunds the stake (player and dealer tie)

  • Dealer hits on soft 17 (DEALER_STAND_THRESHOLD = 17)

  • Doubling doubles your stake, draws exactly one card, and stands automatically — the contract re-checks bankroll liquidity at the moment you double

  • Splitting a pair creates a second parallel hand with its own VRF lifecycle and independent resolution

  • Maximum cards per hand: 11


Possible outcomes

Result
Description
Payout

Player Blackjack

Natural 21 on initial deal, dealer doesn't have one

2.5× stake (3:2 + stake)

Player Win

Player total > dealer total, neither busts

2× stake (1:1 + stake)

Dealer Bust

Dealer > 21

2× stake

Push

Player and dealer same total, or both blackjack

Stake refunded

Player Bust

Player > 21

Loss

Dealer Win

Dealer total > player total, neither busts

Loss

For split hands, each sub-hand resolves independently. You can win one and lose the other.


Limits

Parameter
Value

Minimum bet

3 USD

Maximum profit per hand

Set per deployment (maxProfitUsd)

Cancel timeout

30 seconds minimum

Supported collaterals: USDC, WETH, $OVER.


User guide

1. Open the Blackjack table

Select Blackjack from the casino lobby. Pick your collateral and stake.

[Screenshot — Blackjack lobby tile and stake entry]

2. Deal

Click Deal, sign the deal transaction. The contract requests randomness for the initial four cards (your two cards + dealer's two cards, with one face-down).

[Screenshot — initial deal animation]

3. Make your move

Once the deal resolves, you'll see your hand and the dealer's face-up card. Choose:

  • Hit — draw one more card

  • Stand — end your turn, dealer plays out

  • Double Down — double your stake, draw exactly one card, end turn (only available on first move)

  • Split — if your two starting cards are a pair, split them into two hands (creates a parallel hand)

Each action is a separate transaction. Each draw is a separate Chainlink VRF request.

[Screenshot — player turn with action buttons]

4. Dealer plays

When you stand (or bust), the dealer's hidden card is revealed and the dealer plays out: hits until reaching at least 17. The contract enforces this deterministically — there's no human dealer making decisions.

[Screenshot — dealer plays out]

5. Resolution

The contract computes the winner, transfers your payout if you won (or refunds on push), and emits a BetResolved event with the full result. The hand's complete history — every card, every action — is reconstructable from the event log.

[Screenshot — final hand result]

Cancelling a stuck hand

If a VRF request stalls, the cancel timeout applies the same way it does in every other game. After 30+ seconds you can cancel the pending action and recover your committed stake.


Why this matters

Online blackjack has always asked you to trust the operator's "shoe." Some sites publish hashes you can verify after the fact. Some don't. Some operators have been caught dealing from non-uniform decks; some affiliated streamers have been caught playing against scripted shoes.

Overtime Blackjack closes that entire category of question:

  • There is no shoe. Cards are sampled fresh from a Chainlink VRF random word every time you draw.

  • There is no dealer who knew your next card. The contract doesn't know it until Chainlink fulfills.

  • There is no operator who can replay a hand to a more favorable outcome. State transitions are one-way; each one is committed to chain.

If you've ever wondered whether an online blackjack site is dealing from a fair shoe, here's your answer: the shoe doesn't exist until Chainlink generates it.


Free bets

Blackjack supports placeBetWithFreeBet for the initial deal. Free-bet hands play through the same state machine and settle through the existing Overtime free-bets infrastructure.

Last updated