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.
DIA is a cross-chain, trustless oracle network delivering verifiable price feeds for LitVM. DIA sources raw trade data directly from primary markets and computes it onchain, ensuring transparency and data integrity.
Key Features
- Complete verifiability from source to destination smart contract.
- Direct data sourcing from 100+ primary markets eliminating intermediary risk.
- Support for 20,000+ assets across all major asset classes.
- Custom oracle configuration with tailored sources and methodologies.
Oracle Contracts
Oracle Configuration
| Parameter | Value |
|---|
| Pricing Methodology | Median |
| Deviation (%) | 0.5% for stablecoins, 1% for other assets |
| Heartbeat | 1h |
Available Asset Feeds
How to Access Data
Adapter contracts
To consume price data from the oracle, use the adapter smart contract for the asset you want to query on LitVM Testnet. This will allow you to access the same methods on the AggregatorV3Interface such as getRoundData & latestRoundData.
Below is an example of a contract consuming $USDC from the oracle using the DiaAssetSpecificCallingConvention interface. It will return the most recent price of USDC in USD with 18 decimal places (e.g. 999799952400000000 is $0.9997999524) along with the Unix timestamp of the last price update.
// 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 usdcAdapter = 0x4f91a950ed73c8B6F28dFE460f9444ed8866894f;
function getUSDCLatestPrice() external view returns (
uint128 latestPrice,
uint128 timestampOflatestPrice
) {
// Call the Chainlink adapter's latestRoundData function
(, int256 answer, , uint256 updatedAt, ) =
DiaAssetSpecificCallingConvention(usdcAdapter).latestRoundData();
latestPrice = uint128(uint256(answer));
timestampOflatestPrice = uint128(updatedAt);
return (latestPrice, timestampOflatestPrice);
}
}
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.