Oracle
OracleSVI is the market state for one underlying asset and one expiry. It stores spot and forward prices, SVI volatility surface parameters, activation state, the last update timestamp, and the settlement price after expiry.
Lifecycle
An oracle starts inactive, becomes active after activate(), accepts live price and SVI updates before expiry, enters pending settlement at expiry, and becomes settled when the first post-expiry price update freezes the settlement price.
Mints require a live oracle. Redeems can use quoteable live or settled oracle state. After settlement, price and SVI updates are rejected.
API
Activate an oracle
The activate() function moves an oracle into the active state before expiry.
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Update prices
The update_prices() function pushes high-frequency spot and forward prices. If the oracle is past expiry and not yet settled, this call freezes the settlement price instead of recording another live update.
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Update SVI parameters
The update_svi() function pushes lower-frequency SVI volatility surface parameters before expiry.
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Read oracle state
Use these functions to read oracle identifiers, underlying asset, prices, SVI parameters, expiry, timestamp, settlement, and lifecycle status.
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Create price and SVI data
These helper constructors build PriceData and SVIParams values for oracle updates.
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Read status constants
These functions return the numeric status values used by status().
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Structs
OracleSVI
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.PriceData and SVIParams
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.Events
Oracle events
packages/predict/sources/oracle.move. You probably need to run `pnpm prebuild` and restart the site.