> ## Documentation Index
> Fetch the complete documentation index at: https://www.diadata.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LUKSO

> dApps built on LUKSO can leverage DIA oracles to access up-to-date asset price information.

[DIA](https://diadata.org/) 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

| Chain   | Address                                                                                                                                           |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Mainnet | [0x245ad685F4D89D30fD1a14682C030c6128d08d17](https://explorer.execution.mainnet.lukso.network/address/0x245ad685F4D89D30fD1a14682C030c6128d08d17) |

## Oracle Configuration

|                                       |                                                                                                                            |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Pricing Methodology**               | [VWAPIR](/docs/guides/methodologies/pricing-methodologies/vwapir-volume-weighted-average-price-with-interquartile-range-filter) |
| **Deviation (%) & Refresh Frequency** | 0.5% and 120 seconds                                                                                                       |
| **Heartbeat**                         | 24h                                                                                                                        |

## Available Asset Feeds

| Asset Ticker | Adapter Address                                                                                                                                   | Asset Markets                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| EUR          | [0xbCfD839664B5Ad4D0C0C58db0c716D7a28dCd15E](https://explorer.execution.mainnet.lukso.network/address/0xbCfD839664B5Ad4D0C0C58db0c716D7a28dCd15E) | [EUR markets](https://www.diadata.org/app/price/asset/Fiat/978/)                                               |
| LYX          | [0x3153e4d03Cf97B230fc9c9d0ECCE5b2F0834d130](https://explorer.execution.mainnet.lukso.network/address/0x3153e4d03Cf97B230fc9c9d0ECCE5b2F0834d130) | [LYX markets](https://www.diadata.org/app/price/asset/Lukso/0x0000000000000000000000000000000000000000/)       |
| GBP          | [0x7EA5b4bb2D89B1EfEF00FCC95E139B77Da27d460](https://explorer.execution.mainnet.lukso.network/address/0x7EA5b4bb2D89B1EfEF00FCC95E139B77Da27d460) | [GBP markets](https://www.diadata.org/app/price/asset/Fiat/826/)                                               |
| BTC          | [0xD19856Bd3Dbd9Cb00BaC76Fc90603FA3bB05aCEA](https://explorer.execution.mainnet.lukso.network/address/0xD19856Bd3Dbd9Cb00BaC76Fc90603FA3bB05aCEA) | [BTC markets](https://www.diadata.org/app/price/asset/Bitcoin/0x0000000000000000000000000000000000000000/)     |
| ETH          | [0xc7f3aceBe05482eeCD668df1FCF1B59e6d14f77b](https://explorer.execution.mainnet.lukso.network/address/0xc7f3aceBe05482eeCD668df1FCF1B59e6d14f77b) | [ETH markets](https://www.diadata.org/app/price/asset/Ethereum/0x0000000000000000000000000000000000000000/)    |
| wstETH       | [0x18f2182B37d46deC1dc236Cf3Aad3a02981796cB](https://explorer.execution.mainnet.lukso.network/address/0x18f2182B37d46deC1dc236Cf3Aad3a02981796cB) | [wstETH markets](https://www.diadata.org/app/price/asset/Ethereum/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0/) |
| DAI          | [0x1bB6c1A90c9449A14C184Dd141D2c7d7b788a679](https://explorer.execution.mainnet.lukso.network/address/0x1bB6c1A90c9449A14C184Dd141D2c7d7b788a679) | [DAI markets](https://www.diadata.org/app/price/asset/Ethereum/0x6B175474E89094C44Da98b954EedeAC495271d0F/)    |
| USDC         | [0xc675A8d220E1ba6d14a77C9FbcFDd5f9474BD07A](https://explorer.execution.mainnet.lukso.network/address/0xc675A8d220E1ba6d14a77C9FbcFDd5f9474BD07A) | [USDC markets](https://www.diadata.org/app/price/asset/Ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/)   |
| USDT         | [0xC00c10499DEF24352475Ae873C51FaFcFC894f03](https://explorer.execution.mainnet.lukso.network/address/0xC00c10499DEF24352475Ae873C51FaFcFC894f03) | [USDT markets](https://www.diadata.org/app/price/asset/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7/)   |
| stETH        | [0x2b94002cfFA638B37E4DDe54EDfcF6Efdcb29E6A](https://explorer.execution.mainnet.lukso.network/address/0x2b94002cfFA638B37E4DDe54EDfcF6Efdcb29E6A) | [stETH markets](https://www.diadata.org/app/price/asset/Ethereum/0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84/)  |

***

## How to Access Data

### getValue Method

To consume price data, you'll need to invoke the [`getValue` method](/docs/guides/how-to-guides/fetch-price-data/solidity#solidity-library) on the oracle contract which you can access through the [DIA Oracle library](/docs/guides/how-to-guides/fetch-price-data/solidity#solidity-library) or the [interface](/docs/guides/how-to-guides/fetch-price-data/solidity#using-the-diaoraclev2-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.

```solidity theme={"system"}
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](/docs/guides/how-to-guides/fetch-price-data/solidity).

### Adapter Contracts

To consume price data from our oracle, you can use the adapter smart contract located at the [adapter address](/docs/guides/chain-specific-guide/lukso#asset-feeds) for each asset. This will allow you to access the same methods on the `AggregatorV3Interface` such as `getRoundData` & `latestRoundData`. You can learn more [here](/docs/guides/how-to-guides/migrate-to-dia).

This is a sample contract for consuming the `BTC/USD` price feed:

```solidity theme={"system"}
// 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:

<Card title="DIA Oracle Grants Program | Apply Now" href="https://www.diadata.org/blockchain-oracle-grant/" horizontal />

***

## 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:

<CardGroup>
  <Card title="Request Custom Oracle" href="/docs/guides/how-to-guides/request-a-custom-oracle" icon="angle-right" iconType="solid" horizontal />
</CardGroup>

## Support

For developer assistance, connect with the DIA team directly on [Discord](https://discord.gg/ZvGjVY5uvs) or [Telegram](https://t.me/diadata_org).
