In three steps
1
Pay as usual
The card, the wallet or the shop adds a chance to win to the payment, paid by the business. Nothing changes for the customer.
2
A fair draw
The draw is public and checkable. Nobody can pick the result: not the shop, not Fade.
3
Sometimes, money back
10 %, half, the whole payment, or more: the business sets the reward, Fade’s vault pays it to the business, and the business credits its customer. The notification lands a few seconds after the payment.
Who does what
The customer only sees the app. Keepers move each ticket forward, the vault pays every reward, and the app credits it to the customer.
The ticket
Every reward on Fade is a ticket: a ticket price, a payout table, and an account that holds both plus the outcome once it is drawn. A ticket goes through three steps.1
The app opens the ticket
One instruction,
open_ticket, carries the ticket price, the payout table (each outcome’s probability and multiplier), the app share and the account the payout will go to. In that instruction Fade checks the payout table in exact integers, checks that the worst-case payout fits the vault’s caps, moves the ticket price, splits out the app and protocol shares and stores everything in the ticket account. If any check fails, the whole transaction fails and nothing moves.2
The oracle draws
From two slots after the open, anyone may call
request_randomness. The program derives the oracle seed on-chain from the first block hash after the open, a hash that did not exist when the ticket was opened, and requests a verifiable random draw (VRF). The VRF fulfils the request, typically within a few seconds.3
The vault pays
Once the randomness is written, anyone may call
settle_ticket. The program maps the random value onto the stored payout table and pays the outcome in USDC to the beneficiary named at open, the account the app chose. In Fade’s use cases that is the business’s own account, and the business credits its customer. The ticket account closes and its rent returns to whoever paid it.Nothing to sign for the customer
Only the first step needs a signature: the app’s, plus the funder’s when the ticket price comes from another account. The other two are permissionless and prepaid: every ticket carries a crank fee of 250 000 lamports, 50 000 for whoever requests the randomness and 200 000 for whoever settles. A keeper sends them. Fade runs a public keeper atapi.fade.finance that apps can hand their tickets to, and anyone can run their own. See Settlement and keepers.
So a customer who pays at a checkout, swaps on a DEX or claims a reward signs nothing for the reward: the business opens and funds the ticket with its own keys, and the customer sees the result a few seconds later.
The protocol is neutral about who funds a ticket: open_ticket accepts any funder that signs. Fade itself works only with integrators, which fund the ticket from their own budget, receive the reward and credit their customers. Any other design is not a Fade use case, and its legal nature is the integrator’s responsibility, see Legal framework.
Odds before the draw
The payout table is an argument ofopen_ticket and is copied into the ticket account before the randomness exists. Nothing changes it afterwards: settlement reads the snapshot, never live configuration. Anyone can open the ticket in an explorer, or decode the open transaction, and check that what the app advertised is what the program applies.
The check that admits a payout table is a single inequality on integers:
p_i in billionths (they must sum to exactly 1 000 000 000) and each multiplier m_i in basis points (10 000 is 1×). A payout table that pays out more than it takes in on average never opens. See Payout tables.
Who takes the other side
The vault: one USDC vault shared by every app, funded by liquidity providers. When a ticket opens, the vault reserves its worst case, the largest payout the payout table can produce less what the ticket price brought in. A ticket whose worst case is too large for the vault as it stands is refused at open. Caps are ratios of the vault’s live state, so what the vault can back grows with it. See How the vault works.What the app chooses and what the protocol fixes
A ticket’s life on-chain
If the randomness never arrives withinT_SETTLE (150 slots, about a minute), anyone may expire the ticket: the ticket price is forfeited to the vault. A return would let whoever controls the oracle withhold losing draws for free. Under forfeiture that strategy gains nothing.
One exception: a ticket that was never requested, whose seed nobody recorded while the chain could still prove it, can no longer be checked for a draw. refund_expired_ticket then returns its vault credit to the beneficiary instead (the protocol and app shares are not returned). Keepers record every ticket’s seed with record_ticket_entropy two slots after the open, so this end is rare. The reasoning is on Randomness.
Next
Try it
Design a ticket in the app.
Integration overview
Who signs what, and what an app needs.