Gaambl Lotto
Token-based lottery games with configurable risk modes and provably fair randomness
What is Gaambl Lotto?
Gaambl Lotto is a token-based lottery game where multiple players contribute to a prize pool, and winners are selected based on configurable risk modes. The creator automatically joins as the first player, creating aligned incentives for fair and attractive games.
Key Features
- Configurable risk modes (5% to 25% win rate)
- 10-500 players per game
- 24 hours to 30 days duration
- Provably fair randomness via Pyth Network
Game Parameters
- Minimum Players: 10 (including creator)
- Maximum Players: 500
- Duration: 24 hours to 30 days
- Creation Fee: 0.001 ETH
- Platform Fee: 2% (configurable by admin)
Game Modes (Risk Levels)
Moderate
25%
of players win
Best for steady returns
Aggressive
15%
of players win
Balanced risk/reward
High Risk
10%
of players win
Higher payouts
Extreme
5%
of players win
Maximum prizes
How It Works
Game Creation
Creators pay a 0.001 ETH creation fee plus their entry fee to create a game. They automatically join as the first player.
function createGame(GameConfig memory config) external payable returns (uint256 gameId)Joining Games
Players can join active games by paying the exact entry fee in the specified token. Games auto-complete when max players are reached.
function joinGame(uint256 gameId) external payableGame Completion
When max players are reached or the game expires, randomness is requested from Pyth Network. After 2 blocks, anyone can finalize the game.
function finalizeGameCompletion(uint256 gameId) externalPrize Distribution
Winners are selected using Fisher-Yates shuffle with exponential decay curve. Winners and creators must manually claim their prizes.
function claimPrize(uint256 gameId) externalPrize Distribution Example
Example: 100 player Extreme mode game with 1000 USDC total pool
Pool Breakdown
- Total Pool: 1000 USDC
- Platform Fee (2%): 20 USDC
- Prize Pool: 980 USDC
- Winners: 5 players (5%)
Winner Payouts
- 1st Place: ~500 USDC (51%)
- 2nd Place: ~250 USDC (25%)
- 3rd Place: ~150 USDC (15%)
- 4th Place: ~50 USDC (6%)
- 5th Place: ~30 USDC (3%)
Game States
ACTIVE
Game is accepting new players
WAITING_RANDOMNESS
Game reached completion trigger, randomness requested from Pyth
READY_FOR_COMPLETION
Randomness received, waiting for finalization with 2-block delay
COMPLETED
Game finalized, prizes distributed and claimable
CANCELLED
Game cancelled due to emergency or no participants
REFUNDED
Game had only one participant (creator) at expiration