Skip to main content
A Continuum market exposes prices in three places. They serve different purposes:

On-chain NAV (the canonical price)

Read Market → derive both NAVs:
This is the most-authoritative price for the protocol - what mint_paired, redeem_paired, keeper_mint_single, keeper_redeem_single all use.

Oracle freshness and confidence

For more granular signal, fetch the oracle:
Use this to:
  • Surface a “price is stale” warning in your UI when stale > 30.
  • Disable mint at confidence > some threshold (mirrors what the program would do anyway).
  • Compute the worst-case quote a user would actually pay (NAV × (1 + state_mult × confidence_bps / 10000)).

Pyth Hermes (off-chain)

For lowest-latency display:
Hermes feeds publish session-aware (regular / pre-market / post-market / overnight). The keeper picks the right session feed when pushing observations on-chain. Your client can match by checking the current US/Eastern hour.

Book base price (native Pool account)

Each side’s book is a single Pool account (seeds [b"pool", market, side]) in the CLP program. Its base_price_1e6 is where the keeper last pinned the book; bins ladder out from it.
Compare to NAV → drift:
While the underlying market is open this stays inside the per-market reposition gate (20-40bps). During closed hours the oracle withholds pushes and the book floats - a larger gap then is expected, not an arb: the inner bins around base are deliberately empty (the spread), and the first fresh print re-anchors the book.

Combining for a UX

A typical “live price” UI for a Continuum market:
Render: lNav as the primary price, riskState as a chip if non-normal, stale as a warning if > 30s. For book traders, also show the book base price and its deviation from NAV.

When to subscribe vs poll

  • Subscribe (onAccountChange) when you need < 1 second update. Costs are RPC connections; many wallets and bots can do this concurrently.
  • Poll (every 5–15s) for dashboards. Cheaper RPC bill, “good enough” latency.
  • Hermes HTTP when you want the rawest spot price independent of what the keeper has pushed. Bypasses on-chain TWAP smoothing.
The reference frontend polls every 15s for the market list and uses onAccountChange for the actively-displayed market detail page.

Decimals matter

Everything in account data is 6 decimals. Don’t mix raw lamports with UI numbers in the same expression:
BN arithmetic doesn’t overflow easily; prefer it over toNumber() for anything you might multiply.

See also

Reading state

Full state-fetch patterns (markets, vaults, positions).

Risk states

What Stress, ProxyMode, Recovery mean and how to surface them.