Mechanics & risks
Read the rules
before you play.
raffle.fun is a fixed-outcome protocol, not a promise about the value, authenticity, or legality of any prize. This is the complete mechanic in plain language.
The mechanic
One prize. Equal tickets. One immutable threshold.
A sponsor deposits exactly one ERC721. Every purchased ticket is a unique ERC721 with the same chance of winning. The sale starts inclusively and ends exclusively.
Prize escrowed
The factory creates a non-upgradeable raffle clone and deposits the exact NFT.
Tickets sold
Each purchase adds its full gross amount to the unsettled pot. Sales remain open until the fixed end time.
One random draw
After close, Pyth Entropy chooses ticket 1 through the last ticket inclusively.
total tickets ≥ minimum
Threshold met
- Winning ticket holder claims the NFT
- Protocol receives 5% of aggregate gross sales
- Sponsor claims the remaining 95%
total tickets < minimum
Cash fallback
- Winner claims 80% of the distributable pot
- Sponsor claims 20% and reclaims the NFT
- There are no ticket refunds
If nobody buys a ticket
Anyone can close the raffle after its end without requesting randomness. The sponsor reclaims the NFT and no quote-token payouts are created. A sponsor may also cancel at any point while zero tickets have sold. Once ticket 1 is sold the prize is locked: it can only reach the winner or return to the sponsor through settlement.
Exact economics
The ticket price is all you pay.
One 5% fee is calculated from aggregate gross sales when the raffle resolves. It is deducted from the pot, never added at checkout. Every rounding remainder stays with the sponsor side of the cash split.
Gross pot
all ticket revenue
Protocol
floor(gross pot × 5%)
Distributable
gross pot − protocol
Threshold met: 120 / 100
- Gross sales
- 120.00 USDC
- Protocol fee
- 6.00 USDC
- Distributable pot
- 114.00 USDC
- Winner
- NFT
- Sponsor
- 114.00 USDC
Threshold missed: 80 / 100
- Gross sales
- 80.00 USDC
- Protocol fee
- 4.00 USDC
- Distributable pot
- 76.00 USDC
- Winner
- 60.80 USDC
- Sponsor
- NFT + 15.20 USDC
The fee is not allocated during individual purchases. Resolution calculates it once from the complete gross pot, then creates the treasury, winner, and sponsor pull claims.
Randomness & claims
The callback decides; it never sends assets.
A raffle permits exactly one Entropy v2 request. Resolution stores the winning ticket, snapshots its current owner, allocates claims, and stops. Every NFT, quote-token, and excess-native transfer happens later through a pull claim.
Verifiable draw
Pyth Entropy combines committed randomness and delivers the requested sequence to the same raffle clone.
Winner snapshotted
Moving the winning ticket after resolution cannot redirect the prize or cash payout.
Pull-based claims
Recipients choose a nonzero destination at claim time. A failed transfer rolls back and can be retried.
Oracle delivery is not instantaneous. If a callback fails, Pyth retry or replay tooling must deliver the same sequence; the raffle cannot request a replacement result. This preserves uniqueness but creates an external liveness dependency.
Ticket ownership
Transferable before and after the pending draw.
Tickets move like normal ERC721s while a raffle is active. Transfers freeze only while randomness is pending, preventing ownership changes between request and winner snapshot. After resolution, tickets may move again as souvenirs.
Odds
Your balance ÷ all sold tickets. Every ticket ID from 1 through totalTickets is eligible.
One-ticket case
Ticket #1 wins. There is no zero modulo and no off-by-one exclusion.
High threshold
It cannot make the raffle insolvent. It only changes which settlement branch is more likely.
No sales cap
Meeting the minimum does not close sales. Tickets remain available until the published end time, and the sponsor may earn above the target.
Trust model
Know what code can—and cannot—protect.
Existing raffle clones are non-upgradeable. Factory administration affects future creation and payment-token discovery labels—not an active raffle’s fixed economics.
Factory owner can
- Change the treasury captured by newly created raffles
- Verify or unverify payment tokens for official discovery
- Pause creation of new raffles
- Transfer two-step factory ownership
Factory owner cannot
- Change existing economics, fees, timing, or threshold
- Choose a winner, request another result, or upgrade a clone
- Seize the prize, settlement pot, or user claims
- Pause an existing raffle or its claims
Important risks
- The protocol is unaudited. Tests and analysis are not an independent audit.
- Prize NFTs and metadata can be counterfeit, mutable, malicious, or worthless.
- Any contract-backed quote token can be selected. Unverified and verified tokens may still freeze, rebase, blacklist accounts, or prevent claims.
- Pyth Entropy availability and replay tooling are external liveness dependencies.
- The subgraph can lag or fail. Direct chain state is authoritative.
- Chance-based prize systems may require jurisdiction-specific legal review. This software does not provide regulatory compliance.