Contract Addresses

Overview

This page provides the official contract addresses for IFÁ Labs smart contracts across all supported chains. These contracts power our onchain oracle infrastructure and are the only addresses developers should trust when integrating IFÁ price feeds.

✅ All contracts are audited and publicly verified on chain explorers.

✅ Addresses are organized by network (Mainnet & Testnets).

✅ Developers should never rely on unofficial addresses or third-party sources.

Always double-check that you’re interacting with the exact addresses listed here. Using the wrong contract may expose you to security risks.

BLOCKCHAIN
MAINNET
TESTNET

Assetchain

0xBAc31e568883774A632275F9c8E7A5Bd117000F7

Base

0xA9F17344689C2c2328F94464998db1d3e35B80dC

0xbF2ae81D8Adf3AA22401C4cC4f0116E936e1025b

Features

  • Store and manage asset price information against USD

  • Calculate exchange rates between any two assets

  • Support for both forward (asset0/asset1) and backward (asset1/asset0) pair calculations

  • Decimal scaling for precision in calculations

  • Role-based access control with verifier and relayer architecture

Installation & Setup

  1. Ensure you have Solidity 0.8.29 installed

  2. Clone the repository

  3. Install dependencies:

     forge soldeer install solady~0.1.14
     forge build

Usage

The system operates through three main components:

  1. IfaPriceFeed - Stores price data and calculates pair exchange rates

  2. IfaPriceFeedVerifier - Validates and submits new price data

  3. Relayer Node (external component) - Collects and submits price data

Deployment Flow

  1. Deploy the IfaPriceFeed contract

  2. Deploy the IfaPriceFeedVerifier contract with references to the relayer node and price feed contract

  3. Call IfaPriceFeed::setVerifier to link the verifier contract

see script/DeployPriceFeed.sol

Basic Usage Example

// Deploy contracts
IfaPriceFeed priceFeed = new IfaPriceFeed();
IfaPriceFeedVerifier verifier = new IfaPriceFeedVerifier(relayerNodeAddress, address(priceFeed));

// Set verifier in price feed
priceFeed.setVerifier(address(verifier));

// Submit price data (called by relayer node)
bytes32[] memory assetIndexes = new bytes32[](2);
assetIndexes[0] =  keccak256("CNGN"); // CNGN/USD
assetIndexes[1] =  keccak256("BTC"); // BTC/USD

IIfaPriceFeed.PriceFeed[] memory prices = new IIfaPriceFeed.PriceFeed[](2);
prices[0] = IIfaPriceFeed.PriceFeed({decimal: -18, lastUpdateTime: block.timestamp, price: 2200000000000000000000000000});
prices[1] = IIfaPriceFeed.PriceFeed({decimal: -18, lastUpdateTime: block.timestamp, price: 68000000000000000000000000000000});

verifier.submitPriceFeed(assetIndexes, prices);

// Get exchange rate (CNGN/BTC)
(IIfaPriceFeed.DerviedPair memory pair) = priceFeed.getPairbyId(keccak256("CNGN"),  keccak256("BTC"), IIfaPriceFeed.PairDirection.Forward);

Code Structure / Architecture

The system follows a multi-layered architecture:

  1. Data Layer: Asset price storage in the IfaPriceFeed contract

  2. Validation Layer: Price verification through the IfaPriceFeedVerifier contract

  3. Access Control Layer: Role-based permissions (owner, verifier, relayer)

  4. Interface Layer: External interaction through IIfaPriceFeed interface

Last updated