Skip to content

Solana Casino Game & EVM Casino Platform | 10 Provably Fair Casino Games | Multi-Chain Casino | Crash, Plinko, Dice, Blackjack, Roulette, Poker, Coinflip | ORAO + Chainlink VRF

License

Notifications You must be signed in to change notification settings

LaChance-Lab/solana-casino-games-evm-web3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

casino.demo.mp4

๐Ÿ“‹ 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
Solana Rust Anchor Anchor Test Suite
EVM Chains Solidity Foundry, Hardhat Forge, Mocha

Core Game Logic

// Solana (Rust + Anchor)
- VRF-based randomness generation
- On-chain game state management
- SPL token integration
- Program-derived addresses (PDAs)
// EVM (Solidity + Foundry/Hardhat)
- Chainlink VRF integration
- ERC-20 token support
- Gas-optimized contracts
- Upgradeable proxy patterns

Game Mechanics Breakdown

Game Randomness Source Payout Calculation On-Chain State
๐ŸŽฏ Plinko VRF โ†’ Ball Path Multiplier grid Position + Result
๐Ÿ“ˆ Crash VRF โ†’ Curve Time-based multiplier Curve seed
๐ŸŽฒ Dice VRF โ†’ Roll Probability-based Roll value
๐Ÿ’ฐ Jackpot VRF โ†’ Winner Pool distribution Pool size
๐Ÿช™ CoinFlip VRF โ†’ Side 1.95x fixed Flip result
๐ŸŽฐ Slots VRF โ†’ Reels Symbol matching Reel positions

๐Ÿš€ Quick Start

Prerequisites

Required:

  • Node.js 18+
  • Rust 1.70+
  • Solana CLI 1.16+
  • Anchor 0.29+

For EVM:

  • Foundry (recommended) OR Hardhat
  • MetaMask or similar wallet

Installation

1๏ธโƒฃ Clone Repository

git clone https://github.com/LaChance-Lab/solana-casino-games-evm-web3.git
cd solana-casino-games-evm-web3

2๏ธโƒฃ Solana Setup

cd solana-casino-games-evm-web3
npm install
anchor build
anchor test

3๏ธโƒฃ EVM Setup

cd web3/evm
forge install
forge build
forge test -vvv

4๏ธโƒฃ Optional Components

  • Telegram bot scaffold: see telegram-bot/ (WIP)

Star โญ this repo to get notified whenever this repo is updated!

Deploy to Testnet

Solana Devnet:

cd web3/solana
anchor deploy --provider.cluster devnet

Ethereum Sepolia:

cd web3/evm
forge script script/Deploy.s.sol --rpc-url sepolia --broadcast --verify

๐Ÿ“‚ Repository Structure

solana-casino-games-evm-web3/
โ”œโ”€โ”€ ๐Ÿ“„ README.md              โ† You are here
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE                โ† MIT License
โ”œโ”€โ”€ ๐Ÿ“„ CONTRIBUTING.md        โ† Contribution guidelines
โ”œโ”€โ”€ ๐Ÿ“„ SECURITY.md            โ† Security policy
โ”œโ”€โ”€ ๐Ÿ“„ CHANGELOG.md           โ† Version history
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ web3/                  โ† Smart contracts
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ solana/            โ† Solana programs (Rust + Anchor)
โ”‚   โ”‚   โ”œโ”€โ”€ programs/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ common/       โ† Shared utilities
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ crash/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ coinflip/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ plinko/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dice/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ jackpot/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ slots/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ blackjack/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ roulette/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ poker/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ lottery/
โ”‚   โ”‚   โ”œโ”€โ”€ tests/
โ”‚   โ”‚   โ”œโ”€โ”€ Anchor.toml
โ”‚   โ”‚   โ”œโ”€โ”€ Cargo.toml
โ”‚   โ”‚   โ””โ”€โ”€ README.md
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ๐Ÿ“ evm/               โ† EVM contracts (Solidity)
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ interfaces/
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ ICasinoGame.sol
โ”‚       โ”‚   โ”œโ”€โ”€ libraries/
โ”‚       โ”‚   โ”‚   โ””โ”€โ”€ CasinoMath.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Crash.sol
โ”‚       โ”‚   โ”œโ”€โ”€ CoinFlip.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Plinko.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Dice.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Jackpot.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Slots.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Blackjack.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Roulette.sol
โ”‚       โ”‚   โ”œโ”€โ”€ Poker.sol
โ”‚       โ”‚   โ””โ”€โ”€ Lottery.sol
โ”‚       โ”œโ”€โ”€ test/
โ”‚       โ”œโ”€โ”€ script/
โ”‚       โ”œโ”€โ”€ foundry.toml
โ”‚       โ””โ”€โ”€ README.md
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ telegram-bot/          โ† Telegram integration
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ docs/                  โ† Documentation
โ”‚   โ”œโ”€โ”€ ARCHITECTURE.md
โ”‚   โ”œโ”€โ”€ DEPLOYMENT.md
โ”‚   โ”œโ”€โ”€ FAQ.md
โ”‚   โ”œโ”€โ”€ GETTING_STARTED.md
โ”‚   โ”œโ”€โ”€ API.md
โ”‚   โ””โ”€โ”€ GAMES.md              โ† Game-by-game docs
โ”‚
โ””โ”€โ”€ ๐Ÿ“ examples/              โ† Usage examples
    โ”œโ”€โ”€ solana/
    โ””โ”€โ”€ evm/

