Skip to main content
Every price feed in IFÁ Labs is identified by a fixed bytes32 value called an asset ID. Understanding how asset IDs work — how they’re generated, how to use them safely, and how to generate new ones — is foundational to building a correct integration.

What an Asset ID Is

An asset ID is a deterministic bytes32 identifier generated by hashing the asset’s symbol string using keccak256:
This produces a fixed 32-byte value that serves as the key in the oracle’s on-chain storage mapping. The same asset ID works identically across every network IFÁ Labs is deployed on — Base Mainnet, Base Sepolia, AssetChain Testnet, and all future deployments. Why keccak256?
  • Collision-resistant. Virtually impossible for two different symbol strings to produce the same ID.
  • Deterministic. Given the same input string, the output is always identical — across languages, environments, and chains.
  • Gas-efficient. keccak256 is a native EVM opcode. Computing it costs minimal gas and it’s the standard pattern for on-chain key generation.
  • Self-documenting. A developer can verify any asset ID independently by hashing the symbol string themselves — no trust required.

Complete Asset ID Reference

All currently supported feeds and their verified asset IDs:

Using Asset IDs in Solidity

Declare as Constants

Always declare asset IDs as bytes32 constant at the contract level. This eliminates runtime computation and saves gas on every single call that references them.

Use a Central Registry

For protocols that support multiple assets dynamically, manage asset IDs in a central mapping rather than scattering them across functions:

Generating Asset IDs

If you’re testing locally, requesting a new feed, or verifying an existing ID independently, you can generate asset IDs yourself.

In Solidity

Use this in tests or scripts. Never use runtime keccak256 generation in production contract logic — declare constants instead.

In JavaScript (ethers.js)

In Python

In a Foundry Test

Use this test pattern to verify any asset ID before hardcoding it in a production contract.

Verifying an Asset ID Independently

The deterministic nature of keccak256 means you never have to trust IFÁ Labs’ published asset IDs — you can verify them yourself in seconds.
1

Take the symbol string

Use the exact format: "SYMBOL/USD" — uppercase, forward slash, no spaces.
2

Hash it with keccak256

Use any of the generation methods above — JavaScript, Python, Solidity, or a Foundry test.
3

Compare against the published ID

The output should exactly match the value in the asset ID reference table above.
4

Verify on-chain

Call getAssetInfo on the deployed contract with the generated ID. If exists returns true, the feed is live and the ID is correct.

Common Mistakes

Using the wrong string format. Asset IDs are generated from "SYMBOL/USD" — uppercase, with a forward slash. "usdt/usd", "USDT-USD", and "USDT" all produce different hashes and will return exists = false.
Hardcoding a typo in the hex string. A single wrong character in a bytes32 hex value produces a completely different ID. Always verify asset IDs against this page and the on-chain contract before deploying. Assuming asset IDs are network-specific. They are not. The same bytes32 value works on every network IFÁ Labs is deployed on. There is no remapping or per-network ID table.

Requesting a New Asset ID

New feeds are added by the IFÁ Labs team based on ecosystem demand. To request a new asset: Include the token contract address, backing proof, and the protocol or use case driving the request. Once approved and deployed, the asset ID will be added to the reference table on this page.

Next Steps

Gas Optimization Tips

Reduce the cost of your oracle integration in production.

Complete Example Contract

See all integration patterns combined in a single production-ready contract.