Workspace / Research tools
Oracle risk

Oracle Deviation and Heartbeat Inspection

A difference between an oracle observation and a market quote needs both a magnitude check and a time check. This local inspection tool compares an entered price gap with a configured deviation threshold and the entered observation age with a heartbeat interval. It keeps those checks separate because neither one alone proves that an update will occur or that the market quote is an appropriate reference.

Enable JavaScript to edit assumptions, calculate and compare a baseline locally. The formula and methodology below remain available without JavaScript.

Formula and accounting assumptions

Signed deviation equals (comparison market price ÷ last oracle price − 1) × 100%. The threshold comparison uses its absolute magnitude. Observation age divided by the configured heartbeat gives a time ratio, while max(0, heartbeat − age) gives the remaining time until that configured age. Multiplying the price difference by an exposed token quantity shows the marked valuation discrepancy in USD without assuming a realizable trading gain.

Worked hypothetical example

If the last oracle price is $100 and a comparison quote is $90, signed deviation is minus 10%. Two exposed tokens have a $20 lower marked value at the comparison quote. If the observation is 120 seconds old and the entered heartbeat is 60 seconds, the age ratio is two and remaining time is zero. Those inputs reach the modeled checks, but the calculation does not claim that a particular on-chain aggregator is overdue or malfunctioning.

Interpret the scenarios and limits

Feed-specific configurations, aggregation rules, deviation checks and timestamps must be verified separately. A sequencer outage, delayed transaction or difference in market definition can affect interpretation. The tool never queries a contract, predicts a publication time or labels a supplied spot quote as the true price. Sensitivity rows change the comparison price while holding the last oracle observation fixed. Use the signed value difference to understand exposure, and treat threshold status as a diagnostic rather than an execution signal.

Primary documentation

Your research workspace

Save selected inputs and research notes explicitly in this browser. Compare assumptions and restore a saved setup without submitting a trade. JavaScript enables the controls.

Find a tool or research page