CRXDocs

Oracle

What does CRX need a price for?

Two distinct things, served by two oracle layers:

LayerRegistryAnswers
Per-pair FX oracleoracleOf[pair]the forward rate the contract marks an NDF against
Per-token collateral oraclecollateralOracle[token]the USD price of a collateral token

Both are pluggable and swappable by the operator — the same shape Morpho uses for its oracles. Neither is hard-wired into the contract.

How is a pair marked?

The FX oracle is read on every mark. CRX uses Pyth Network feeds: a signed price pulled on demand, fixed to a scale of expo = −8 (so 1e8 reads as a rate of 1), with a non-zero publish time required.

Three guards make a bad feed fail loud rather than silently:

  • BadMarkScale — the feed is not at the expected −8 scale.
  • StaleMark — the publish time is missing or too old.
  • NoOracle — no feed is set for the pair.

A mark that cannot be trusted halts the path that needed it. Nothing settles on a guessed price.

How is collateral priced?

One price per token, global — identical wherever the token is valued. Every Credit Support Annex reads it; the core reads it for the general balance. The price is the oracle's; the haircut is the CSA's. See CSA & Dual Collateral (~4 min).

This is why yield-bearing collateral works without a keeper: sUSDS's oracle returns a share price that climbs over time, and every valuation picks it up automatically.

Is the settlement rate the same as the live mark?

No. The live mark keeps an open position solvent day to day. The fixing that settles the trade is read once, at the fixing date, and must be published on or after that date. The distinction matters enough to have its own page — see Pricing & Rate Sources (~3 min).

Next: Pricing & Rate Sources (~3 min) — indicative price vs the binding fixing.