Staleness is the most common issue developers encounter when integrating oracle price feeds. It is also the most frequently misdiagnosed. Before changing any code, work through this guide to confirm you are dealing with genuine staleness — and not a threshold configuration problem or a misunderstanding of how IFÁ Labs update triggers work.Documentation Index
Fetch the complete documentation index at: https://docs.ifalabs.com/llms.txt
Use this file to discover all available pages before exploring further.
Is This Actually a Problem?
The first question to answer is whether the staleness you are observing represents a real issue or expected oracle behaviour. IFÁ Labs uses a hybrid deviation + heartbeat trigger model. During periods of market stability — when a stablecoin is sitting tightly at its peg — updates are intentionally infrequent. The oracle is working correctly. It simply has nothing meaningful to report.Step 1: Measure the Actual Feed Age
Before anything else, read the current feed state directly from the oracle:Step 2: Identify the Staleness Pattern
After measuring feed ages, identify which of the following patterns matches your situation:Pattern A — Single Feed Stale, Others Fresh
One asset’s feed is significantly older than the others. Likely cause: Asset-specific issue — low market activity reducing deviation triggers, or a source-specific problem affecting only that asset’s aggregation pipeline. Actions:- Check the asset’s
PriceUpdatedevent history on Basescan to see the recent update cadence - Compare the on-chain price against external market sources — if the price looks accurate, the oracle is simply in a low-deviation period
- If the price looks wrong or the feed is older than 2× the heartbeat, report it to support@ifalabs.com
Pattern B — All Feeds Stale Simultaneously
Every asset on the network has a similar age, all significantly past their heartbeat intervals. Likely cause: Relayer issue affecting the entire deployment on that network — not asset-specific. Actions:- Check the IFÁ Labs Telegram for any incident announcements
- Check Basescan for the most recent
PriceUpdatedevent across all assets - If no incident is announced and feeds have been stale for more than 2 hours, report immediately to support@ifalabs.com
Pattern C — Feed Is Stale Only by Your Threshold
The feed age is within 1.5–2× the heartbeat interval but exceeding yourMAX_PRICE_AGE.
Cause: Your staleness threshold is tighter than the asset’s natural update cadence.
Fix: Widen your MAX_PRICE_AGE to at least 1.5× the heartbeat interval for each asset:
Pattern D — Testnet Feed Is Stale
You are testing against Base Sepolia or AssetChain Testnet and the feed is very old. Cause: Testnet relayers are less active than mainnet. During low-traffic periods, testnet feeds may not update for several hours or longer. Actions:- Use significantly wider staleness thresholds on testnet —
86400(24 hours) is reasonable for development - For integration testing against realistic update cadence, test against Base Mainnet with a read-only setup — no transactions required for price reads
- Never use testnet staleness behaviour to calibrate mainnet thresholds
Step 3: Check the Update History
For any feed showing unexpected staleness, inspect the historical update cadence on Basescan:Open the Events tab
Navigate to the oracle contract on Basescan and click Events: basescan.org/address/0xA9F17344689C2c2328F94464998db1d3e35B80dC#events
Filter by asset ID
Use the Topic 1 filter to show only events for the specific asset you are investigating. Enter the
bytes32 asset ID as the filter value.Review recent update timestamps
Look at the timestamps of the last 5–10 updates. Calculate the intervals between them. This is the actual observed update cadence for this asset — use it to calibrate your
MAX_PRICE_AGE.Step 4: Protocol Response to Genuine Staleness
If the feed is genuinely stale — beyond the expected heartbeat interval with no incident announcement — your protocol needs to respond appropriately while the issue resolves.Immediate Actions
Do not widen your staleness threshold as a quick fix. If a feed is stale because of a genuine relayer issue, widening your threshold to make it appear fresh does not make your protocol safer — it makes it less safe. Your threshold exists precisely to protect against this scenario. Pause affected operations — not the entire protocol. Suspend only the functions that depend on the stale feed. If CNGN is stale but USDT and USDC are fresh, only CNGN-collateralized operations need to pause.Communication
Tell your users what is happening. If a stale feed is causing protocol operations to pause, communicate it clearly — in your app UI, on your Discord, and on your social channels. Users who cannot execute transactions need to know why. Report to IFÁ Labs. If a feed is stale beyond 12 hours:- Email: support@ifalabs.com
- Telegram: t.me/ifalabs
PriceUpdated transaction hash.
Staleness Decision Tree
Preventing Staleness Issues in Production
Monitor proactively. Set up off-chain monitoring that alerts your team before staleness reaches the point of causing transaction reverts. See Running Price Monitoring. Set alert thresholds below your contract thresholds. If your contract reverts atMAX_PRICE_AGE = 5400s, set your monitoring alert at 4000s. Your team should know about approaching staleness before users experience failed transactions.
Build fallback paths before you need them. Implementing a secondary oracle fallback during an active staleness incident is stressful and error-prone. Build and test the fallback before launch. See Building Fallback Strategies.
Calibrate thresholds from real data, not estimates. Run the cadence analysis script above against each asset you consume before deploying to production. Set MAX_PRICE_AGE based on observed maximum intervals — not heartbeat documentation.
Next Steps
Building Fallback Strategies
Implement secondary oracle fallbacks for when the primary feed is stale.
Running Price Monitoring
Detect staleness before it causes transaction failures.

