A room-based casino platform on Solana where friends can create rooms, bet together, and play fun on-chain games like Mines!
👥 Create rooms, invite friends, place bets, and let the smart contract decide the winners based on fairness and cryptographic randomness.
- Frontend: Next.js ⚛️
- Server: Node.js 🟢
- Blockchain: Solana
- Popular platforms like Stake only let users play against the house.
- There’s no way to play casino games directly with friends.
- The entire game logic and randomness are controlled by a centralized backend.
FriendzCasinoOnSolana offers a new model for online gambling:
- 🎯 Room-based multiplayer games where friends can bet and play together.
- 🔐 Smart contracts enforce fairness — no centralized control over outcomes or funds.
- 🎲 Commit-reveal randomness ensures that no one can tamper with the result.
- 💬 Collaborative gameplay builds trust and fun through shared experiences.
- 🌍 On-chain integrity guarantees transparency, immutability, and fairness in every game.
Unlike most casino platforms or even Web3 games, FriendzCasinoOnSolana is built entirely on-chain.
- 🏗️ Room creation, joining, and player management all happen via Solana smart contracts.
- 🧑🤝🧑 No off-chain matchmaking or session tracking — the blockchain itself is the game server.
- 🚫 No WebSockets or centralized state sync — game state and interactions are updated and retrieved entirely through on-chain transactions and events.
- Transparency: Every player action and game event is recorded on-chain for public verification.
- Trustless Play: You don't have to trust any backend server — the smart contract is the backend.
- No Middlemen: Even multiplayer coordination (room IDs, player counts, turns) is handled trustlessly.
- Auditable Gameplay: Anyone can replay or verify games by scanning the chain.
-
Create a Room
- Go to the sidebar and click
Create Room
. - Enter a
roomId
andbetAmount
.
- Go to the sidebar and click
-
Join the Room
- Players select the
Mines
game and join using theroomId
.
- Players select the
-
Place Bets
- Each joined player must place a bet to become an active participant.
-
Start the Game
- Only the room leader can start the game.
- The leader sets:
- Number of mines
- Number of gems
-
Server Commits Random Mines
- On
GameStartedEvent
, the server:- Randomly generates mine positions.
- Submits a hash of the mines to the Anchor program (not the actual positions yet).
- On
-
Players Submit Moves
- Players choose and submit cell positions.
-
Reveal Mines
- Once all players have submitted, the leader triggers mine reveal.
- The server sends the actual mine positions.
- The smart contract:
- Regenerates the hash from submitted positions.
- Verifies it matches the earlier hash.
-
Result & Payout
- ✅ If hash is valid:
- Highest scorers (can be multiple) win.
- Entire bet pool is split among winners.
- ❌ If hash is invalid (e.g., tampering or server error):
- All players get their bets refunded.
- ✅ If hash is valid:
- Commit-Reveal Scheme
- Randomness is off-chain generated but hash committed on-chain for integrity.
- No player knows mine positions in advance.
- Smart contract verifies hashes before revealing results.
- 🎲 More games: Roulette, Dice, and more!
- 🧑🤝🧑 Public Rooms & Leaderboards
- 📱 Mobile-optimized experience
https://www.loom.com/share/676231fa51204a40b3ba049b83bd7495?sid=1536f6d5-5c46-488e-b4a9-a8926ca642a4