The Oracle
Pyth, the price feed
An oracle is a price feed a contract reads and verifies on-chain. CRX reads Pyth Network, where exchanges, market makers, and trading firms publish their own prices first-hand. Pyth aggregates each pair's publishers into a single rate.
Safeguards on every read
Every read passes three checks before the contract uses the number.
- EMA — the contract reads an exponentially weighted moving average over roughly the past hour, and no single print can move the rate.
- Confidence band — a measure of how closely the publishers agree; a band too wide to trust the price fails the check.
- Staleness — a price observed more than 30 seconds ago fails the check; a fresh Pyth update can be attached in the same transaction.
A read that fails any check reverts rather than run on a bad number.
Pricing, margin, and settlement
The same feed does three jobs: it marks open positions, it values posted collateral, and it sets the rate read at settlement. It is a signed term both sides accept when the trade binds, and one neutral number then marks and settles for both. There is no dealer's mark to dispute.