Status: โœ… All smart contracts implemented and ready for deployment.

โœจ Core Features

๐ŸŽฏ Provably Fair Gaming

  • Verifiable Randomness: VRF ensures true randomness
  • Transparent Outcomes: All results can be independently verified
  • No House Edge Manipulation: Smart contract enforced rules
  • Audit Trail: Complete game history on-chain

๐Ÿ’Ž Universal Token Support

  • SPL Tokens: Any Solana token supported
  • ERC-20 Tokens: Full EVM token compatibility
  • Custom Pools: Set your own liquidity and limits
  • Dynamic Multipliers: Auto-adjusted based on pool size

๐Ÿ“Š Advanced Analytics

  • Player Statistics: Win/loss ratios, favorite games
  • House Performance: Revenue, payouts, edge
  • Real-time Metrics: Active players, total volume
  • Historical Data: Comprehensive reporting

๐ŸŽจ Enhanced User Experience

  • Realistic Animations: Physics-based game visuals
  • Sound Effects: Immersive audio feedback
  • Celebration Effects: Win animations with confetti
  • Responsive Design: Mobile and desktop optimized

๐Ÿ›ก๏ธ Security Features

Zero Trust Architecture

๐Ÿ” Treasury Protection

  • Multi-signature Wallets: Require multiple approvals
  • Time-locks: Delayed withdrawals for security
  • Emergency Pause: Circuit breaker for incidents
  • Segregated Funds: Player funds isolated

๐Ÿšจ Anti-Cheat Systems

  • Rate Limiting: Prevent spam attacks
  • Bet Size Limits: Configurable maximums
  • Pattern Detection: AI-powered fraud detection
  • IP Tracking: Multi-account prevention

๐Ÿ“ˆ Risk Management

  • Automated Rebalancing: Maintain healthy pools
  • Dynamic Limits: Adjust based on liquidity
  • Reserve Requirements: Ensure solvency
  • Kelly Criterion: Optimal bet sizing

๐Ÿ” Monitoring

  • Real-time Alerts: Suspicious activity notifications
  • Audit Logs: Complete transaction history
  • Performance Metrics: System health monitoring
  • 24/7 Surveillance: Continuous security checks

Professional Audits

  • โœ… Smart contract security audits
  • โœ… Penetration testing
  • โœ… Code review by security experts
  • โœ… Continuous monitoring and updates

๐Ÿ’ฐ Token Integration

Universal Compatibility

// Support for ANY token on supported chains
- Solana: SPL tokens (USDC, USDT, custom tokens)
- EVM: ERC-20 tokens (USDC, USDT, DAI, custom tokens)

Custom Liquidity Management

Feature Description Benefit
Initial Liquidity Set starting pool size Control risk exposure
Betting Limits Min/max bet configuration Prevent whale manipulation
Dynamic Multipliers Auto-adjust payouts Maintain house edge
Treasury Tools Built-in fund management Easy operations
Profit Withdrawal Scheduled rake distribution Automated revenue

Pool Configuration Example

{
  "token": "USDC",
  "initialLiquidity": "100000",
  "minBet": "1",
  "maxBet": "1000",
  "houseEdge": "2.5%",
  "maxPayout": "10000"
}

๐Ÿ“ฑ Telegram Bot Features

In-Chat Gaming Experience

๐ŸŽฎ Gaming Commands

/play <game> <amount> - Start a game
/balance - Check your balance
/deposit - Get deposit address
/withdraw <amount> - Withdraw funds
/history - View game history
/help - Command list

๐Ÿ† Community Features

/leaderboard - Top players
/bigwins - Recent big wins
/stats - Global statistics
/jackpot - Current jackpot size
/house - House performance

