
Update Triggers (Deviation/Time)
IFÁ Labs employs a hybrid update strategy combining deviation-based and time-based triggers. This ensures prices stay fresh without unnecessary onchain writes, balancing security, accuracy, and gas efficiency — particularly important for stablecoins with low natural volatility.
Deviation-Based Triggers
An update is forced when the aggregated price deviates beyond a predefined threshold from the last onchain value.
Threshold: Typically very tight for stablecoins (e.g., 0.1–0.5% from peg), as large swings are rare and often signal issues.
Benefit: Immediate response to meaningful changes, protecting protocols from off-peg events.
Time-Based Triggers
A maximum interval ensures updates even during periods of perfect stability.
Interval: Dynamic per asset — longer for highly stable pegs (e.g., hours), shorter for emerging market stablecoins prone to minor drifts.
Benefit: Prevents indefinite staleness during low-activity periods.
How They Work Together
The oracle pushes a new price when either condition is met:
Price deviation ≥ threshold OR
Time since last update ≥ max interval
This hybrid model is optimized for stablecoins: deviation catches rare but critical events quickly, while time-based ensures consistent freshness.
Next: Understand Decimal Precision & Formatting for correct price interpretation in your contracts.
Last updated
Was this helpful?

