Overview
The Win Rate model defines the target percentage of sold tickets that will be selected as winners. Instead of defining the exact number of winning tickets, the lottery specifies a Target Win Rate. After the lottery draw is completed, the protocol calculates how many winning tickets correspond to the configured percentage. Since the number of winning tickets must always be a whole number, the actual Win Rate may differ slightly from the configured value due to rounding. The Win Rate model is best suited for lotteries where the probability of winning is more important than the prize amount.Rules
- Target Win Rate: 0.1%–50%
- When the Prize Pool is greater than zero, at least one winning ticket is always selected.
How it works
When the lottery is created, the Target Win Rate is set as a percentage of tickets sold. When the draw is finalized, the protocol calculates the number of winning tickets based on the configured Target Win Rate and the total number of tickets sold. The winning tickets are then selected, and the Prize Pool is distributed equally among them.Winner calculation
The number of winning tickets is calculated using the following formula:- Total Tickets — Total number of tickets sold.
- Target Win Rate — Configured percentage of winning tickets.
- floor() — Rounds the result down to the nearest whole number.
- max(…, 1) — When the Prize Pool is greater than zero, ensures that at least one winning ticket is selected.
Prize calculation
After determining the number of winning tickets, the Prize Pool is distributed equally among them.Example
Configuration
- Prize Pool: 10,000 USDC
- Tickets Sold: 10,000
- Target Win Rate: 2%
Calculation
Final result
- Winning Tickets: 200
- Prize per Winner: 50 USDC
- Actual Win Rate: 2%
Edge cases
Actual Win Rate below target
When the calculated number of winning tickets is rounded down, the actual Win Rate becomes slightly lower than the configured Target Win Rate.Example
Configuration- Tickets Sold: 333
- Target Win Rate: 1%
Actual Win Rate above target
If the calculation produces fewer than one winning ticket and the Prize Pool is greater than zero, the protocol selects one winning ticket. As a result, the actual Win Rate may be higher than the configured Target Win Rate.Example
Configuration- Prize Pool: 100 USDC
- Tickets Sold: 10
- Target Win Rate: 0.1%

