Skip to main content
DIA is a cross-chain oracle provider that sources granular market data from diverse exchanges, including CEXs and DEXs. 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 details

ChainAddress
Mainnet0x245ad685F4D89D30fD1a14682C030c6128d08d17

Oracle configuration

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

Asset feeds

Asset TickerAdapter AddressAsset Markets
EUR0xbCfD839664B5Ad4D0C0C58db0c716D7a28dCd15EEUR markets
LYX0x3153e4d03Cf97B230fc9c9d0ECCE5b2F0834d130LYX markets
GBP0x7EA5b4bb2D89B1EfEF00FCC95E139B77Da27d460GBP markets
BTC0xD19856Bd3Dbd9Cb00BaC76Fc90603FA3bB05aCEABTC markets
ETH0xc7f3aceBe05482eeCD668df1FCF1B59e6d14f77bETH markets
wstETH0x18f2182B37d46deC1dc236Cf3Aad3a02981796cBwstETH markets
DAI0x1bB6c1A90c9449A14C184Dd141D2c7d7b788a679DAI markets
USDC0xc675A8d220E1ba6d14a77C9FbcFDd5f9474BD07AUSDC markets
USDT0xC00c10499DEF24352475Ae873C51FaFcFC894f03USDT markets
stETH0x2b94002cfFA638B37E4DDe54EDfcF6Efdcb29E6AstETH markets

How to access data

getValue Method

To consume price data, you’ll need to invoke the getValue method on the oracle contract which you can access through the DIA Oracle library or the interface. Below is an example of a contract consuming data from our oracle on LUKSO mainnet. If you pass BTC/USD as the key, it will return the most recent price of BTC in USD with 8 decimal places (e.g. 9601458065403 is $96,014.58065403) along with the Unix timestamp of the last price update.
pragma solidity ^0.8.13;

interface IDIAOracleV2 {
    function getValue(string memory) external view returns (uint128, uint128);
}

contract DIAOracleV2Consumer{

    address immutable ORACLE = 0x245ad685F4D89D30fD1a14682C030c6128d08d17;

    function getPrice(string memory key)
    external
    view
    returns (
        uint128 latestPrice,
        uint128 timestampOflatestPrice
    ) {
        (latestPrice, timestampOflatestPrice) =
                 IDIAOracleV2(ORACLE).getValue(key);
    }
}
See the full example here.

Adapter contracts

To consume price data from our oracle, you can use the adapter smart contract located at the adapter address for each asset. This will allow you to access the same methods on the AggregatorV3Interface such as getRoundData & latestRoundData. You can learn more here. This is a sample contract for consuming the BTC/USD price feed:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface DiaAssetSpecificCallingConvention {
    function latestRoundData() external view returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    );
}

contract DIAOracleSample {
    address btcAdapter = 0xD19856Bd3Dbd9Cb00BaC76Fc90603FA3bB05aCEA;

    function getBTCLatestPrice() external view returns (
        uint128 latestPrice,
        uint128 timestampOflatestPrice
    ) {
        // Call the Chainlink adapter's latestRoundData function
        (, int256 answer, , uint256 updatedAt, ) =
            DiaAssetSpecificCallingConvention(btcAdapter).latestRoundData();

        latestPrice = uint128(uint256(answer));
        timestampOflatestPrice = uint128(updatedAt);

        return (latestPrice, timestampOflatestPrice);
    }
}

Oracle Grants Program

The DIA Oracle Grants Program provides zero-cost oracle access for up to 1 year, covering deployment and update costs to accelerate dApp development on LUKSO. Learn more about the grant here:

DIA Oracle Grants Program | Apply Now

Request a Custom Oracle

DIA offers highly customizable oracles that are individually tailored to each dApp’s needs. Each oracle can be customized in the following ways, including:
  • Data Sources & Asset Feeds
  • Pricing Methodologies
  • Update Triggers (Frequency, Deviation, Heartbeat, …etc)
Get a tailored oracle for your dApp, request one below:

Support

For developer assistance, connect with the DIA team directly on Discord or Telegram.
I