What Happens When Oracle Prices Expire

 / 
1

Expired oracle prices can directly cause your assets to be incorrectly liquidated, result in you receiving fewer shares when depositing, or allow malicious arbitrageurs to front-run you. If price data is not updated within the specified time window, the protocol makes decisions based on stale prices—assets that should be liquidated are not, and those that should not be are. Here is all the practical information you need to know.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

1. Check Whether the Protocol You Use Has an Expiry Check

This is the most critical step. Many projects omit price freshness verification in their code, allowing stale prices to be used directly in business logic.

  • How to do it: Find the protocol's core contract on a blockchain explorer and search for the latestRoundData() or getPrice() function. Check whether there is a timestamp verification statement like require(block.timestamp - updatedAt <= heartbeat) after the call.

  • Completion standard: Confirm that there is an explicit timestamp check in the code and know the heartbeat interval used (e.g., 1 hour, 6 hours, etc.). If you cannot find one, the protocol is exposed to the risk of stale price attacks.

Key reminder: Chainlink's official documentation explicitly recommends that developers check the updatedAt field before using the price to ensure the data is fresh within an acceptable timeframe. If your protocol does not perform this check, you bear the risk.

2. Identify the Type of Stale Price Risk You Currently Face

The impact of stale prices varies completely depending on your operational scenario.

  • Scenario A: Lending/Staking If you have borrowed assets and the collateral price is overvalued due to staleness, you might not be liquidated in time; if the stale price is too low (e.g., wstETH undervalued by 2.85%), you could be wrongly liquidated. In March 2026, Aave suffered a misconfiguration that caused wstETH to be undervalued by approximately 2.85%, triggering around $27 million in liquidations.

  • Scenario B: Depositing/Minting If you deposit assets into a protocol, stale prices are used to calculate how many shares you will receive. When the price is too high, the protocol gives you more tokens, meaning you profit; however, the protocol side suffers as a result and may eventually have to mint more tokens or adjust parameters to balance the books.

  • Scenario C: Trading/Perpetual Contracts Jupiter's perpetual contract product once experienced oracle price updates lagging 5–10 minutes behind due to network congestion, while the product required updates to lag by no more than 3 seconds. Prices lagging by 5–10 minutes could not be used to open positions at all. If you operated during the lag period, you might have executed at an incorrect price.

3. Verify Whether the Current Price Is Fresh

Do not rely on the quote displayed on the frontend. Verify it yourself on-chain.

  • How to do it: On Etherscan or the corresponding chain's explorer, find the oracle contract used by the protocol (usually Chainlink's AggregatorV3Interface) and call the latestRoundData() method.

  • Check the return values: Focus on the updatedAt field—this is the timestamp when the price was last written on-chain. Subtract it from block.timestamp to get the number of seconds elapsed.

  • When is it considered complete: Compare against the oracle's Heartbeat (the heartbeat interval, which can be queried at data.chain.link) and confirm that the interval is within an acceptable range. If it has exceeded twice the heartbeat interval, it is recommended to hold off on interacting with the protocol.

4. Extreme Scenario: Complete Oracle Outage

If Chainlink or backup oracles all stop updating at the same time, the protocol may be completely unable to process price-sensitive operations.

  • Real-world case: In October 2025, a code error caused dYdX's oracle Sidecar service to delay restarting. After recovery, it used stale price data from 8 hours earlier, causing traders to be forcibly liquidated at price levels where they should not have been. Although on-chain user funds were not lost, losses related to liquidation were unavoidable.

  • How to respond: Monitor the project's official announcements to understand whether a backup oracle has been activated or the protocol has been paused. Jupiter has added a backup oracle for its product, paying 10-20 SOL per day to keep the backup data fresh.

  • Completion standard: Do not perform any critical operations while the protocol is paused or the backup is in use. Wait until the official confirmation that services have resumed, then check whether the price timestamps are normal.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

5. Common Causes of Failures Due to Stale Prices

  • Cause of failure: Assuming the price displayed on the frontend is real-time, then initiating a transaction during extreme market conditions when the frontend price has not been updated. When the transaction is mined, the protocol uses the last on-chain stale price, causing the outcome of your operation to deviate from expectations. Jupiter users, for example, saw the interface freeze because it depended on on-chain oracle data, and mistakenly believed that their operations were unaffected when the oracle was not working.

How to confirm you have performed the operation correctly:

Before each interaction with the protocol, call the oracle contract's latestRoundData() and check whether the time elapsed since updatedAt exceeds the asset's heartbeat interval. If it has, either wait for the price to update or choose a time window with better liquidity to operate. For existing positions, regularly (especially during periods of high market volatility) query the oracle price timestamp corresponding to the collateral to ensure you are not unjustly liquidated due to a stale price.