Multiplayer Games
In DegenDen, multiplayer casino games provide an interactive and competitive gaming experience, where players can join lobbies, place wagers, and compete for winnings. The system ensures fair play, proper fund management, and transparent deductions, making multiplayer gaming both engaging and secure.
๐ฐ Deduction Logic
The deduction logic ensures that players are not charged until the game is ready to start, allowing them to freely join or leave lobbies before committing funds.
๐น Lobby Creation & Player Entry
1๏ธโฃ Lobby Setup โ Players create a game lobby and invite others to join. No funds are deducted at this stage. 2๏ธโฃ Player Verification โ Once the lobby reaches the required player count, the system checks each playerโs balance to ensure they have enough SOL or $DD to cover the wager.
๐น Checking Sufficient Funds
โ Balance Check โ The system confirms if each playerโs balance meets the wager requirement. ๐จ Insufficient Funds Notification โ Players with insufficient funds are notified and prompted to deposit before the game starts. โ Lobby Status: If any player lacks funds, the lobby cannot start until all players meet the wager requirement.
๐น Deducting Wager Amounts
โ Once all players have sufficient funds, the system deducts the wager from each playerโs balance. โ Player balances are updated in real-time to reflect the wager deduction.
๐ธ Commission Calculation & Distribution
A 20% commission is deducted from the total wagered amount, distributed as follows:
5% โ Sent to the bot developer for continued maintenance, support, and improvements.
15% โ Sent to the "House" wallet, where it is locked and accumulates for Meteora's AirLock fees.
All transactions are executed transparently via blockchain, ensuring fund security and accountability.
๐ Recording Transactions
๐ Deduction Receipts โ The system records each wager deduction and transaction signature, storing it for future reference.
๐ Error Handling โ If any issues occur during deduction or commission processing, the system rolls back the changes, and the lobby is reset until issues are resolved.
๐ฎ Starting Multiplayer Games
Once the wager deduction is successfully completed, the game can begin.
๐น Game Initialization
๐ Game Record Creation โ A unique game record is created for each session, including:
Player details
Wager amounts
Game state
๐ข Game State Update โ The game status changes to "active", and the session is ready to start.
๐น In-Game Transactions
โก Gameplay Begins โ Players engage in the game according to the selected game rules (Dice, Blackjack, Bowling, etc.). ๐ข Real-Time Updates โ The system tracks:
Player actions
Game results
Balance adjustments
๐ Post-Game Actions
๐ Result Declaration โ After the game concludes, the system announces the winner(s) and distributes the payouts. ๐ Updating Player Stats โ Player statistics are updated, tracking:
Games played
Games won
Total wagered & won
Last updated