Users claiming winnings
After a drawing settles, any winnings sit as a claimable balance against the winning ticket NFTs until claimed. In your app, surface the claim and call it on the user’s behalf (they sign the transaction):- Find the user’s winning tickets for a settled drawing. You can detect winners with on-chain reads, or list a wallet’s wins across many drawings with the Data API (
GET /v1/wallets/{address}/wins). - Call
Jackpot.claimWinnings(uint256[] _ticketIds)with those ticket IDs. Winnings pay out in USDC to the ticket owner.
The full win-detection and claim recipe (tier lookup, batching large claims) is at llms.megapot.io. Use the Data API when you need a wallet’s unclaimed wins across drawings.
Claim and re-buy in one step (auto-compound)
To let a user roll their winnings straight into new tickets in a single transaction, use auto-compound instead of a plain claim.- Contract:
TicketAutoCompoundVault.depositAndCompound(...) - What it does: claims the winnings and buys new tickets in one call.
- You still earn: it takes the same trailing
_referrers,_referralSplit, and_sourcearguments as a purchase, so your referral fees apply to the re-buy.
Claiming your referral fees
Your referral earnings (ticket fees plus win-share from users you referred) accrue as a claimable USDC balance inside theJackpot contract.
Read your claimable balance (USDC, 6 decimals):
Next: Referrals & Attribution · Protocol Reference · Add the jackpot to your site
