MCPcopy Index your code
hub / github.com/LaChance-Lab/solana-casino-games-evm-web3

github.com/LaChance-Lab/solana-casino-games-evm-web3 @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
89 symbols 122 edges 14 files 0 documented · 0% updated 2mo ago★ 88

Browse by type

Functions 47 Types & classes 42
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Multi-Chain Casino Games Platform | Solana & EVM Casino Game Smart Contracts

Production-ready Platform for building provably fair casino games on Solana and EVM chains. Includes 10 games (Crash, Plinko, Dice, Blackjack, Roulette, Poker, Slots, CoinFlip, Jackpot, Lottery) with VRF-powered randomness via Chainlink and ORAO.

This repository provides production-ready Solana and EVM casino game smart contracts for building provably fair Web3 casino games. It supports multi-chain deployment on Solana and EVM networks, enabling developers to create decentralized casino games with transparent logic, verifiable randomness, and on-chain fairness.

License: MIT Solana Ethereum Stars Forks Telegram

10 Classic Casino Games • Multi-Chain Support • Provably Fair • Telegram Integration

🎮 Games🔗 Chains🛠️ Tech Stack🚀 Quick Start📱 Contact

Demo videos

GitHub does not allow an embedded YouTube player inside README.md (no iframe or player “module” there). Use Play on YouTube or the thumbnail; on YouTube, use the normal play control.

Play on YouTube — Platform demo

Platform demo — open on YouTube

Play on YouTube — Origami Casino Game

Origami Casino Game — open on YouTube


📋 Table of Contents


🌟 Overview

A fully decentralized, provably fair casino platform supporting Solana and EVM-compatible chains. (Additional chains can be added by extending the same patterns.) Play classic casino games with transparent, verifiable outcomes powered by VRF (Verifiable Random Function) technology.


📚 Documentation

Built for: - 🎲 Casino operators looking for multi-chain support - 🏦 DeFi protocols integrating gaming features - 👥 Communities wanting to run their own casino - 💼 Token projects seeking utility and engagement


🏗️ Architecture

Web3 Game Architecture

┌────────────────────────────────────────────────┐
│              Frontend (Next.js)                │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐      │
│  │ Phantom  │  │ MetaMask │  │ Telegram │      │
│  └──────────┘  └──────────┘  └──────────┘      │
└────────────────────────────────────────────────┘
                      │
        ┌─────────────┴─────────────┐
        │                           │
┌───────▼────────┐          ┌───────▼────────┐
│ Solana Chain   │          │  EVM Chains    │
│                │          │                │
│ ┌────────────┐ │          │ ┌────────────┐ │
│ │ ORAO VRF   │ │          │ │Chainlink   │ │
│ └────────────┘ │          │ │    VRF     │ │
│                │          │ └────────────┘ │
│ ┌────────────┐ │          │ ┌────────────┐ │
│ │Game        │ │          │ │Game        │ │
│ │Programs    │ │          │ │Contracts   │ │
│ └────────────┘ │          │ └────────────┘ │
└────────────────┘          └────────────────┘

Web2 Game Architecture

┌─────────────────────┐     ┌──────────────────────┐     ┌─────────────────────┐
│   originals-games   │────▶│  originals-backend   │────▶│    originals-rng    │
│                     │     │                      │     │                     │
│  Next.js 16 + React │     │  Express + Prisma    │     │   NestJS + Crypto   │
│  Port 4000          │     │  Port 3001           │     │   Port 3002         │
│                     │     │  PostgreSQL          │     │                     │
│  WebSocket + HTTP   │────▶│  Socket.IO           │     │   REST API          │
└─────────────────────┘     └──────────────────────┘     └─────────────────────┘

Production Architecture

                                         ┌──────────────────┐
                                         │   External CDN   │
                                         │  (Static Assets) │
                                         └────────┬─────────┘
                                                  │
                                    ┌─────────────▼─────────────┐
                                    │      Load Balancer        │
                                    │      (nginx / ALB)        │
                                    └─────────────┬─────────────┘
                                                  │
                 ┌────────────────────────────────┼────────────────────────────────┐
                 │                                │                                │
        ┌────────▼────────┐              ┌────────▼────────┐              ┌────────▼────────┐
        │  Frontend #1    │              │  Frontend #2    │              │  Frontend #N    │
        │  Next.js        │              │  Next.js        │              │  Next.js        │
        └────────┬────────┘              └────────┬────────┘              └────────┬────────┘
                 │                                │                                │
                 └────────────────────────────────┼────────────────────────────────┘
                                                  │
                                    ┌─────────────▼─────────────┐
                                    │    API Load Balancer      │
                                    │    (sticky sessions)      │
                                    └─────────────┬─────────────┘
                                                  │
                 ┌────────────────────────────────┼────────────────────────────────┐
                 │                                │                                │
        ┌────────▼────────┐              ┌────────▼────────┐              ┌────────▼────────┐
        │   Backend #1    │              │   Backend #2    │              │   Backend #N    │
        │   Express.js    │              │   Express.js    │              │   Express.js    │
        └────────┬────────┘              └────────┬────────┘              └────────┬────────┘
                 │                                │                                │
                 └────────────────────────────────┼────────────────────────────────┘
                                                  │
        ┌─────────────────────────────────────────┼─────────────────────────────────────────┐
        │                                         │                                         │
        │                    ┌────────────────────┼────────────────────┐                    │
        │                    │                    │                    │                    │
