This page is the complete reference for every error the IFÁ Labs oracle contract and recommended integration patterns can produce. Use it when debugging unexpected reverts in tests, on testnets, or in production transactions.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.
How to Read a Revert
When a transaction reverts, the EVM returns error data that encodes which error fired and with what parameters. Three tools for decoding this:Foundry
ethers.js
Basescan
Open the failed transaction on Basescan. The Overview tab shows the revert reason if the contract source is verified. The Internal Txns tab shows which internal call produced the revert.Contract Errors
Errors produced directly by the IFÁ Labs oracle contract.AssetNotSupported
| Parameter | Type | Description |
|---|---|---|
assetId | bytes32 | The unrecognised asset ID that was passed |
getAssetInfo and getAssetsInfo — these return exists = false instead of reverting.
Resolution:
InvalidAssetIndexLength
getPairsbyIdForward or getPairsbyIdBackward received input arrays of different lengths.
Parameters:
| Parameter | Type | Description |
|---|---|---|
len0 | uint256 | Length of the first asset array (_assetIndexes0) |
len1 | uint256 | Length of the second asset array (_assetsIndexes1) |
InvalidAssetOrDirectionLength
getPairsbyId received arrays where the asset arrays and the directions array are not all the same length.
Parameters:
| Parameter | Type | Description |
|---|---|---|
len0 | uint256 | Length of _assetIndexes0 |
len1 | uint256 | Length of _assetsIndexes1 |
lenDir | uint256 | Length of _directions |
Integration Pattern Errors
Errors produced by the recommended integration patterns documented in this guide — not by the oracle contract itself, but by the verification logic in your consuming contract."IFA: asset not supported"
Type: require revert string (or custom error in your contract)
When it fires: Your contract called getAssetInfo, received exists = false, and your existence check caught it.
This is correct behaviour. The oracle returned a valid response — the asset simply is not supported. The error is in the asset ID being passed to your contract, not in the oracle.
Resolution: Verify the asset ID using the diagnosis script in Common Integration Errors.
"IFA: price feed is stale"
Type: require revert string (or custom error in your contract)
When it fires: block.timestamp - info.lastUpdateTime > MAX_PRICE_AGE in your staleness check.
Resolution steps:
Compare against your MAX_PRICE_AGE
If the feed age is consistently above your threshold during normal market conditions, your
MAX_PRICE_AGE is too tight. Set it to at least 1.5× the asset’s heartbeat interval.Check if all feeds are affected
If every asset is stale simultaneously, a relayer issue may be affecting the deployment. Check the IFÁ Labs Telegram.
Report if prolonged
If a specific feed remains stale beyond 12 hours with no incident announcement, report it to support@ifalabs.com.
"IFA: price deviation exceeded"
Type: require revert string (or custom error in your contract)
When it fires: Your peg deviation circuit breaker detected a price outside the acceptable band around the expected peg.
Two scenarios:
Scenario A — Genuine depeg event. The stablecoin has moved off its peg in the real market. Your circuit breaker is working correctly. Do not bypass it. Investigate the market condition before resuming protocol operations for the affected asset.
Scenario B — Threshold too tight. Your MAX_DEVIATION_BPS is set tighter than the asset’s natural peg fluctuation range. Emerging market stablecoins (CNGN, ZARP, BRZ) have slightly wider natural ranges than global stablecoins (USDT, USDC).
"IFA: price must be positive"
Type: require revert string
When it fires: info.price returned from the oracle was zero or negative — and your integration correctly guards against this before casting int256 to uint256.
This should not occur with any currently supported feed under normal operation — the oracle’s zero-price guard (a post-audit fix) prevents zero prices from being stored on-chain. If you encounter this error:
- Confirm you are using the correct oracle address for your network
- Check if the asset ID is correct —
exists = falsereturns zero-valued fields - Report it immediately to support@ifalabs.com if the asset exists but the price is zero
"IFA: unsupported asset in batch"
Type: require revert string
When it fires: Your batch processing loop checked exists[i] and found false for one of the assets in a getAssetsInfo call.
Resolution: Identify which asset ID in your batch returned exists = false and debug that specific ID using the diagnosis steps in Common Integration Errors.
ProtocolIsPaused
Type: Custom error
When it fires: Your protocol’s auto-pause mechanism detected a stale or missing oracle feed and set paused = true. Subsequent calls to paused functions revert with this error until the guardian calls resume().
Resolution:
Identify which feed triggered the pause
Check your
ProtocolPaused event log — it includes the assetId that caused the pause and the reason ("feed_stale" or "feed_missing").Verify the feed has recovered
Read
lastUpdateTime for the affected asset and confirm it is within your staleness threshold.Guardian calls resume()
Once the feed is confirmed healthy, the guardian address calls
resume() to unpause the protocol.NotGuardian
Type: Custom error
When it fires: A non-guardian address attempted to call a guardian-restricted function (resume(), setMaxPriceAge(), etc.).
Resolution: Only the address set as guardian in your contract can call these functions. If the guardian address has changed — for example, a multisig migration — you need to update the guardian address through whatever access control mechanism your protocol uses.
MCP Server Errors
Errors returned by the IFÁ Labs MCP Server when tool calls fail.| Error Code | HTTP Equivalent | Description | Resolution |
|---|---|---|---|
asset_not_supported | 404 | The requested asset symbol has no feed | Check get_supported_assets for the valid asset list |
price_feed_stale | 503 | The feed exists but exceeds max_age_seconds | Widen max_age_seconds or check for relayer issues |
network_not_supported | 400 | The network parameter is not a valid network name | Use: base-mainnet, base-sepolia, assetchain-testnet |
rpc_connection_failed | 503 | The server cannot connect to the RPC endpoint | Check --rpc-url configuration or switch providers |
invalid_symbol_format | 400 | The symbol string is malformed | Use uppercase with forward slash: "USDT/USD" |
derived_pair_failed | 503 | One or both underlying feeds are unavailable | Check both feeds individually with check_price_freshness |
rate_limit_exceeded | 429 | RPC provider rate limit hit | Switch to a dedicated RPC provider with --rpc-url |
Error Selector Reference
For advanced debugging — ABI-decoding revert data manually or matching errors in test assertions:| Error | Keccak256 Selector (bytes4) |
|---|---|
AssetNotSupported(bytes32) | cast sig "AssetNotSupported(bytes32)" |
InvalidAssetIndexLength(uint256,uint256) | cast sig "InvalidAssetIndexLength(uint256,uint256)" |
InvalidAssetOrDirectionLength(uint256,uint256,uint256) | cast sig "InvalidAssetOrDirectionLength(uint256,uint256,uint256)" |
Run
cast sig "<ErrorSignature>" from Foundry to compute the 4-byte selector for any error. Use these selectors with vm.expectRevert(bytes4) in Foundry tests or when decoding raw revert data in ethers.js.Foundry Test Patterns for Error Assertions
Next Steps
Price Appears Stale
Dedicated guide for diagnosing and resolving stale feed scenarios.
Common Integration Errors
Broader integration failure patterns and diagnosis scripts.

