The jackpot is the ultimate prize in Lotto Balls, awarded when a player matches all four numbers in the correct positions.
Jackpot Probability
Matching all 4 numbers has a probability of:
(1/10)^4 = 1 in 10,000 = 0.01%
This makes the jackpot a rare but achievable goal.
Dynamic Calculation
The jackpot amount is dynamically calculated based on the contract's USDC balance. This ensures:
Jackpot grows as more players participate
Winners receive meaningful prizes
Pool = Contract USDC Balance
Buffer = Pool × 30%
Available = Pool - Buffer
Jackpot = Available × 35%
If Jackpot > Cap:
Jackpot = Cap
Component
Percentage
Purpose
Reserve for operations and sustainability
Maximum single win amount
Example Calculation
If the contract holds 10,000 USDC:
Jackpot would be 2,450 USDC (assuming it's under the cap)
A maximum jackpot cap is set to:
Prevent complete pool drainage
Maintain sustainable prize pool
Ensure long-term game viability
If the calculated jackpot exceeds the cap, the capped amount is awarded instead.
The cap is configurable by the game administrator and can be adjusted based on pool growth and game economics.
The jackpot naturally grows when:
More bets are placed: 80% of each USDC bet enters the pool
Small payouts occur: Most wins are 0-2 matches, preserving the pool
No jackpots hit: Rare 4-match wins mean the pool accumulates
Checking Current Jackpot
You can view the current jackpot:
The current jackpot is displayed prominently on the game interface.
Call the jackpot() function on the contract:
This returns the current jackpot amount in USDC (6 decimals).
After a Jackpot Win
When someone hits the jackpot:
The jackpot amount is transferred to the winner
The pool decreases by that amount
A new, smaller jackpot is calculated from the remaining pool
The jackpot rebuilds as new bets come in
No LTB Reward for Jackpot
Players who hit the jackpot receive only USDC, not LTB tokens. This is because:
The jackpot is already the maximum prize
LTB rewards are designed as consolation/participation incentives
It simplifies the reward structure at the top tier