Error Index
| Error | Most Likely Cause |
|---|---|
exists = false | Wrong asset ID or unsupported asset |
| Stale price revert | Staleness threshold too tight or genuine feed delay |
| Wrong human-readable price | Decimal scaling applied incorrectly |
| Out of gas | Unoptimised batch reads or oracle reads in loops |
InvalidAssetIndexLength | Mismatched array lengths in batch pair functions |
| Derived pair revert | Underlying feed missing or self-pairing attempted |
| No events returned | Wrong block range or incorrect asset ID filter |
| WebSocket disconnects | Missing reconnection logic |
| RPC rate limiting | Too many calls against a public RPC endpoint |
| Wrong price on testnet | Using mainnet asset ID with testnet contract or vice versa |
exists = false
getAssetInfo returned exists = false — the asset ID was not recognised by the oracle contract.
Diagnosis
Common Causes and Fixes
Wrong symbol string format. Asset IDs are generated from"SYMBOL/USD" — uppercase, forward slash, no spaces. Any variation produces a different hash.
bytes32 hex string produces a completely different ID. Always verify hardcoded values against the Supported Assets page.
Asset not yet supported. Not every stablecoin has a feed. Check the Supported Assets page for the current list. If the asset you need is not listed, request it.
Wrong contract address. You may be pointing at the wrong network’s contract. Verify the address against the Contract Addresses page.
Stale Price Revert
Your staleness check is reverting —block.timestamp - info.lastUpdateTime > MAX_PRICE_AGE.
Diagnosis
Common Causes and Fixes
Threshold is tighter than the heartbeat interval. If yourMAX_PRICE_AGE is shorter than the asset’s heartbeat interval, the price will always appear stale during calm market periods when no deviation trigger fires.
| Asset | Heartbeat | Minimum Recommended MAX_PRICE_AGE |
|---|---|---|
| USDT/USD | 1 hour | 90 minutes (5400s) |
| USDC/USD | 1 hour | 90 minutes (5400s) |
| CNGN/USD | 2 hours | 3 hours (10800s) |
| ZARP/USD | 2 hours | 3 hours (10800s) |
| BRZ/USD | 2 hours | 3 hours (10800s) |
| ETH/USD | 1 hour | 90 minutes (5400s) |
Wrong Human-Readable Price
The price value you’re reading looks wrong — orders of magnitude off, or not matching external sources.Diagnosis
Common Causes and Fixes
Forgot to apply decimal scaling.info.price is not a dollar amount. It is a scaled integer. 1000124000000000000 is $1.000124, not $1 quadrillion.
decimal = -18, but always read decimal dynamically. Hardcoding 1e18 when the actual decimal is different produces a wrong result.
info.price as a BigInt from ethers v6 may overflow JavaScript’s Number type if converted naively. Use ethers.formatUnits or keep values as BigInt.
1e18, the product is scaled by 1e36. Always divide after multiplying.
Out of Gas
Transactions consuming oracle prices are running out of gas.Common Causes and Fixes
Oracle reads inside a loop. Reading from the oracle inside a loop multiplies the gas cost by the loop length.getAssetsInfo for any function that needs more than one price.
InvalidAssetIndexLength
Calling a batch derived pair function with arrays of different lengths.
Fix
All input arrays to batch pair functions must be the same length. Check_assetIndexes0, _assetsIndexes1, and (for getPairsbyId) _directions — all must have identical lengths.
Derived Pair Revert
getPairbyId or batch pair functions are reverting unexpectedly.
Common Causes and Fixes
Self-pairing. Passing the same asset ID for both parameters reverts. CNGN/CNGN is not a valid pair.No Events Returned
queryFilter for PriceUpdated returns an empty array.
Common Causes and Fixes
Block range too narrow. Stablecoin feeds update infrequently — a 1,000-block range may contain no updates. Use at least 50,000 blocks for historical queries.queryFilter without an asset ID filter returns all PriceUpdated events — not filtered by asset. Pass the asset ID as the first argument to the filter.
WebSocket Disconnects
Real-time event listener stops receiving events without throwing an error.Fix
WebSocket connections to RPC providers drop periodically. Implement reconnection logic:RPC Rate Limiting
Calls to the oracle are failing with rate limit errors from the RPC provider.Fix
The public Base RPC endpoint (https://mainnet.base.org) is rate-limited and not suitable for production monitoring or high-frequency queries. Switch to a dedicated provider:
Update your RPC URL and, for the MCP server, pass
--rpc-url with your dedicated endpoint:
Wrong Price on Testnet
Testnet prices differ significantly from mainnet or behave unexpectedly.Explanation and Fix
Testnet oracle prices reflect testnet relayer activity — they are independent of mainnet. Testnet feeds may be less fresh, use slightly different source data, or differ from mainnet during low-activity periods. This is expected behaviour. Confirm you are using the correct addresses per network:| Network | Oracle Address |
|---|---|
| Base Mainnet | 0xA9F17344689C2c2328F94464998db1d3e35B80dC |
| Base Sepolia | 0xbF2ae81D8Adf3AA22401C4cC4f0116E936e1025b |
| AssetChain Testnet | 0xBAc31e568883774A632275F9c8E7A5Bd117000F7 |
Still Stuck?
If your issue is not covered here:Error Code Reference
Specific revert error codes and their meanings.
Price Appears Stale
Dedicated guide for diagnosing and handling stale feed scenarios.
Get Help
Contact the IFÁ Labs team directly.

