Skip to main content
Fade emits Anchor events through a self-CPI (emit_cpi!), not through program logs. Each event is an inner instruction to the Fade program whose data is:
Logs can be truncated; inner instructions cannot. Every event carries a version field as its first field, its schema number: 1 for every event except TicketExpired, at 2. A schema only ever grows at its end.

Decoding

The generated client exports, for each event, a *_EVENT_DISCRIMINATOR and a decoder (for example TICKET_SETTLED_EVENT_DISCRIMINATOR and getTicketSettledEventDecoder()).
To follow a ticket after it closed (its account is gone), list its signatures with getSignaturesForAddress(ticket) and decode TicketSettled or TicketExpired from them.

Ticket events

TicketExpired is what a monitor reads: only checked && !request_found on a ticket never requested is a keeper’s failure; every other expiry, and every refund, is counted as one a withheld draw may explain, and ticket_forfeits_withheld is the vault’s count after this one. The payout table itself is not in TicketOpened: it is in the open_ticket instruction data (decode it with getOpenTicketInstructionDataDecoder()) and in the ticket account while it is open.

Liquidity events

EpochStruck is the vault’s price history: each one fixes the price of an epoch from total_assets and total_shares.

Governance events

All amounts are in base units: USDC has 6 decimals, shares 9.