DIA Oracles on Kadena are open source, and their source code is available in this repository. dApps built on Kadena can leverage DIA oracles to access up-to-date asset price information. These deployed oracles are designed for production environments and come with a predefined list of supported assets and settings. If dApps require a custom oracle with different assets and configurations, please contact DIA on Telegram.

Oracle Details

As Kadena allows for several chains in parallel, it is important to retrieve the price from the correct chain. Currently, DIA oracles are deployed on these chains:
Network IDChain IDDIA Contract Identifier
mainnet011n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle
mainnet012n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle
mainnet014n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle
testnet044n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle

Chainweb EVM Testnet 20

Network IDChain IDDIA Contract Address
chain2059200x2e034f073ee95db83b5498b90a53dd9b26525355

Oracle Configuration

ParameterValue
Pricing MethodologyVWAPIR
Deviation (%) & Refresh Frequency0.5% and 120 seconds
Heartbeat24h

Asset Feeds

The Kadena oracle includes the following price feeds. Use the Query Symbol as a parameter in the get-value (or getValue for chainweb EVM) function to receive the latest price information for any of these assets.
AssetQuery SymbolSources Overview
Bitcoin (BTC)BTC/USDBTC Sources
USD Coin (USDC)USDC/USDUSDC Sources
Staked ETH (stETH)STETH/USDstETH Sources
Ether (ETH)ETH/USDETH Sources
Wrapped Bitcoin (WBTC)WBTC/USDWBTC Sources
Moonbeam (GLMR)GLMR/USDGLMR Sources
Optimism (OP)OP/USDOP Sources
DIA Token (DIA)DIA/USDDIA Sources
Arbitrum (ARB)ARB/USDARB Sources
Binance Coin (BNB)BNB/USDBNB Sources
Avalanche (AVAX)AVAX/USDAVAX Sources
Celo Dollar (CUSD)CUSD/USDCUSD Sources
Kadena (KDA)KDA/USDKDA Sources
Gnosis (GNO)GNO/USDGNO Sources
Wrapped Ether (WETH)WETH/USDWETH Sources
Learn more about DIA’s data sourcing and data computation architecture.

How to Access Data

Locate one of the deployed contracts (either testnet or mainnet) and call the get-value (or getValue for chainweb EVM) function. This function expects one parameter, which is the symbols of the asset you want to retrieve and a “/USD”, so for example for the Bitcoin price the parameter must be “BTC/USD”. This will return two values:
  1. The price of the asset, with 8 decimals.
  2. The timestamp of the last update in Unix time format, in UTC timezone.
You can also refer to the Solidity guide for detailed steps on fetching price data from the oracle in your EVM contract.

Support

For developer 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 by contacting the DIA BD Team via Telegram.