Advanced Bot Features

  • ๐ŸŽฏ In-Group Gaming: Play directly in Telegram groups
  • ๐Ÿ’ณ Wallet Management: Non-custodial wallet integration
  • ๐Ÿ“Š Live Leaderboards: Real-time rankings and competitions
  • โšก Instant Payouts: Automatic win settlements
  • ๐Ÿ”” Notifications: Win alerts, jackpot updates
  • ๐Ÿ‘ฅ Multiplayer: Group tournaments and challenges
  • ๐ŸŽ Rewards: Daily bonuses and loyalty programs
  • ๐Ÿ“ˆ Analytics: Personal statistics and insights

๐ŸŒ‰ Multi-Chain Bridge

Seamless Cross-Chain Experience

Bridge Provider Chains Supported Speed Features
Wormhole Solana โ†” EVM ~15 min Token bridging, NFTs
LayerZero Multi-EVM ~5 min Omnichain messaging
Axelar All supported chains ~10 min General message passing
LI.FI All supported chains ~3 min Best route aggregation

Bridge Features

  • ๐Ÿ”„ Automatic Routing: Best path selection
  • ๐Ÿ’ฐ Lowest Fees: Cost optimization
  • โšก Fast Transfers: Minimal wait times
  • ๐Ÿ” Secure: Audited bridge protocols
  • ๐Ÿ“ฑ User-Friendly: One-click bridging
  • ๐Ÿ’Ž Asset Support: Tokens and NFTs

๐Ÿšง Development Status

Component Status Progress
๐ŸŽฎ Game Design โœ… Complete โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%
๐Ÿ”ง Solana Contracts ๐Ÿ”จ In Progress โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%
๐Ÿ”ง EVM Contracts ๐Ÿ”จ In Progress โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%
๐ŸŽจ Frontend ๐Ÿ”จ In Progress โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%
๐Ÿค– Telegram Bot ๐Ÿ”œ Planned โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 20%
๐Ÿ” Security Audit ๐Ÿ”œ Planned โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%

Latest Update: Nov 2025

๐Ÿ’ก Want to contribute? We're looking for developers! See CONTRIBUTING.md


๐Ÿ“ฑ Contact

๐Ÿ’ผ Business & Partnerships

Looking to build your own casino platform?

We offer professional services:

  • ๐ŸŽฐ White-label Solutions - Launch your casino in weeks
  • ๐Ÿ”ง Custom Game Development - Unique games for your brand
  • ๐ŸŒ‰ Chain Integration - Connect to any blockchain
  • ๐ŸŽจ UI/UX Design - Beautiful, responsive interfaces
  • ๐Ÿ›ก๏ธ Security Audits - Professional smart contract audits
  • ๐Ÿ“ˆ Marketing & Launch - Go-to-market strategy

Telegram: @lachancelab


๐Ÿค Open Source Collaboration

Interested in collaboration or contributing?

  • ๐Ÿ”— Integrations - Token/protocol partnerships
  • ๐ŸŒ‰ Bridges - Cross-chain infrastructure
  • ๐ŸŽฎ Platforms - Gaming ecosystem partnerships
  • ๐Ÿ’ฐ DeFi - Financial protocol integrations

Open an issue or join our Telegram to discuss!


โ“ Frequently Asked Questions (FAQ)

What is a provably fair casino game?

Provably fair casino games use Verifiable Random Function (VRF) technology to ensure all game outcomes are random and verifiable. Players can independently verify that the house cannot manipulate results.

Which blockchains are supported?

Currently: Solana, Ethereum, Base, Arbitrum, Polygon. Planned: Sui, Cardano, Bitcoin.

Can I use this commercially?

Yes! MIT licensed - use for any purpose including commercial projects.

How do I deploy the contracts?

See our Deployment Guide for step-by-step instructions.

What tokens are supported?

Any SPL token (Solana) or ERC-20 token (EVM chains). USDC, USDT, and custom tokens all work.

Is this audited?

Yes, all contracts undergo security audits. See SECURITY.md for details.

More questions? See our FAQ Guide or open a GitHub Discussion.


โš ๏ธ Disclaimer

This platform is for entertainment purposes. Please gamble responsibly and comply with your local regulations. The house always has an edgeโ€”play for fun, not profit.


Made with โค๏ธ by LaChanceLab

Powered by Provably Fair Technology

About

Solana Casino Game & EVM Casino Platform | 10 Provably Fair Casino Games | Multi-Chain Casino | Crash, Plinko, Dice, Blackjack, Roulette, Poker, Coinflip | ORAO + Chainlink VRF

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published