Protocol
Running the steps
Every step that moves a round along can be sent by any wallet. Shear runs a keeper that sends them on time, and the app offers the ones that need no oracle data.
| Step | When it can run | Needs |
|---|---|---|
| start_round | A session is open and the next expiry is 1–8 days away | A fresh verified Pyth update; rent for the round’s accounts |
| finalize_auction | After the auction’s five minutes | Nothing |
| observe_expiry | Within one hour after expiry | The verified Pyth update for close − 1 |
| challenge_expiry | Within 15 minutes of the mark | A conflicting verified update |
| settle_round | 15 minutes after the mark, or at once if no calls sold | Nothing |
| timeout_settle | Seven days after expiry, if Active or Disputed | Nothing |
| process_ticket | After settlement, once per ticket | Nothing |
| close_round | After every ticket is processed | Nothing |
In the app#
When a step that needs no oracle data is due, the round band in the app shows a button for it: finalize the auction, settle a round with no calls sold, process a waiting ticket, close the round. Sending one costs a transaction fee and changes nothing about who gets paid.
Shear’s keeper#
The keeper reads finalized chain state and the maintained calendar. It starts each round in the first eligible session, finalizes the auction when it ends, requests Pyth’s update for the exact close second and posts it fully verified, settles after the dispute window, processes every ticket, and closes the round. If a conflicting mark appears during the dispute window, it submits challenge_expiry. It can’t replace a mark or choose a price.
Every keeper action is journaled before it is sent, so a restart resends the same signed transaction rather than doing a step twice.
Costs#
Whoever sends a step pays its transaction fee. start_round also pays rent for the round account, its three TSLAx accounts, its USDC escrow and its call mint. Instructions reserve 400,000 compute units.