TheDocumentation Index
Fetch the complete documentation index at: https://continuum-ec12e897.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
oracle program is Continuum’s price layer. It maintains per-market price observations, computes TWAPs, tracks volatility, and exposes a state machine that other programs (mainly mint-redeem) use to gate operations.
Sources
| Source | Where used |
|---|---|
| Pyth on-chain | Primary on mainnet. Read directly from Pyth’s price account. |
| Pyth Hermes (HTTP) | Primary on devnet. Keeper pulls every 15s and pushes observations on-chain. |
| Switchboard | Configurable per market (alternative on-chain source). |
| Manual (devnet only) | force_price for testing - operators can override. |
market.oracle_type.
Why the keeper pushes Hermes on devnet
Pyth’s RWA feeds on devnet are unreliable (often stale, sometimes missing for entire trading days). The keeper bypasses this by:- Polling
https://hermes.pyth.networkevery 15 seconds. - Selecting the right session-aware feed (
Primaryfor regular hours,PreMarket,PostMarket,Overnight). - Calling
oracle::update_price_observationwith the result.
Session-aware feeds
Pyth publishes multiple feeds per asset for different trading sessions. For QQQ, for example:| Session | Feed kind | Active hours (US/Eastern) |
|---|---|---|
| Regular | Primary | 09:30 – 16:00 |
| Pre-market | PreMarket | 04:00 – 09:30 |
| After-hours | PostMarket | 16:00 – 20:00 |
| Overnight | Overnight | 20:00 – 04:00 |
OracleFeed PDAs (one per (market, feed) pair) and selects based on current time. The frontend and keeper agree on which feed is active so quoted prices are consistent.
TWAP
Two TWAPs run in parallel per market:user_twap(window_seconds = 300default) - drivesL_NAVfor user-facing mint/redeem.keeper_twap(window_seconds = 60default) - drives keeper arb decisions.
PriceObservation records. Each observation records (price, confidence, timestamp). The TWAP is time-weighted across the window.
If the buffer is too short for the requested window, the TWAP returns 0 - the consuming program treats this as a fallback to initial_l_price.
Risk-state machine
The oracle exposes two enums that gate downstream programs:MarketState (oracle health)
Paused is admin-only - set via emergency_pause for kill-switch use cases.
Risk regime (mirrored to mint-redeem)
The mint-redeem program tracksRiskState derived from oracle health and price-movement metrics:
update_risk_state on each market every cycle to keep the mirror current.
→ Full risk-state details
Reading prices from a client
Three ways:1. Read from the Market account (recommended)
market.user_twap_price is updated by the oracle program directly into the market account. No oracle CPI needed at read time - it’s a plain account fetch.
2. Read from the OracleConfig account
3. Read from Hermes directly (off-chain)
Confidence intervals
Every Pyth observation includes a confidence interval - the publisher’s estimate of price uncertainty. The oracle stores it onlast_confidence. The mint-redeem program multiplies confidence by a state-specific multiplier when applying its worst-case quoting markup:
| Risk state | state_mult (default) |
|---|---|
Normal | 1× |
ProxyMode | 2× |
Stress | n/a (mint blocked) |
mint_fee_bps, but by quoting NAV at a worse-than-actual rate.
Volatility tracking
The oracle program also tracks recent realized volatility. Each observation push contributes to a rolling volatility bps figure (recent_volatility_bps). The keeper reads this for DLMM rebalancing - wider radius in higher-vol regimes.
The thresholds (calm < 10%, normal < 25%, elevated < 50%, stressed ≥ 50% annualized) are VIX-inspired heuristics. Per-market calibration is on the roadmap.
Pause and emergency stop
Operators can pause an oracle:OraclePriceUnavailable and rejects mints. Redeems still work using the last-fresh NAV.
Mainnet pause authority will be a multisig (Squads) - operator pauses are emergency-only.
Integration patterns
If you’re building on Continuum, the most common pattern is:Read more
Risk states
What
Normal / ProxyMode / Stress / Recovery mean for your operations.Oracle program reference
Instructions, account layout, error catalog.