┌───────▼───────┐    ┌───────▼───────┐    ┌───────▼───────┐    ┌───────▼───────┐    ┌───────▼───────┐
│     Redis     │    │   PgBouncer   │    │  RNG Cluster  │    │   External    │    │    Game DB    │
│   (sessions,  │    │  (connection  │    │  (4-8 nodes   │    │    Wallet     │    │  (PostgreSQL) │
│  socket.io,   │    │   pooling)    │    │   clustered)  │    │     API       │    │               │
│    cache)     │    └───────┬───────┘    └───────────────┘    │  (Your Casino │    │  Game state,  │
└───────────────┘            │                                 │Infrastructure)│    │   sessions,   │
                             │                                 └───────────────┘    │   history     │
                   ┌─────────▼─────────┐                                            └───────────────┘
                   │    PostgreSQL     │
                   │  (game sessions   │
                   │   + read replica) │
                   └───────────────────┘

Data Flow for Game Action

┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  Frontend   │───▶│   Backend   │───▶│    RNG      │    │  External   │    │   Game DB   │
│             │    │             │    │   Service   │    │   Wallet    │    │             │
│             │    │             │◀───│             │    │    API      │    │             │
│             │    │             │    │             │    │             │    │             │
│             │    │             │────┼────────────▶│    │             │    │             │
│             │    │             │    │             │    │             │    │             │
│             │    │             │◀───┼─────────────│    │             │    │             │
│             │    │             │    │             │    │             │    │             │
│             │    │             │───────────────────────────────────────▶│             │
│             │    │             │    │             │    │             │    │             │
│             │◀───│             │◀───────────────────────────────────────│             │
└─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘

1. Frontend sends game action (bet/hit/stand/etc)
2. Backend validates request + JWT
3. Backend calls External Wallet API to deduct bet (if new game)
4. Backend calls RNG for random outcome
5. Backend calculates result
6. Backend calls External Wallet API to credit winnings (if won)
7. Backend saves game state to Game DB
8. Backend returns result to Frontend

🎮 Games Suite

### 🎯 Plinko Drop the ball and watch it bounce! - **Mechanics:** Ball path via VRF → multiplier - **Max Payout:** Up to 1000x - **Provably Fair:** ✅ - **Physics Engine:** Realistic bouncing animation ### 📈 Crash Cash out before it crashes! - **Mechanics:** Auto-cashout + VRF curve - **Max Multiplier:** Unlimited potential - **Provably Fair:** ✅ - **Live Stats:** Real-time crash history
### 🎲 Dice Roll under or over your target! - **Mechanics:** Under/Over + VRF - **Dynamic Multipliers:** Based on probability - **Animated Rolls:** Realistic physics - **Live Probability:** Real-time win chances - **Detailed History:** Visual indicators ### 💰 Jackpot Community progressive jackpot! - **Mechanics:** 5% rake → pool - **Prize Pool:** Grows with every bet - **Provably Fair:** ✅ - **Winner Selection:** Random VRF draw
### 🪙 Coin Flip Simple 50/50 chance! - **Payout:** 1.95x your bet - **Mechanics:** 50/50 + VRF - **Animation:** Realistic coin flip physics - **Instant Results:** Immediate settlement - **Enhanced Visuals:** History tracking ### 🎰 Slots Match 3 symbols to win big! - **Max Payout:** 25x your bet - **Features:** Immersive animations - **Sound Effects:** Spinning, stops, wins - **Jackpot Mode:** Confetti & flashing lights - **Payout Table:** Detailed odds display
### 🃏 Poker Texas Hold'em tournaments! - **Mode:** Multi-player tournaments - **Provably Fair:** ✅ - **Buy-ins:** Flexible stakes - **Prize Pools:** Tournament-based ### 🂡 Blackjack Beat the dealer to 21! - **Payout:** 3:2 on Blackjack - **Features:** Split, Double Down, Insurance - **Provably Fair:** ✅ - **Strategy Guide:** Included
### 🎡 Roulette Spin the wheel of fortune! - **Types:** European & American - **Bets:** Inside, Outside, Neighbors - **Provably Fair:** ✅ - **Live Animation:** Realistic wheel spin ### 🎟️ Lottery Draw your winning numbers! - **Mechanics:** Pick 6 numbers - **Jackpot:** Progressive prize pool - **Drawings:** Scheduled or instant - **Provably Fair:** ✅

🔗 Supported Chains

Blockchain Network Status Tech Stack
🟣 Solana Mainnet Beta ✅ Live Rust + Anchor
🔵 Ethereum Mainnet ✅ Live Solidity + Foundry
🔷 Base Mainnet ✅ Live Solidity + Hardhat
🔴 Arbitrum One ✅ Live Solidity + Foundry
🟣 Polygon PoS ✅ Live Solidity + Hardhat

🛠️ Technology Stack

Smart Contract Development

Platform Languages Frameworks Testing

Core symbols most depended-on inside this repo

Shape

Function 47
Class 41
Enum 1

Languages

Rust100%

Modules by API surface

web3/solana/programs/crash/src/lib.rs11 symbols
web3/solana/programs/blackjack/src/lib.rs11 symbols
web3/solana/programs/lottery/src/lib.rs10 symbols
web3/solana/programs/poker/src/lib.rs9 symbols
web3/solana/programs/slots/src/lib.rs8 symbols
web3/solana/programs/plinko/src/lib.rs8 symbols
web3/solana/programs/jackpot/src/lib.rs7 symbols
web3/solana/programs/dice/src/lib.rs7 symbols
web3/solana/programs/coinflip/src/lib.rs7 symbols
web3/solana/programs/roulette/src/lib.rs5 symbols
web3/solana/programs/common/src/utils.rs3 symbols
web3/solana/programs/common/src/state.rs2 symbols

For agents

$ claude mcp add solana-casino-games-evm-web3 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page