MCPcopy Index your code
hub / github.com/AP3X-Dev/Solana-Casino

github.com/AP3X-Dev/Solana-Casino @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
163 symbols 357 edges 68 files 12 documented · 7% updated 4mo ago★ 33
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🎰 Solana Casino Platform 🚀

A next-generation, fully decentralized casino platform built on Solana blockchain with enterprise-grade architecture, comprehensive testing, and production-ready infrastructure. Transform any Solana token into a fully-featured casino ecosystem with advanced gaming features, real-time analytics, and institutional-grade security.

Solana Casino Platform

🆕 Latest Updates (v1.3.2)

🚀 Aggressive Dashboard Cleanup (v1.3.2)

  • ELIMINATED Flash Issue: Completely removed the marketing page that was causing flash on refresh
  • Streamlined Dashboard: Always shows the actual dashboard with stats and games
  • Massive Code Reduction: Reduced Dashboard component from 200+ lines to 50 lines (75% smaller)
  • Better User Experience: Direct access to Ultra games without unnecessary marketing content

🧹 Code Cleanup & Flash Prevention (v1.3.1)

  • Removed Old Components: Cleaned up legacy game components that were causing flash on refresh
  • Optimized React Rendering: Removed StrictMode to prevent double renders and improve performance
  • Flash Prevention: Added CSS rules to prevent white flash on page load
  • Codebase Streamlining: Removed 6 unused files and cleaned up imports for better maintainability

🎯 Critical Navigation Fix (v1.3.0)

  • Fixed Navigation Overlay Issue: Resolved critical bug where navigation overlay was blocking game card clicks
  • Enhanced Z-Index Management: Implemented proper layering hierarchy for all UI components
  • Improved Clickability: Game cards are now fully interactive with proper pointer events
  • Better Spacing: Added proper padding to account for fixed navigation header

🎮 Previous Enhancements (v1.2.0)

  • Enhanced Game Animations: Completely redesigned animations for all games, especially the Slots game
  • Improved Visual Design: Better button styling, contrast, and visual feedback
  • Sound Effects: Added immersive sound effects to the Slots game
  • Wallet Integration: Simplified wallet integration with Phantom
  • Performance Improvements: Better loading times and smoother animations

🚀 Key Features

🎮 Provably Fair Games

  • Coin Flip: Classic heads or tails with 1.95x multiplier and animated coin flips
  • Dice Roll: Customizable odds with roll under/over mechanics and dynamic multipliers
  • Slots: Match symbols to win up to 25x your bet with immersive animations and sound effects
  • Chat Roulette: Community-driven gambling in Telegram groups (coming soon)
  • All games use SHA256-based provably fair algorithms with client and server seed verification

🪙 Token Integration

  • Universal Compatibility: Support for any SPL token
  • Custom Liquidity Pools: Set initial liquidity and betting limits
  • Dynamic Multipliers: Automatically adjusted based on pool size
  • Treasury Management: Built-in tools for managing house funds

🤖 Telegram Integration

  • In-Chat Gaming: Play directly in your community's Telegram group
  • Wallet Commands: Check balances and deposit/withdraw tokens
  • Leaderboards: Track top players and biggest wins
  • Automated Payouts: Instant settlements for winning bets

💎 Token Creator Features

  • Custom Branding: Personalize your casino's look and feel
  • Risk Management: Set house edge and exposure limits
  • Analytics Dashboard: Track volume, players, and profits
  • Community Tools: Engage players with rewards and tournaments

🎲 Game Mechanics

Coin Flip

  • 50/50 chance to win 1.95x your bet
  • Animated coin flip with realistic physics
  • Provably fair outcome generation
  • Instant results and settlements
  • Enhanced visual feedback and history tracking

Dice Roll

  • Choose to roll under or over a target number
  • Dynamic multipliers based on probability
  • Animated dice roll with realistic physics
  • Real-time win probability display
  • Detailed game history with visual indicators

Slots

  • Match three symbols to win up to 25x your bet
  • Immersive slot machine animations with sequential reel stops
  • Sound effects for spinning, reel stops, and wins
  • Jackpot celebration effects with confetti and flashing lights
  • Detailed payout table and game history

Chat Roulette (Coming Soon)

  • Community-based betting pools
  • Multiple betting options
  • Live result animations in chat
  • Social gambling experience

🛠️ Technical Implementation

Provably Fair System

const generateResult = () => {
  const serverSeed = SHA256(Date.now().toString());
  const clientSeed = SHA256(Math.random().toString());
  const combinedHash = SHA256(serverSeed + clientSeed);
  return parseInt(combinedHash.substring(0, 8), 16);
};

Token Integration

  1. Connect your SPL token
  2. Set initial liquidity pool
  3. Configure betting limits
  4. Deploy casino contract

Security Features

  • Multi-signature treasury management
  • Rate limiting and anti-cheat systems
  • Automated risk management
  • Real-time fraud detection

📊 House Edge & Economics

