In-House Games — Technical Documentation
This section provides a complete technical overview of DropBet’s in-house games. These custom-built games are fully integrated with the platform’s wallet, fairness systems, admin panel, and user account logic.
1. Overview
DropBet features 9 internally developed games, live in production:
- Monkey Run
- Limbo
- Plinko
- Mines
- Dice
- Speed Roulette
- Keno
- Roulette
- Blackjack
Each game is designed for instant interaction, transparency, and platform-native integration. All games support provably fair mechanics, real-money wagering, and centralized logging.
2. Architecture Overview
2.1 Backend Architecture
Each in-house game is implemented as a fully modular NestJS module.
- Every game has its own controller and service, maintaining full isolation.
- Modules are registered through a central
casino.module
that aggregates logic without breaking encapsulation.
- Game logic resides 100% server-side; the frontend only receives results and renders them visually.
2.2 Frontend Architecture
- Built in React + TypeScript.
- Game components are housed in
src/components/originalGames/
.
- Each game uses either FormProvider (react-hook-form) or React Context to manage input and local state.
- State persistence between page reloads is supported for games that require it.
- Animations start after receiving the result from the backend.
- Responsive design is implemented via Tailwind classes, SCSS mixins, and container queries.
- Sound handled with howler; animations handled with framer-motion and CSS transitions.
2.3 Communication
- All bets are submitted via REST API, not WebSocket.
- Each game posts to a specific endpoint:
/casino/games/house/[game-name]/bet
.
- Inside each game folder, a
utils/queries.ts
file defines all API calls.
- Backend responses return the result payload, which triggers frontend rendering and animation.
3. Provably Fair System
DropBet's fairness system is fully transparent and user-verifiable.
3.1 Server Seed Management
Each user has a dedicated fairness seed set stored in user_fairness_seeds
:
serverSeed
– actual value used for outcome generation (kept secret)
hashedServerSeed
– publicly visible hash for fairness validation
nextServerSeed/nextHashedServerSeed
– pre-generated for rotation
Once a server seed is used, it's archived in user_inactive_fairness_seeds
.
3.2 Client Seed
The client seed is user-configurable.
When updated:
- The current pair is archived
nextServerSeed
is promoted to active
- A new
nextServerSeed
and hash are generated
3.3 Verification
Every game round includes:
- serverSeed (hidden)
- clientSeed (user-defined)
- nonce (auto-incrementing)
- hashedServerSeed
After each round, users can verify the fairness via the My Bets interface.
4. Gameplay & Mechanics
4.1 Wagering
- All in-house games use the main wallet balance.
- Min/max bets and RTP (if applicable) are configurable via the admin panel.
- Supported bet parameters depend on the game (e.g. multiplier, grid selection).
4.2 Bet Isolation & Duplicate Prevention
- Each frontend bet submission is unique.
- The bet button is disabled until the result is received, preventing double-betting.
4.3 Session Resilience
For games with state or progression, the frontend can request current state to restore gameplay after a disconnect or reload.
4.4 Multi-Tab Support
Users can play multiple games in separate tabs without restriction.
5. Database Schema (Bet Model)
Each in-house bet record stores the following:
Identifiers:
- id, userId, gameId, roundId
Financials:
- amount, payout (in original currency)
- usdAmount, usdPayout
- currencyId
- multiplier, commissionGgrUsdAmount, commissionGgrPercent
Status:
- status, settledAt, createdAt, updatedAt, errorDetails
Metadata:
- payload: JSON object containing game-specific result data or mechanics (e.g. hit tiles in Mines)
6. Admin Tools
Admins can:
- Enable/disable any in-house game
- Set min/max bet limits and RTP
- View live rounds and round history
- Track per-game statistics (volume, wins, user activity)
- Search and filter by user, round ID, or time range
7. Logging & My Bets
All game rounds are saved to bet history.
Users can view:
- Game name, result, amount, payout
- Fairness details (hash, seeds, nonce)
- Timestamps
Admins have full access to:
- Raw bet data (including payload)
- Round outcome inspection
- User wager summaries
Monkey Run
1. Game Overview
Description: Monkey Run is a progressive obstacle-avoidance game where the player guides the monkey across multiple lanes, each containing a hidden risk, a car.
Objective: Move the monkey forward by selecting lanes, aiming to reach the highest possible multiplier without hitting an obstacle.
2. Game Flow
- Player selects bet amount and risk level (Easy, Medium, Hard, Extreme).
- Multipliers for each step are generated before the run begins.
- Player progresses step-by-step by clicking on a lane.
- If a trap is hit, the round ends, and the player loses the bet.
- The player can cash out at any time to secure the current multiplier.
3. Betting Rules
- Supported currencies: All platform-supported coins/tokens.
- Min/Max bets: Defined in admin settings (varies per casino configuration).
- Only one bet per round per player.
- Auto-bet not available (manual play only).
4. Game Logic & Outcomes
- Outcome is determined per step: the system reveals if the chosen lane has a trap or a safe multiplier.
- Safe step: Progress continues, multiplier increases.
- Trap: Game ends, no payout.
- Cash out: Payout equals bet × current multiplier.
5. Payout Structure
Payout = Bet Amount × Multiplier at the time of cash out.
Multipliers increase incrementally with each safe step based on chosen risk level:
- Easy: Smaller multiplier growth, fewer traps.
- Medium: Balanced growth and trap count.
- Hard: Higher multiplier growth, more traps.
- Extreme: Maximum multiplier growth, high trap risk.
6. Special Features
- Multiple difficulty modes.
- Progressive risk/reward balance.
- Instant cash out option.
7. Fairness & Compliance
- Uses provably fair system with pre-generated results per round.
- Seeds are verifiable by the player post-game.
Limbo
1. Game Overview
Description: Limbo is a fast-paced, single-click multiplier game where players choose a target multiplier and attempt to hit or exceed it.
Objective: Predict a multiplier that will be reached in the round. If the multiplier is reached or exceeded, the player wins.
2. Game Flow
- Player sets bet amount and target multiplier (manually or via auto mode).
- The system generates a random multiplier for the round.
- If the result ≥ player’s chosen multiplier, the player wins.
- If the result < chosen multiplier, the bet is lost.
3. Betting Rules
- Supported currencies: All platform-supported coins/tokens.
- Min/Max bets: Defined in admin configuration.
- Player chooses the multiplier and odds are calculated automatically.
- Available in Manual and Auto-bet modes.
4. Game Logic & Outcomes
- Random multiplier is generated server-side using the provably fair seed.
- Outcome is deterministic and verifiable post-round.
- Multipliers are clamped by minimum and maximum RTP settings.
5. Payout Structure
Payout = Bet Amount × Target Multiplier (if won), otherwise zero.
6. Special Features
- Auto-bet system supports strategies and stop conditions.
- Live multiplier animations during round reveal.
- Instant bet placement and result delivery.
7. Fairness & Compliance
- Provably fair seed usage per round.
- Round hashes and seeds available for user verification.
Keno
1. Game Overview
Description: Keno is a lottery-style game where players select numbers and hope they match drawn numbers.
Objective: Select a set of numbers and win based on how many are matched.
2. Game Flow
- Player chooses numbers from a pool (usually 1–80).
- The system draws a fixed number of winning numbers randomly.
- Winnings depend on the number of matches and bet size.
3. Betting Rules
- Supported currencies: All platform coins/tokens.
- Min/Max bets set by admin.
- Number of selected spots affects payout odds.
- One bet per round per user.
4. Game Logic & Outcomes
- Random draw generated server-side with provably fair seed.
- Matching numbers calculated and payout determined.
- Game supports variable payout tables based on spots.
5. Payout Structure
Payout calculated based on matched numbers and bet amount using defined payout tables.
6. Special Features
- Multiple spot selections (e.g. 1-10 numbers).
- Configurable payout tables.
- Quick pick option for random selection.
7. Fairness & Compliance
- Provably fair draws with transparent seed hashes.
- Verification possible via user interface.
Plinko
1. Game Overview
Description: Plinko is a pegboard game where a ball drops through a grid of pegs to land in a multiplier slot at the bottom.
Objective: Drop the ball and win based on the multiplier slot it lands in.
2. Game Flow
- Player sets bet amount and optionally chooses risk level.
- The ball is dropped and bounces through pegs.
- The landing slot multiplier determines the payout.
3. Betting Rules
- Supported currencies: All platform coins/tokens.
- Min/Max bets as per admin settings.
- Only one bet per round per player.
4. Game Logic & Outcomes
- The landing position is generated server-side using provably fair seed.
- Outcome and payout calculated accordingly.
- Front-end shows ball drop animation based on result.
5. Payout Structure
Payout = Bet Amount × Multiplier of landing slot.
6. Special Features
- Adjustable peg layout and multiplier distribution.
- Instant result reveal after animation.
- Supports multiple bet amounts and currencies.
7. Fairness & Compliance
- Provably fair random generation of landing slot.
- Seed and hash available for verification.
Roulette
1. Game Objective
The goal is to correctly predict where the ball will land on the roulette wheel after it is spun. Players can bet on individual numbers, combinations, or broader outcomes such as color, odd/even, or high/low numbers.
2. Core Gameplay
- Players choose a chip denomination from available values (0.01, 0.1, 0.5, 1, up to 10,000).
- Bets can be placed on:
- Straight-up: A single number.
- Split: Two adjacent numbers.
- Street: Three numbers in a row.
- Corner: Four numbers sharing a corner.
- Line: Six numbers (two adjacent rows of three).
- Column / Dozen: 12-number bets.
- Even-Money Bets: Red/Black, Odd/Even, 1–18 / 19–36.
- Controls:
- Clear Table – Remove all bets.
- Undo – Remove last placed chip.
- Repeat Bet – Repeat previous round's bets.
- Double Bet – Double all current bets.
3. Spin & Outcome
- After betting, the wheel spins and the ball lands in a numbered pocket.
- Winning bets are highlighted and payouts applied according to standard roulette payout tables.
4. Interface Elements
- Chip Selector
- Total Bet Amount Display
- Bet Table
- Roulette Wheel Animation
- Manual/Auto Mode for betting
5. Fairness & Compliance
- Provably fair result generation.
- Server-side result calculation with public verification data.
Speed Roulette
1. Overview
Speed Roulette is a quick, timer-based version of roulette using a spinning reel of colored tiles with payout multipliers instead of numbers.
2. Core Gameplay
- ~15 seconds betting phase before each spin.
- Bet types:
- Common colors: 2× payout
- Less common colors: 7× payout
- Rare colors: 14× payout
- Multi-colored tiles win for both colors if landed.
3. UI Elements
- Bet Amount Selector (½, 2×, Max)
- Bet Categories (color/multiplier panels)
- Countdown Timer
- Reel Animation with result display
- Statistics panel for last 100 spins
4. Rules
- Bets close when countdown ends.
- Wins calculated by landed tile multiplier.
- Split tiles pay full for both categories.
5. RTP & Monetization
- RTP adjustable via reel symbol distribution.
- House edge determined by payout-to-probability ratio.
Mines
1. Game Overview
Mines is a tile-based risk game where players uncover safe gems while avoiding mines. Each safe tile increases the payout multiplier, but hitting a mine ends the game with no payout.
2. Core Gameplay
- 5×5 grid (25 tiles).
- Player sets bet and number of mines (1–24).
- Safe tiles (gems) increase multiplier; mines end the round.
- Player can cash out anytime to secure winnings.
3. Controls
- Manual/Auto play modes.
- Mines slider to adjust risk/payout ratio.
- Cashout button to end round early.
- Pick Random button for automated tile selection.
4. Payout Logic
- More mines → higher payout per tile.
- Cashout Value = Bet × Current Multiplier.
Blackjack
1. Game Objective
Beat the dealer by getting a hand total closer to 21 without going over.
2. Game Modes
- Standard Blackjack
- Optional side bet: Perfect Pairs
3. Actions
- Hit, Stand, Split, Double
- Dealer stands on all 17s
4. Payouts
- Blackjack: 3:2
- Standard Win: 1:1
- Insurance: 2:1
- Perfect Pairs payout varies by pair type
5. RTP
- Main game ~99.5% with optimal play
- Perfect Pairs ~95%
Dice
1. Game Objective
Predict whether the rolled number (0–100) will be above or below a chosen target. Player controls win probability via a slider.
2. Features
- Adjustable chance & multiplier
- Manual or Auto betting
- Displayed profit, multiplier, and target roll-over point
3. Payout Formula
Multiplier = (100 / Chance) × (1 − House Edge)
House edge: ~1%
4. RTP
- ~99% (very high compared to most games)