Parameters
Lottery configuration parameters and their meanings.
Lottery Parameters
Each lottery uses system-wide settings from the Config account plus per-lottery timing derived from creation.
Core Parameters (Config)
| Parameter | Type | Description | Default |
|---|---|---|---|
ticket_price_lamports | u64 (lamports) | Cost per ticket in lamports | 10,000,000 (0.01 SOL) |
service_charge_bps | u16 | Protocol fee in basis points (1/100 of 1%) | 250 (2.5%) |
buy_window_secs | u32 | Duration of the buy window | 86,400 (24 hours) |
upload_window_secs | u32 | Duration of the upload/attestation window | 86,400 (24 hours) |
max_winners_cap | u32 | Upper bound for winners | 32 |
All amounts are in lamports (1 SOL = 1,000,000,000 lamports).
Winner Selection
Winner count is not a fixed parameter. Participants vote on the number of winners during the upload window; votes are weighted by ticket count. If no votes are recorded, the system defaults to 1 winner.
Ticket Parameters
| Parameter | Type | Description | Max |
|---|---|---|---|
max_tickets_per_purchase | u32 | Max tickets in single transaction | 100 |
max_tickets_per_wallet | u32 | Max tickets per wallet address | 1000 |
lucky_secret_max_length | u32 | Max characters for lucky secrets | 256 |
Admin Parameters
| Parameter | Type | Description |
|---|---|---|
admin_authority | Pubkey | Wallet authorized to manage lotteries |
fee_collector | Pubkey | Wallet receiving protocol fees |
upgrade_authority | Pubkey | Wallet authorized to upgrade program |
Current Daily Lottery Defaults
These are the standard parameters for daily lotteries:
| Setting | Value |
|---|---|
| Buy Window | 24 hours |
| Upload Window | 24 hours |
| Ticket Price | 0.01 SOL |
| Winner Count | Participant-voted (default 1) |
| Protocol Fee | 2.5% |
Parameter Governance
Currently, parameter changes require admin action. Future versions may introduce DAO governance for parameter modifications.
Changing Parameters
Parameters that are fixed per lottery:
- Ticket price for that lottery
- Buy/upload windows for that lottery
Parameters that can be adjusted globally:
- Protocol fee (with rate limiting)
- Buy/upload window defaults
- Admin authority (via ownership transfer)
Related Documentation
- Technical Design — How parameters are used in the contract
- Security & Risks — Trust assumptions around parameters
Edit this pageLast updated: January 2026