Moving price oracle
Fuel Earn prices new Vault positions from this on-chain O2-backed oracle.
The moving oracle reads the O2 Price Feed proxy directly. Anyone may call update(). During bootstrap, a keeper calls it every minute so the source stays inside the contract's 120-second freshness limit. Observations are checkpointed at most once per hour in a 722-slot ring while every successful update contributes to cumulative price-time accounting.
Public reads expose spot price, 7-day TWAP, 30-day TWAP, source timestamp, retained history in seconds, observation count, staleness, and bootstrap status:
0: uninitialized1: bootstrap history shorter than 30 days2: at least 30 days of genuine retained history3: stale source data
During bootstrap, each TWAP uses all genuine available history. It never fabricates earlier observations or substitutes an undisclosed window. Missed updates use the last successfully sampled price until the next update.
The Vault uses only the available 30-day TWAP, including genuine partial history during bootstrap; it does not require has_30d_history. A stale or zero oracle value blocks new positions. Existing early-exit paths remain oracle-independent. Testnet FUEL and stFUEL both map 1:1 to O2 fFUEL; this is an explicit testnet simulation, not a claim that liquid-staking tokens always trade at par.