Docs
How Scrip uses Pyth.
No verified Pyth price, no conversion. The program reads Pyth's price account in the same transaction as the swap, and refuses anything it cannot verify — so the worst fill any save can get is set by a price nobody at Scrip controls.
The rule, in the program
finish_sweep reads a Pyth PriceUpdateV2 account and reverts the whole sweep — the delegate transfer and the swap with it — unless all four hold:
- the feed is one of the two this rule carries;
- the update is fully verified — a full quorum of Wormhole guardian signatures checked by Pyth’s receiver, not a partial check;
- it was published under 600 seconds before the sweep;
- its confidence band is under 1% of the price.
Then it computes the minimum the owner must receive from that price — the slice, less the owner’s tolerance, divided by the price plus its band — and checks the owner’s own token account gained at least that. The code is anchor/programs/scrip/src/lib.rs (finish_sweep), pyth.rs (the account, parsed by offset) and rule.rs (min_out_raw).
Two feeds on every rule
A tokenized stock has two honest prices. Crypto.SPYX/USD prices the token itself, wherever it trades. Equity.US.SPY/USD prices one share of the underlying, published on weekdays — before the opening bell too. A rule carries both feed ids and the program accepts either. When it settles against the share price, it converts through the mint’s live scaled-UI multiplier, because the token’s raw units are not shares once dividends have been reinvested.
What it has done, on mainnet
| Receipts that settled against a Pyth price | 9 |
| · against Equity.US.QQQ/USD | 5 |
| · against Equity.US.SPY/USD | 3 |
| · against Metal.XAU/USD | 1 |
| Median age of the price at settlement | 13 s |
| Median confidence band | 0.005% |
| Median distance between the fill and Pyth’s price, over 9 sweeps | 0.04% |
Every figure is read from receipts, each of which anyone can open; each receipt shows its own price, band, age and fill.
Right now
Read from the price accounts on Solana mainnet at 6 Nov 2026, 00:50 UTC.
| Equity.US.SPY/USD | 38 days old · band 0.002% · a sweep would wait |
| Crypto.SPYX/USD | 19 days old · band 0.142% · a sweep would wait |
| Equity.US.QQQ/USD | 38 days old · band 0.003% · a sweep would wait |
| Crypto.QQQX/USD | 19 days old · band 0.142% · a sweep would wait |
| Metal.XAU/USD | seconds old · band 0.010% · a sweep would settle |
| Equity.US.NVDA/USD | 38 days old · band 0.013% · a sweep would wait |
| Crypto.NVDAX/USD | 19 days old · band 0.078% · a sweep would wait |
| Equity.US.GOOGL/USD | 38 days old · band 0.025% · a sweep would wait |
| Crypto.GOOGLX/USD | 19 days old · band 0.120% · a sweep would wait |
| Equity.US.TSLA/USD | 22 days old · band 0.008% · a sweep would wait |
| Crypto.TSLAX/USD | 19 days old · band 0.139% · a sweep would wait |
| Equity.US.META/USD | 38 days old · band 0.021% · a sweep would wait |
| Crypto.METAX/USD | 19 days old · band 0.061% · a sweep would wait |
| Equity.US.AAPL/USD | 38 days old · band 0.025% · a sweep would wait |
| Crypto.AAPLX/USD | 19 days old · band 0.191% · a sweep would wait |
| Equity.US.AMZN/USD | 38 days old · band 0.020% · a sweep would wait |
| Crypto.AMZNX/USD | 19 days old · band 0.139% · a sweep would wait |
When there is no price
At a weekend no fresh price for the S&P 500 can be verified, and the program will not guess one. An arrival waits in the owner’s wallet — still theirs, still spendable — and their savings page says it is waiting. When a price returns, the rule settles it. Nobody at Scrip can supply a price instead: an operator-supplied price is exactly what this design exists to rule out.