open_ticket, plus a way to get the ticket settled. Everything after the open is permissionless.
Who signs what
open_ticket names four parties. They can all be the same key, or four different ones.
Two more accounts belong to the app:
shareAccount: the USDC account that receives the app share. Set by the app’s first ticket, and afterwards must match the record; it moves only throughset_share_account, signed by the app.nonce: must equal the record’snext_nonce(0 for a new app). The ticket address is["ticket", integrator, nonce], so it is known before the transaction lands.
Common shapes
The protocol is neutral about who funds a ticket:
open_ticket accepts any funder that signs and any beneficiary. Fade itself works only with integrators: the business funds the ticket, receives the reward and credits its customer, who never deals with Fade. A design where a customer pays for a ticket or receives from the vault directly is not a Fade use case, and its legal nature is the integrator’s responsibility, see Legal framework.
Fade verifies the odds and pays the beneficiary named at open, whoever it is: the app chooses it. In Fade’s use cases the business names its own account and credits its customer, as rule 3 of Legal framework sets out. A business that is its own beneficiary is trusted by its customers to credit them; it can make that checkable by showing each customer the public ticket behind their reward.
What an app needs
- No capital, no deposit, no registration. The first
open_ticketcreates the app record. - A payout table that clears the margin floor: declared margin ≥ 100 bps (vault margin floor) + 100 bps (protocol share) + the app’s share. See Payout tables.
- A USDC account for its share (it may be the ticket price’s own source when the app takes no share).
- SOL on the payer for the open, most of which comes back when the ticket closes. See Margin and shares.
- A keeper, or its own transactions, to request randomness and settle. See Settlement and keepers.
Three ways to call Fade
- From a server or wallet
- From a program (CPI)
- Over HTTP
Build
open_ticket with the TypeScript client generated from the IDL, sign it with your own keys, and send it. Hand the ticket to a keeper. This is the Quickstart.Composing with other instructions
open_ticket can sit in any transaction: after a payment, a swap, a mint. If any instruction fails, nothing lands. It measures about 59 000 compute units with a two-outcome payout table, and up to about 74 000 with 32 outcomes. A 32-outcome open_ticket, signed by a wallet acting as its own app, is 1 153 bytes: it fits a legacy or version 0 transaction. The only composition rule in the program applies to liquidity providers: request_deposit and request_withdraw refuse a transaction containing top-level instructions outside a short allowlist.
Before you sign: simulate
Every refusal is decided inopen_ticket, against the vault as it stands. Simulate the transaction first: a refusal comes back with the program’s error name and message, and costs nothing. Errors lists every code and what to do about it. The sizing rules are explained in Payout tables, so an interface can show the largest payout or the largest ticket price the vault accepts instead of letting a user hit a refusal.
The client
Fade publishes the program’s Anchor IDL atfade.finance/idl/fade.json. Generate a typed TypeScript client from it with Codama, on top of @solana/kit. The Quickstart walks through it.