Lab: free tools · size first · stock scanner · crypto scanner · journal
Oracle Heartbeat Deviation
Oracle Heartbeat Deviation is a crypto market concept used to structure analysis, execution, and risk decisions with measurable rules. It helps practitioners translate noisy data into consistent portfolio actions over time.
Price oracles like Chainlink update when price moves beyond a deviation threshold or when a heartbeat time passes, whichever comes first. Between updates, the on-chain price can lag the market. Protocols that depend on these feeds need to account for that lag; attackers have exploited stale prices during fast moves. Checking a feed's heartbeat and deviation settings is part of assessing a lending protocol's risk.
How the two triggers work
A Chainlink price feed writes a new value on chain when one of two triggers fires. One is a price move bigger than the feed's deviation setting. The other is a timer called the heartbeat, which forces a write even on a quiet market. A feed with a 0.5% threshold and a one hour heartbeat on a calm day might update once an hour; on a volatile day it might update every few minutes. Each feed has its own settings, listed on its page in Chainlink's docs.
Where the lag comes from
Until the next write, contracts read the last stored value. If an asset moves 0.4% on a feed with a 0.5% threshold, the contract never hears about it until the heartbeat fires. On a congested chain, even a triggered update can take time to land. Chainlink's own docs warn that network congestion can affect how often feeds update, and tell developers to check the timestamp on every read and reject answers older than the heartbeat plus a buffer.
How protocols guard against stale prices
Some contracts compare against a second source and pause if the two drift apart. Chainlink suggests circuit breakers that halt a contract on extreme moves or stale data. Lending markets also set loan to value limits with room for the lag, so a short delay doesn't leave loans underwater.
What to check as a user
For a lending protocol you use, find which feeds price your collateral and what their deviation and heartbeat settings are. Thin tokens on wide thresholds are where liquidations come late or arrive in a rush. Chainlink rates its feeds by market pricing risk, and a collateral asset on a high risk feed deserves a smaller position.