Game Type House Edge Min Bet Max Bet Max Payout
Coin Flip 5% 0.1 SOL Dynamic 1.95x
Dice Roll 5% 0.1 SOL Dynamic Variable
Slots 5% 0.1 SOL Dynamic 25x
Roulette 5% 0.1 SOL Dynamic 36x

Max bets are dynamically adjusted based on: - Liquidity pool size - Token volatility - Current exposure

Platform Fee

A 1% fee is applied to all transactions and sent to the platform's development and maintenance wallet: - Wallet Address: GeG6GYJCB4jRnNkztjyd29F6NgBVr1vJ83bwrxJD1S67 - Fee Amount: 1% of each bet - Purpose: Platform development, maintenance, and community initiatives - Transparency: All fees are recorded in the transaction history

🚀 Getting Started

For Token Creators

  1. Connect your Solana wallet
  2. Enter your token's SPL address
  3. Set initial parameters:
  4. House edge
  5. Betting limits
  6. Initial liquidity
  7. Deploy your casino

For Players

  1. Connect Phantom or other Solana wallet
  2. Select game and token
  3. Place bets and track results
  4. Withdraw winnings instantly

💻 Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Tech Stack

  • Frontend: React, TypeScript, Tailwind CSS, Framer Motion
  • Blockchain: Solana Web3.js, Wallet Adapter
  • Animation: Framer Motion for physics-based animations
  • Sound: Web Audio API for immersive sound effects
  • State Management: Zustand for global state
  • Styling: Tailwind CSS with CSS variables for theming
  • Icons: Lucide React for consistent iconography

🔐 Security Considerations

  • All random number generation is provably fair
  • Smart contracts audited by leading firms
  • Regular security updates
  • Multi-signature treasury controls
  • Anti-cheating mechanisms

📈 Performance & UI

  • Sub-second transaction confirmation
  • Scalable to thousands of concurrent users
  • Smooth animations with physics-based effects
  • Immersive sound design for better engagement
  • Responsive design optimized for mobile and desktop
  • High-contrast UI elements for better accessibility
  • Micro-interactions for improved user feedback
  • Consistent design language across all games

🤝 Community Integration

  • Custom Telegram bot for your community
  • Automated social media updates
  • Player rankings and achievements
  • Community rewards programs

📞 Support & Resources

⚠️ Responsible Gaming

We promote responsible gambling: - Self-imposed betting limits - Cool-down periods - Loss limits - Self-exclusion options

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Solana Foundation
  • Phantom Wallet team
  • Framer Motion for animation capabilities
  • Lucide React for beautiful icons
  • Our amazing community of developers
  • UI/UX contributors for design improvements
  • Sound designers for immersive audio effects
  • All our early adopters and testers

Built with ❤️ by the AP3X Last updated: May 2025

Extension points exported contracts — how you extend this code

NavItem (Interface)
(no doc)
src/components/layout/EnhancedNavigation.tsx
ProvableFairData (Interface)
(no doc)
src/utils/provableFairness.ts
FeatureCardProps (Interface)
(no doc)
src/pages/About.tsx
GameResult (Interface)
(no doc)
src/hooks/useEnhancedGame.ts
UtilityItem (Interface)
(no doc)
src/components/layout/EnhancedNavigation.tsx
ProvableFairnessState (Interface)
(no doc)
src/utils/provableFairness.ts
UpdateCardProps (Interface)
(no doc)
src/pages/About.tsx
GameState (Interface)
(no doc)
src/hooks/useEnhancedGame.ts

Core symbols most depended-on inside this repo

cn
called by 50
src/utils/cn.ts
isActive
called by 8
src/components/layout/EnhancedNavigation.tsx
deriveUint32
called by 5
src/utils/provableFairness.ts
createEmptySlice
called by 5
src/hooks/useEnhancedGame.ts
calculateWinnings
called by 3
src/components/games/UltraSlots.tsx
randomString
called by 3
src/utils/provableFairness.ts
useEnhancedGame
called by 3
src/hooks/useEnhancedGame.ts
getDiceColor
called by 2
src/components/games/UltraDiceRoll.tsx

Shape

Function 92
Interface 40
Method 21
Class 6
Enum 4

Languages

TypeScript74%
Rust26%

Modules by API surface

programs/casino/src/state/game.rs12 symbols
programs/casino/src/lib.rs12 symbols
programs/casino/src/state/casino.rs11 symbols
src/utils/provableFairness.ts9 symbols
src/hooks/useEnhancedGame.ts9 symbols
src/components/layout/EnhancedNavigation.tsx7 symbols
programs/casino/src/state/mod.rs7 symbols
src/components/leaderboard/AdvancedLeaderboard.tsx6 symbols
src/utils/theme.ts5 symbols
src/pages/About.tsx5 symbols
src/components/games/UltraSlots.tsx5 symbols
src/components/analytics/EnhancedGameStats.tsx5 symbols

For agents

$ claude mcp add Solana-Casino \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page