open_ticket, a ticket needs two more transactions. Both are permissionless and prepaid, so anyone can send them: the app, the public keeper, or any other keeper.
The timeline
Only the open needs the app's signature. After it, anyone can request, settle or expire, paid from the fee the ticket prepaid.
T_SETTLE is 150 slots, about a minute. It bounds how long Fade waits for randomness, never how long anyone has to settle: a fulfilled ticket stays settleable indefinitely, and expire_ticket refuses a ticket whose randomness has arrived (AlreadyFulfilled).
Why “open slot + 2”
The oracle seed must come from a block hash that did not exist when the ticket opened.request_randomness takes s*, the first slot present in SlotHashes after the open slot, and its hash h*, and derives the seed on-chain:
Expiry is forfeiture, with one exception
If the randomness is never fulfilled withinT_SETTLE, expire_ticket closes the ticket and the vault keeps the vault credit. The ticket price is not returned: a return would let anyone who can withhold a draw (an oracle key holder colluding with whoever opens tickets) cancel every losing ticket for free. Under forfeiture, withholding gains nothing. The guardian can pause new tickets when the oracle stalls, with an operating target of 60 slots, well before 150; that bounds how many honest tickets a long oracle outage can reach, it does not remove the exposure. The SOL side still comes back to the payer at expiry, except what was spent.
The exception is a ticket that was never requested and whose seed nobody recorded. Its seed is public from the slot after the open, so anyone could have created its VRF request and read the outcome; once SlotHashes no longer proves s*, the program cannot check whether that request exists. Forfeiting it would let whoever holds the request void every winner, so refund_expired_ticket ends it instead: the vault credit goes back to the beneficiary (or to the payout escrow if the beneficiary cannot receive), and the protocol and app shares are not returned. Recording the seed with record_ticket_entropy from open_slot + 2, which keepers do on every ticket, makes this case rare; expire_ticket refuses an unrecorded ticket (EntropyUnrecorded) and refund_expired_ticket refuses one the chain still proves (EntropyStillProven). Both ends count in Vault.ticket_forfeits_withheld, the figure a monitor watches.
A beneficiary that cannot receive
If the beneficiary’s USDC account cannot receive the payout at settlement (closed, frozen, or not a USDC account any more), settlement still succeeds: the payout moves to the program’s payout escrow, the ticket entersPayoutPending, and anyone can later call claim_payout to deliver it to the same beneficiary. Settlement never fails because of the beneficiary: a ticket that could not settle would block the vault’s epoch pricing for everyone.
The public keeper
Fade runs a keeper athttps://api.fade.finance. It holds no authority over any ticket; it is simply a keeper that is always on, paid by the crank fee each ticket prepays like any other keeper. It also serves the app’s USDC faucet.
Browsers can call the API only from Fade’s own app origins (CORS). Call it from your server, or run your own keeper.
POST /v1/tickets
Hands a ticket to the keeper. It checks that the address is a Fade ticket account and queues it.
Posting is optional: the keeper also sweeps the chain about every 30 seconds for open tickets nobody posted. Posting right after the open confirms starts it at once.
GET /v1/tickets/:address
The keeper’s record of a ticket. An untracked ticket that is still open on-chain is queued on the way.
GET /v1/health
lastTick is a Unix time in milliseconds; queue is the number of tickets in progress. rpcError appears when the keeper cannot read the chain.
Faucet
One claim per wallet and per IP address every 5 minutes, and a global daily limit.
Running your own keeper
A keeper needs a funded key and a loop. It earns the crank fees of the tickets it advances.- Find work. Fetch the program’s
Ticketaccounts (getProgramAccountsfiltered on theTicketdiscriminator) or subscribe to the program’s transactions and decodeTicketOpenedevents. - Record and request. For each ticket with
status = OpenandcurrentSlot ≥ openSlot + 2, sendrecord_ticket_entropy, then derive the seed and sendrequest_randomness(see the Quickstart code). - Settle. For each ticket with
status = Requestedwhose VRF request account is fulfilled, sendsettle_ticket. ForPayoutPendingtickets, retryclaim_payoutfrom time to time. - Expire or refund. For each ticket past
expirySlotwhose randomness is unfulfilled, sendexpire_ticket, orrefund_expired_ticketfor a ticket whose seed was never recorded and is no longer proven. Sweep closed tickets’vrf_payerwithsweep_ticket_vrfwhen the VRF refunds rent to it late. - Liquidity side. Strike the live epoch once its close has passed and no ticket opened before the close is still open (
strike_epoch), then claim struck requests (claim_deposit,claim_withdraw). Each step is paid; see How the vault works.