The Two Trigger Conditions
A price update is submitted on-chain when either of the following conditions is met:Condition 1: Deviation Trigger
The new aggregated price deviates from the current on-chain value by more than the configured deviation threshold.Condition 2: Heartbeat Trigger
The time elapsed since the last on-chain update exceeds the configured heartbeat interval — the maximum allowed time between updates.lastUpdateTime never becomes indefinitely stale during periods of perfect market stability.
How They Work Together
Per-Asset Configuration
Deviation thresholds and heartbeat intervals are configured independently per asset. A single global setting would be either too tight for some assets or too loose for others.These values represent the current configuration and may be adjusted as the network matures and empirical update data informs calibration. Follow @ifalabs for announcements of threshold changes.
Why These Thresholds Matter for Protocol Developers
Setting Your Staleness Threshold
Your protocol’sMAX_PRICE_AGE staleness check needs to account for the heartbeat interval of the assets you’re consuming. If you set MAX_PRICE_AGE tighter than the heartbeat interval, your protocol will frequently reject valid, accurate prices simply because the market hasn’t moved enough to trigger a deviation update.
- Minor delays in relayer submission during network congestion
- Block timestamp variance
- The time between the heartbeat condition being met and the transaction being mined
Reading Update Cadence From On-Chain Data
Before setting staleness thresholds, observe the actual update cadence for your target asset in production. ThePriceUpdated event log is the authoritative source:
Deviation Trigger Mechanics in Detail
What Counts as a Deviation
The deviation calculation compares the new aggregated price against the current on-chain stored value — not the previous aggregation round’s result. This distinction matters:Deviation vs. Peg
The deviation trigger fires on movement relative to the last on-chain price — not relative to the $1.00 peg. These are different things:Heartbeat Trigger Mechanics in Detail
The Purpose of the Heartbeat
Without a heartbeat trigger, a stablecoin that sits perfectly at its peg for days would never update.lastUpdateTime would grow indefinitely stale, and any protocol with a reasonable staleness check would start rejecting the price — even though the price is accurate.
The heartbeat prevents this by guaranteeing a maximum gap between updates regardless of price movement.
Heartbeat Jitter
In practice, heartbeat updates do not fire at perfectly regular intervals. Several factors introduce jitter:- Gas price variability — relayers may delay submission slightly during high gas periods to minimise costs
- Block time variability — the exact block in which a transaction lands varies
- Aggregation round timing — the heartbeat condition is evaluated per aggregation round, not continuously
MAX_PRICE_AGE should include a buffer above the nominal heartbeat interval rather than matching it exactly.
Deviation and Heartbeat in Monitoring
When building off-chain monitoring for IFÁ Labs feeds, the trigger model informs what alert thresholds are meaningful:Summary
Next Steps
Decimal Precision & Formatting
Learn how IFÁ Labs scales and formats price data for on-chain consumption.
Handle Stale Data
Implement staleness guards informed by the trigger model documented here.

