XRP Ledger (XRPL) Price Oracles
Introduction to DIA
DIA is a trustless oracle network that delivers data feeds for any token, LST, RWA, random numbers and more to any blockchain. The network is permissionless, enabling nodes and stakers to participate in distributed data sourcing, secured by crypto-economic and cryptographic mechanisms. DIA’s native Ethereum L2 rollup, ‘Lasernet’, executes all critical oracle operations, ensuring trustless computation and full verifiability.
Usage of DIA Oracles on XRP Ledger
dApps building on XRP Ledger 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.
Deployed contracts
Access the oracles in the registry from our feeders below:
XRPL Testnet Oracle: diadata
XRPL Mainnet Oracle: diadata
How to access DIA oracles?
Here is an example of how to access a price value on DIA oracles:
Access the oracle registry on XRPL.
Call the retrieve function with the argument being the full pair name such as BTC/USD.
The response of the call contains two values:
The current asset price in USD with a fix-comma notation of 8 decimals.
The UNIX timestamp of the last oracle update.
Included price feeds + data sources
The XRPL oracle includes the following price feeds:
ETH
Ethereum
0x0000000000000000000000000000000000000000
BTC
Bitcoin
0x0000000000000000000000000000000000000000
XRP
XRPL
0x0000000000000000000000000000000000000000
Learn more about DIA’s data sourcing and data computation architecture.
Oracle configuration settings
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.
Update frequency: 2-minute heartbeat + 0.2% deviation threshold
A consistent heartbeat refreshes all asset prices every 2 minutes. Moreover, if the oracle detects a price fluctuation exceeding 0.2% from the last published rate, it promptly sends an update on-chain.
Support
For 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 here: Request a Custom Oracle | DIA Documentation
Last updated