LiquidLottery is a fully on-chain, trustless lottery running on Hyperliquid L1 (HyperEVM). Every draw uses Chainlink VRF for provably fair randomness, and all funds are held in a non-custodial smart contract.
Which network does it run on?
Hyperliquid L1 (HyperEVM) — Chain ID 999, RPC https://rpc.hyperliquid.xyz/evm.
Which wallets are supported?
MetaMask, Rainbow, Coinbase Wallet, and any WalletConnect-compatible wallet.
Tickets
How does a ticket work?
Each ticket has:
5 white numbers — chosen from 1 to 90, all unique.
1 gold number — chosen from 1 to 90.
1 gold position — from 0 to 4, indicating which of the five slots the gold number occupies.
How much does a ticket cost?
The price is dynamic: 0.05 % of the combined Jackpot + Super Jackpot pool, with a minimum of 0.01 HYPE.
How many tickets can I buy?
Up to 25 tickets per round per player. Each round has a total cap of 10 000 tickets.
Can I choose my own numbers?
Yes. You can pick numbers manually or use the built-in random generator.
Draws & Prizes
How are winning numbers chosen?
Winning numbers are generated by Chainlink VRF v2.5 — a cryptographically verifiable random function. The draw request travels from Hyperliquid to Base via Chainlink CCIP, a VRF random word is generated, and the result is sent back. The numbers are derived deterministically from the random word and can be verified on-chain by anyone.
What are the prize tiers?
Tier
Match
Pool Share
Jackpot
All 5 white numbers
50 % of ticket revenue
Super Jackpot
All 5 whites + exact gold number and position
30 % of ticket revenue (cumulative across rounds)
Super Jackpot winners also receive their share of the regular Jackpot.
What happens if nobody wins?
Both the Jackpot and the Super Jackpot pool roll over to the next round and keep growing.
When can I claim my prize?
Prizes can be claimed at any time after settlement — there is no expiry.
What if there are multiple winners?
The pool is split equally among all winners in that tier. Any integer-division remainder (dust) carries over to the next round.
Timing
How often are draws held?
By default, every 24 hours (configurable via upkeepInterval). A draw can only happen if at least one ticket has been sold.
What if the automated draw doesn't trigger?
After a 5-minute grace period, anyone can call triggerPublicDraw() on the contract and earn 2 free ticket credits as a reward.
What if a draw gets stuck?
The owner can cancel it after 5 minutes (emergencyCancelDraw).
Anyone can cancel it after 24 hours (publicEmergencyCancelDraw) and earn 2 free ticket credits.
The round resets to OPEN so a new draw can be triggered.
Fees & Rewards
Where does the 20 % protocol fee go?
It covers operational costs: Chainlink CCIP cross-chain messaging fees, Chainlink VRF subscription costs, and server infrastructure.
Can I earn rewards without buying tickets?
Yes:
Trigger a public draw after the grace period → earn 2 free ticket credits.
Cancel a stuck draw after 24 hours → earn 2 free ticket credits.
Settle a round → earn 1 % of the round's fee pool in HYPE.
No. The contract is non-custodial — prize pools can only be distributed through settlement. The owner can only withdraw from the protocol fee pool (ownerFees). All critical admin actions are protected by 24–72 hour timelocks.
Can the owner manipulate draws?
No. Randomness comes from Chainlink VRF, which is cryptographically verifiable. The owner cannot influence, predict, or replay VRF results.
What if the owner disappears?
The community can still operate the lottery:
Anyone can trigger draws after the grace period.
Anyone can cancel stuck draws after 24 hours.
Anyone can settle rounds.
Prizes can be claimed at any time.
Technical
What is Chainlink CCIP?
Chainlink CCIP (Cross-Chain Interoperability Protocol) enables secure messaging between blockchains. LiquidLottery uses it to send draw requests from Hyperliquid to Base and to receive VRF results back.
What is Chainlink VRF?
Chainlink VRF (Verifiable Random Function) generates random numbers with a cryptographic proof that the result was not tampered with. LiquidLottery uses VRF v2.5 on Base.
Why use two chains?
Hyperliquid L1 does not natively support Chainlink VRF. The VRF request is handled on Base (which has VRF support), and the result is relayed back to Hyperliquid via CCIP.
Is the contract upgradeable?
Yes, via the UUPS proxy pattern. Upgrades require a 72-hour timelock followed by a 1-hour execution window. During the execution window, ticket purchases are paused.
What is the contract bytecode limit?
Hyperliquid enforces a 13 514-byte runtime bytecode limit. The contract logic is split into two external libraries (LotteryMath and LotteryViews) to stay within this limit.