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.
10 Classic Casino Games โข Multi-Chain Support โข Provably Fair โข Telegram Integration
๐ฎ Games โข ๐ Chains โข ๐ ๏ธ Tech Stack โข ๐ Quick Start โข ๐ฑ Contact
casino.demo.mp4
- Overview
- Games Suite
- Supported Chains
- Technology Stack
- Documentation
- Core Features
- Security Features
- Token Integration
- Telegram Bot Features
- Multi-Chain Bridge
- Contact
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.
- Docs index:
docs/README.md - Games:
docs/GAMES.md - Getting started:
docs/GETTING_STARTED.md
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
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend (Next.js) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Phantom โ โ MetaMask โ โ Telegram โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโผโโโโโโโโโ โโโโโโโโโผโโโโโโโโโ
โ Solana Chain โ โ EVM Chains โ
โ โ โ โ
โ โโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโ โ
โ โ ORAO VRF โ โ โ โChainlink โ โ
โ โโโโโโโโโโโโโโ โ โ โ VRF โ โ
โ โ โ โโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโ โ
โ โGame โ โ โ โGame โ โ
โ โPrograms โ โ โ โContracts โ โ
โ โโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ 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 โ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโ
โ 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) โ
โโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ 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
|
Drop the ball and watch it bounce!
|
Cash out before it crashes!
|
|
Roll under or over your target!
|
Community progressive jackpot!
|
|
Simple 50/50 chance!
|
Match 3 symbols to win big!
|
|
Texas Hold'em tournaments!
|
Beat the dealer to 21!
|
|
Spin the wheel of fortune!
|
Draw your winning numbers!
|
| 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 |
| Platform | Languages | Frameworks | Testing |
|---|---|---|---|
| Solana | Rust | Anchor | Anchor Test Suite |
| EVM Chains | Solidity | Foundry, Hardhat | Forge, Mocha |
// 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 | 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 |
Required:
- Node.js 18+
- Rust 1.70+
- Solana CLI 1.16+
- Anchor 0.29+
For EVM:
- Foundry (recommended) OR Hardhat
- MetaMask or similar wallet
git clone https://github.com/LaChance-Lab/solana-casino-games-evm-web3.git
cd solana-casino-games-evm-web3cd solana-casino-games-evm-web3
npm install
anchor build
anchor testcd web3/evm
forge install
forge build
forge test -vvv- Telegram bot scaffold: see
telegram-bot/(WIP)
Star โญ this repo to get notified whenever this repo is updated!
Solana Devnet:
cd web3/solana
anchor deploy --provider.cluster devnetEthereum Sepolia:
cd web3/evm
forge script script/Deploy.s.sol --rpc-url sepolia --broadcast --verifysolana-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.
- 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
- 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
- Player Statistics: Win/loss ratios, favorite games
- House Performance: Revenue, payouts, edge
- Real-time Metrics: Active players, total volume
- Historical Data: Comprehensive reporting
- Realistic Animations: Physics-based game visuals
- Sound Effects: Immersive audio feedback
- Celebration Effects: Win animations with confetti
- Responsive Design: Mobile and desktop optimized
|
|
|
|
- โ Smart contract security audits
- โ Penetration testing
- โ Code review by security experts
- โ Continuous monitoring and updates
// Support for ANY token on supported chains
- Solana: SPL tokens (USDC, USDT, custom tokens)
- EVM: ERC-20 tokens (USDC, USDT, DAI, custom tokens)| 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 |
{
"token": "USDC",
"initialLiquidity": "100000",
"minBet": "1",
"maxBet": "1000",
"houseEdge": "2.5%",
"maxPayout": "10000"
}
|
|
- ๐ฏ 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
| 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 |
- ๐ 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
| 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
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
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!
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.
Currently: Solana, Ethereum, Base, Arbitrum, Polygon. Planned: Sui, Cardano, Bitcoin.
Yes! MIT licensed - use for any purpose including commercial projects.
See our Deployment Guide for step-by-step instructions.
Any SPL token (Solana) or ERC-20 token (EVM chains). USDC, USDT, and custom tokens all work.
Yes, all contracts undergo security audits. See SECURITY.md for details.
More questions? See our FAQ Guide or open a GitHub Discussion.
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