Concepts
The Pyth price
Thaw prices every trade against Pyth Crypto.SPCXX/USD, the price of SPCXx, the tokenized SpaceX share that SPACEX converts into. The feed publishes around the clock, so batches open and clear at any hour, weekends included. The program reads it on chain from Pyth's push-oracle account for that feed.
What the program accepts
At the open of a batch and at the clear, the price account must:
- be the market's pinned Pyth account for the feed, so a cranker cannot bring a different or older update;
- be owned by the Pyth receiver program and fully verified;
- be younger than the market's maximum age;
- have a confidence interval within the market's limit;
- for the clear, when the market sets a clear window, have been published shortly after the reveal phase ended, so the book was final before the price was observed.
When the price is not valid
The market page says Market closed: no valid Pyth price with the reason. Batches do not open, and a batch already past its reveal phase waits until its clear deadline and is then cancelled. Revealed orders unlock unfilled; nobody's funds stay locked past the clear deadline.
The buyer cap
When a batch opens, the program fixes a price cap a set buffer above the opening price. Buyers lock USDC against that cap at reveal. If SPCXx rises above the cap before the clear, the clear is refused and the batch is cancelled, so a buyer can never owe more than it locked.