Concepts
Feed statuses
Every reason a SlateFeed will or will not serve a price.
Every Slate feed evaluates a status on each read. latestRoundData() returns a price only for OK, or for MARKET_CLOSED when the feed was deployed with allowMarketClosed. Every other status reverts with FeedUnavailable(status). latestQuote() never reverts, so you can always see why.
| Status | Meaning | latestRoundData() |
|---|---|---|
OK |
Fresh and consistent. | Price |
MARKET_CLOSED |
Weekend, holiday or overnight gap, and the last price was fresh when the session closed. | Price if allowMarketClosed, else reverts |
STALE |
Older than maxAge while the market is open. |
Reverts |
ORACLE_PAUSED |
Robinhood's oraclePaused() is set on the token. |
Reverts |
STRADDLE |
Observed before a multiplier switch that has since happened, and the old multiplier was not recorded. | Reverts |
CORPORATE_ACTION |
Within the grace window after a large multiplier change. | Reverts |
NO_DATA |
No usable price. | Reverts |
Evaluation order
NO_DATAif the source has nothing, or the price is not positive.ORACLE_PAUSEDif the token supports the flag and it is set. Testnet tokens use an older implementation without it, and SlateFeed probes for it with a gas-capped call.CORPORATE_ACTIONorSTRADDLEaround a multiplier switch. See The multiplier problem.OKif the price is younger thanmaxAge.MARKET_CLOSEDif the session is closed and the price was fresh at the close. See Market calendar.STALEotherwise.
Composed feeds
- SlateNavFeed takes the worst status of its constituents and the oldest observation time. One stale or paused stock makes the whole NAV unavailable.
- SlateQuotedFeed (a feed re-quoted in USDG) passes the base feed's status through, and reports
STALEorNO_DATAif the USDG/USD price is unusable.