Chainlink Relayer

Chainlink Relayer instantly relays Chainlink price feeds on Ethereum to IoTeX network, for enabling dApps where price feeds are needed

  • The prices are relayed to a contract (called shadow aggregator) on IoTeX which has exactly the same interface as Chainlink's aggregator, and it makes dApps to migrate to use Chainlink effortlessly once their integration with IoTeX is done.

  • The client waits for 20 blocks (around 5 minutes) to confirm a transaction.

  • Anyone can run a relayer to relay the information. So it is permissionless!

Shadow Aggregators

For each aggregator on Ethereum, IoTeX provides a shadow aggregator on IoTeX.

IoTeX Testnet

The table below lists the shadow aggregators deployed on IoTeX testnet:

Pair
Dec
Aggregator
Shadow Aggregator

BTC/USD

8

ETH/USD

8

BUSD/USD

8

USDC/USD

8

USDT/USD

8

DAI/USD

8

IOTX/USD

8

IoTeX Mainnet

Pair
Dec
Aggregator
Shadow Aggregator

BTC/USD

8

ETH/USD

8

BUSD/USD

8

USDC/USD

8

USDT/USD

8

DAI/USD

8

IOTX/USD

8

Pair
Dec
Aggregator

IOTX/USD

8

Exchange Aggregators

Exchange aggregators have the same interface as Chainlink aggregators. Prices are read from exchanges, and the average value of these prices will be fed to the exchange aggregator by permitted relayers if:

  • The value deviates by 0.5% or more from the last price, or

  • The time interval is more than 1 hour.

Exchanges used for fetching IOTX prices include Binance, Huobi, CoinGecko, KuCoin, and Coinbase.

Run a Relayer

Prepare the Config File

  1. Database URL: Fill the "databaseURL" field with the link to your database.

  2. Ethereum RPC URL: Input the Ethereum RPC URL in the "sourceClientURL" field.

  3. Relayer Private Key: Input your relayer private key. Ensure the account associated with this private key has a sufficient balance to cover transaction fees.

Your config.yaml file should look something like this:

yamlCopia codicedatabaseURL: "your_database_link_here"
sourceClientURL: "your_ethereum_rpc_url_here"
privateKey: "your_relayer_private_key_here"

Start the Relayer Service

Make sure you have Go installed and properly set up on your machine. If you encounter any issues, ensure that all dependencies are installed and your configuration file paths are correct.

Run the following command to start the relayer service:

shCopia codicego run main.go -config config.yaml

Last updated

Logo

This documentation portal is currently undergoing updates to align with the IoTeX 2.0 Whitepaper release. Information provided here may be incomplete, or out-of-date. Please use this portal for preliminary reference only, and check out the official IoTeX 2.0 Whitepaper for updated information.

.

2024 | IoTeX