Rocket Crash Game: Web3 Crash & Coin Flip
Crash is one of the highest-engagement formats in crypto casino products - and one of the hardest to get right on-chain. Players bet, watch a multiplier climb, and cash out before the rocket crashes. If the RNG or settlement path is wrong, trust evaporates instantly.
I open-sourced a Rocket Crash Game with Crash and Coin Flip modes across Solana, Base, and Ethereum, built for provably fair gameplay and instant on-chain settlements.
What the project includes
- Crash game - multiplier curve, cash-out before crash, real-time rounds
- Coin Flip - fast PvP-style betting with on-chain resolution
- Multi-chain support - ETH, SOL, and BASE tokens
- Provably fair RNG - Chainlink VRF on EVM, verifiable randomness on Solana
- Deposits & withdrawals - direct on-chain fund handling
- Leaderboard & referrals - retention hooks for production deployments
Repo layout:
crash-game-frontend/ # React / Next.js player UI
crash-game-bakcend/ # Node.js API + WebSocket game loop
How crash works (player flow)
- Player deposits crypto to the game wallet / escrow contract
- Places a bet before the round starts
- Multiplier increases in real time (WebSocket feed from backend)
- Player cashes out at any multiplier before crash
- Winnings settle on-chain; losers forfeit stake to the house pool
The crash point must be determined before the round starts (commit-reveal or VRF pre-commit) so the operator cannot react to player cash-out behavior.
Provably fair randomness
On EVM chains (Ethereum, Base, Polygon), Chainlink VRF is the standard:
- Contract records bets and requests a random word
- VRF coordinator fulfills in a separate transaction
- Contract derives crash point from the random word + published house edge
On Solana, the Anchor program uses verifiable on-chain RNG patterns with the same principle: no blockhash, no timestamp, no server-side secrets.
Never use predictable entropy for casino outcomes - players and auditors will find it.
Multi-chain architecture
| Chain | Token | Smart contract |
|---|---|---|
| Ethereum | ETH | Solidity + Chainlink VRF |
| Base | BASE | Solidity L2 deployment |
| Solana | SOL | Rust + Anchor |
Shared frontend with chain-specific wallet adapters (MetaMask, Phantom, WalletConnect). Backend normalizes round state and pushes multiplier updates over WebSockets regardless of chain.
Tech stack
- Frontend: React, TypeScript, Next.js
- Backend: Node.js, Express, WebSockets
- Blockchain: Solidity (EVM), Anchor (Solana)
- Database: PostgreSQL for player stats and leaderboards
- Wallets: MetaMask, Phantom, WalletConnect
Security considerations
Production crash games need more than a demo contract:
- Verified contracts on block explorers for every chain
- Anti front-running - crash point committed before bets close
- Bot abuse limits - rate limits on cash-out API calls
- Treasury separation - house bankroll isolated from operational wallets
- VRF callback gas - budget for fulfillment on congested networks
For a full engineering guide on casino game types (dice, roulette, lottery, jackpot), see my Web3 casino games development guide.
Getting started
git clone https://github.com/casatrick/rocket-crash-game.git
cd rocket-crash-game
# Install frontend and backend separately - see README in each folderPrerequisites: Node.js 18+, wallet for testnet, RPC endpoints (Alchemy, QuickNode, or Helius for Solana).
Related projects
This crash game is part of a broader casino games portfolio:
- Web3 Casino Games platform - full engine with coinflip, dice, roulette, crash, lottery, jackpot
- Polygon casino games - Chainlink VRF suite on Polygon
Hire a casino games developer
Need crash, coinflip, or a full Web3 casino game engine shipped on Solana or EVM? See Web3 casino game engine development or contact me.