Links
Comment on page

Introduction to DIA Oracles

A comprehensive guide to use DIA

Introduction to DIA

DIA is a cross-chain oracle provider that sources granular market data from diverse exchanges, including CEXs, DEXs, and NFT marketplaces. Its data sourcing is thorough, enabling unparalleled transparency and customizability for resilient price feeds for 20,000+ assets. Its versatile data processing and delivery ensures adaptability and reliability for any decentralized application.

Oracle configuration settings

Oracle specifications:
Methodology: VWAPIR
The final price point for each asset is calculated by computing the assets' trade information across multiple DEXs and CEXs. This is done using a Volume Weighted Average Price with Interquartile Range (VWAPIR) methodology. Learn more about VWAPIR.
Update frequency: 15 seconds (if 0.2% deviation) + 60 minute heartbeat
The oracles scan for price changes every 15 seconds. If it detects a price fluctuation exceeding 0.2% from the last published rate, it promptly sends an update on-chain. Moreover, a consistent heartbeat refreshes all asset prices every hour.

Included price feeds + data sources

The Boba-ETH oracle includes the following price feeds:
The Boba-BNB oracle includes the following price feeds:
Learn more about DIA’s data sourcing and data computation architecture.

Deployed contracts

Access the oracles in the smart contracts below:
  • Boba-ETH: https://bobascan.com/address/0xB3519a1760F3A16934a890F19E67A98cBF1e0859
  • Boba-BNB: https://bobascan.com/address/0xCF06Ac8C6FFb7b7E313D43e8Fb2E740D5aE82e6E

How to access DIA oracles?

Here is an example of how to access a price value on DIA oracles:
  1. 1.
    Access your custom oracle smart contract on Boba.
  2. 2.
    Call getValue(pair_name) with pair_name being the full pair name such as BTC/USD. You can use the "Read" section on the explorer to execute this call.
  3. 3.
    The response of the call contains two values:
  4. 4.
    1. 1.
      The current asset price in USD with a fix-comma notation of 8 decimals.
    2. 2.
      The UNIX timestamp of the last oracle update.
You can find DIA's oracle integration samples in Solidity and Vyper languages by visiting:

Support

For assistance, connect with the DIA team directly on Discord or Telegram. Developers seeking other specialized, production-grade oracle with tailored price feeds and configurations can initiate the request here: Request a Custom Oracle | DIA Documentation
Last modified 1mo ago