Provably Fair
How It Works
SOLJackpot uses on-chain randomness to select winners. All game logic runs on the Solana blockchain, meaning the outcome is determined by verifiable on-chain data that cannot be manipulated by the house.
Winner Selection
The winner is selected using this algorithm:
- When the round countdown expires, the program reads the Solana SlotHashes sysvar for randomness.
- The random bytes are converted to a number:
winning_number = random_u128 % total_pot - Each player's deposit creates a range proportional to their contribution. The player whose cumulative range contains the winning_number is the winner.
Example
# 3 players deposit:
Player A: 1 SOL → range [0, 1,000,000,000)
Player B: 2 SOL → range [1,000,000,000, 3,000,000,000)
Player C: 1 SOL → range [3,000,000,000, 4,000,000,000)
# Random number generated:
winning_number = 2,345,678,901
# Result:
Falls in Player B's range → Player B wins!
Verification
Every round's random seed is stored on-chain in the GameRound account. You can verify any past round by:
- Finding the GameRound account for that round number
- Reading the
random_seedfield - Applying the winner selection algorithm with the stored entries
- Confirming the result matches the stored winner
Important Notes
- The current implementation uses Solana SlotHashes for randomness. For maximum security, this should be upgraded to Switchboard VRF (Verifiable Random Function).
- The house rake is {2.5%} and is transparently deducted from each pot before payout.
- All transactions are publicly visible on the Solana blockchain explorer.