Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 26 additions & 36 deletions docs/evm/oracles/dia.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,68 @@ displayed_sidebar: devBar

## Ecosystem Price Oracles, powered by DIA

### Introduction to DIA
### Introduction to DIA

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


### Usage of DIA Oracles on Telos

dApps building on Telos EVM can utilize DIA oracles to obtain up-to-date asset price information. These deployed oracles are suitable for use in production environments. They come with a list of supported assets and settings. However, if dApps require a custom oracle with a different set of assets and configurations, they should [contact DIA on Telegram](https://t.me/diabdteam).

The DIA oracle on Telos EVM is free of use. dApps built on Telos EVM can leverage the oracles to access up-to-date asset price information. These oracles are designed for production environments and comes with a predefined list of feeds and settings. For dApps requiring a custom oracle with a different set of assets and configurations, they should [contact DIA on Telegram](https://t.me/DIAOracles_Support_Bot).

### Deployed contracts

Access the oracles in the smart contracts below:



* **Telos Mainnet Oracle**: [https://www.teloscan.io/address/0xf774801c9f1b11e70966CE65EC7f95d7730F380d](https://www.teloscan.io/address/0xf774801c9f1b11e70966CE65EC7f95d7730F380d)

- **Telos Mainnet Oracle**: [https://www.teloscan.io/address/0xf774801c9f1b11e70966CE65EC7f95d7730F380d](https://www.teloscan.io/address/0xf774801c9f1b11e70966CE65EC7f95d7730F380d)

### Included price feeds + data sources

The Telos oracle includes the following price feeds:

|Asset Ticker|Asset Blockchain|Asset Address|Asset Markets Overview|
|--------------|-----------|------------|------------|
|USDT|Ethereum|0xdAC17F958D2ee523a2206206994597C13D831ec7|[USDT Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7/)|
|USDC|Ethereum|0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48|[USDC Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/)|
|ETH|Ethereum|0x0000000000000000000000000000000000000000|[ETH Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0x0000000000000000000000000000000000000000/)|
|BTC|Bitcoin|0x0000000000000000000000000000000000000000|[BTC Asset Information](https://www.diadata.org/app/price/asset/Bitcoin/0x0000000000000000000000000000000000000000/)|
|TLOS|Telos|0x0000000000000000000000000000000000000000|[TLOS Asset Information](https://www.diadata.org/app/price/asset/Telos/0x0000000000000000000000000000000000000000/)|
|MATIC|Polygon|0x0000000000000000000000000000000000001010|[MATIC Asset Information](https://www.diadata.org/app/price/asset/Polygon/0x0000000000000000000000000000000000001010/)|
|BNB|Binance Smart Chain|0x0000000000000000000000000000000000000000|[BNB Asset Information](https://www.diadata.org/app/price/asset/BinanceSmartChain/0x0000000000000000000000000000000000000000/)|
|AVAX|Avalanche|0x0000000000000000000000000000000000000000|[AVAX Asset Information](https://www.diadata.org/app/price/asset/Avalanche/0x0000000000000000000000000000000000000000/)|
|FTM|Fantom|0x0000000000000000000000000000000000000000|[FTM Asset Information](https://www.diadata.org/app/price/asset/Fantom/0x0000000000000000000000000000000000000000/)|
|USDV|Ethereum, Binance Smart Chain, Arbitrum|0x0E573Ce2736Dd9637A0b21058352e1667925C7a8|[USDV Asset Information](https://www.diadata.org/app/price/asset/Arbitrum/0x323665443CEf804A3b5206103304BD4872EA4253/)|


Learn more about DIA’s [data sourcing](https://docs.diadata.org/introduction/dia-technical-structure/data-sourcing) and [data computation](https://docs.diadata.org/introduction/dia-technical-structure/data-computation) architecture.

| Asset Ticker | Asset Blockchain | Asset Address | Asset Markets Overview |
| ------------ | ------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| USDT | Ethereum | 0xdAC17F958D2ee523a2206206994597C13D831ec7 | [USDT Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7/) |
| USDC | Ethereum | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | [USDC Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/) |
| ETH | Ethereum | 0x0000000000000000000000000000000000000000 | [ETH Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0x0000000000000000000000000000000000000000/) |
| BTC | Bitcoin | 0x0000000000000000000000000000000000000000 | [BTC Asset Information](https://www.diadata.org/app/price/asset/Bitcoin/0x0000000000000000000000000000000000000000/) |
| TLOS | Telos | 0x0000000000000000000000000000000000000000 | [TLOS Asset Information](https://www.diadata.org/app/price/asset/Telos/0x0000000000000000000000000000000000000000/) |
| MATIC | Polygon | 0x0000000000000000000000000000000000001010 | [MATIC Asset Information](https://www.diadata.org/app/price/asset/Polygon/0x0000000000000000000000000000000000001010/) |
| BNB | Binance Smart Chain | 0x0000000000000000000000000000000000000000 | [BNB Asset Information](https://www.diadata.org/app/price/asset/BinanceSmartChain/0x0000000000000000000000000000000000000000/) |
| AVAX | Avalanche | 0x0000000000000000000000000000000000000000 | [AVAX Asset Information](https://www.diadata.org/app/price/asset/Avalanche/0x0000000000000000000000000000000000000000/) |
| S | Sonic | 0x0000000000000000000000000000000000000000 | [S Asset Information](https://www.diadata.org/app/price/asset/Sonic/0x0000000000000000000000000000000000000000/) |

### 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](https://docs.diadata.org/products/token-price-feeds/exchangeprices/vwapir-volume-weighted-average-price-with-interquartile-range-filter).

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](https://www.diadata.org/docs/guides/methodologies/pricing-methodologies/vwapir-volume-weighted-average-price-with-interquartile-range-filter).

#### Update frequency: 0.2% deviation threshold, and 24 hour heartbeat.

The oracle operates a trade collection window of 2 minutes, distinct from the heartbeat mechanism. This period is used to aggregate trades for calculating the price point. Specifically, it gathers trade data within 120-second intervals and then evaluates if a 0.2% price deviation has occurred, triggering an update if such deviation is detected.


### How to access DIA oracles?

Here is an example of how to access a price value on DIA oracles:



1. Access your custom oracle smart contract on Telos.
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. The response of the call contains two values:
1. The current asset price in USD with a fix-comma notation of 8 decimals.
2. The UNIX timestamp of the last oracle update.
1. The current asset price in USD with a fix-comma notation of 8 decimals.
2. The UNIX timestamp of the last oracle update.

You can view the complete integration guide on Telos [here](https://www.diadata.org/docs/guides/chain-specific-guide/telos#telos).

You can find DIA's oracle integration samples in Solidity and Vyper languages by visiting:
## Request a Custom Oracle

→ [Access the Oracle | DIA Documentation](https://docs.diadata.org/products/token-price-feeds/access-the-oracle)
For assets not currently available or dApps requiring specific configurations, DIA deploys production-grade custom oracles tailored to your requirements with configurable data sources, pricing methodologies, update triggers, and coverage for any of 20,000+ supported assets.

→ [Request a Custom Oracle](https://www.diadata.org/docs/guides/how-to-guides/request-a-custom-oracle)

## Support
## Resources

For assistance, connect with the DIA team directly on[ Discord](https://chat.openai.com/c/d2ca764b-00d6-4de7-8555-0cc30ac416b1#) or [Telegram](https://t.me/diadata_org). Developers seeking other specialized, production-grade oracle with tailored price feeds and configurations can initiate the request here: [Request a Custom Oracle | DIA Documentation](https://docs.diadata.org/introduction/intro-to-dia-oracles/request-an-oracle)
- Developer Support: [Discord](https://discord.com/invite/ZvGjVY5uvs) | [Telegram](https://t.me/diadata_org)
- [Telos Integration Guide](https://www.diadata.org/docs/guides/chain-specific-guide/telos)
- [DIA Documentation](https://www.diadata.org/docs)