Skip to main content
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.

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

When it fires: A derived pair function received an asset ID that has no corresponding price feed in the oracle contract. Parameters: Does not fire from: getAssetInfo and getAssetsInfo — these return exists = false instead of reverting. Resolution:
See Supported Assets for the full list of valid asset IDs.

InvalidAssetIndexLength

When it fires: getPairsbyIdForward or getPairsbyIdBackward received input arrays of different lengths. Parameters: Resolution:
The error parameters tell you exactly what lengths were received — use them to identify which array was the wrong size.

InvalidAssetOrDirectionLength

When it fires: getPairsbyId received arrays where the asset arrays and the directions array are not all the same length. Parameters: Resolution:

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:
1

Check the actual feed age

Read lastUpdateTime from the contract and calculate the current age:
2

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.
3

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.
4

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).
Important: Do not apply a $1.00 peg deviation check to ETH/USD. ETH is not a stablecoin and has no fixed peg.

"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:
  1. Confirm you are using the correct oracle address for your network
  2. Check if the asset ID is correct — exists = false returns zero-valued fields
  3. Report it immediately to supportupport@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:
1

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").
2

Verify the feed has recovered

Read lastUpdateTime for the affected asset and confirm it is within your staleness threshold.
3

Guardian calls resume()

Once the feed is confirmed healthy, the guardian address calls resume() to unpause the protocol.
4

Review your staleness threshold

If the pause was triggered by normal market inactivity rather than a genuine issue, consider widening the MAX_PRICE_AGE for the affected asset.

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 Selector Reference

For advanced debugging — ABI-decoding revert data manually or matching errors in test assertions:
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.