Documentation
How SpaceX Cards works

Everything you need to know about the game mechanics, payouts, and architecture.

Overview

SpaceX Cards is an on-chain card pulling game on Solana. Players pay 0.1 SOL per pull and receive a random rocket card. Each card has a fixed payout that is returned to the player's wallet.

Card tiers & payouts

TierRocketsChancePayoutHouse edge
CommonElectron, Soyuz60%0.02 SOL+0.08 SOL
RareFalcon 9, Atlas V25%0.05 SOL+0.05 SOL
EpicFalcon Heavy, Delta IV Heavy10%0.08 SOL+0.02 SOL
LegendarySLS, Saturn V4%0.15–0.2 SOL-0.05 to -0.1 SOL
MythicStarship1%0.5 SOL-0.4 SOL

Expected value per pull

The expected payout per pull is calculated as:

EV = (0.60 × 0.02) + (0.25 × 0.05) + (0.10 × 0.08) + (0.03 × 0.15) + (0.01 × 0.20) + (0.01 × 0.50)
EV = 0.012 + 0.0125 + 0.008 + 0.0045 + 0.002 + 0.005
EV = 0.044 SOL per pull

House edge = 0.1 - 0.044 = 0.056 SOL per pull (56% margin)

On average, the house retains 0.056 SOL per pull. This margin funds operations and the payout pool.

Payout flow

1
Player pays 0.1 SOL

Transaction sent to the house wallet. Confirmed on-chain.

2
Server verifies payment

API checks the transaction exists, amount is correct, and sender matches.

3
Card determined server-side

HMAC-SHA256(server_secret, tx_signature) produces the random seed. Impossible to predict or manipulate.

4
Payout sent to player

The house wallet sends the payout amount back to the player automatically.

Randomness & fairness

Card selection uses HMAC-SHA256(SERVER_SECRET, transaction_signature). The server secret is never exposed to clients. Each transaction signature is unique, so results can't be replayed or predicted. In production, this will be replaced with Switchboard VRF for fully on-chain provable randomness.

Security

  • No client-side randomness - server decides the outcome
  • Transaction verified on-chain before any card is revealed
  • Each tx signature can only be used once
  • Sender address validated against the wallet that signed
  • Payment amount verified ≥ 0.1 SOL to house wallet

Current status

  • Running on Solana mainnet with real SOL
  • Payouts are automated from the house wallet
  • Server-side HMAC randomness (VRF upgrade planned)
  • Replay protection via signature tracking

Production roadmap

  • Anchor program for atomic pay + reveal
  • Switchboard VRF for provably fair on-chain randomness
  • Automated payouts from program PDA
  • Pull history stored on-chain
  • Mainnet deployment