Skip to main content

Oracles

Oracles exist on the Stellar network to bring off-chain data onto the blockchain. For example, a popular use-case of oracles is the inclusion of token pricing into smart contract logic. Since a smart contract can't access data from outside the Stellar network, oracles provide a means by which the data can be accessed on-chain.

DIA Oracles

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.

Dapps building on Soroban 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, custom oracles with a different set of assets and configurations are available. If you need something that more closely fits your needs, you can reach out to DIA to make a request.

Deployed DIA contracts

AddressData SourceNetwork
CAEDPEZDRCEJCF73ASC5JGNKCIJDV2QJQSW6DJ6B74MYALBNKCJ5IFP4External CEXs & DEXsTestnet

Learn more about DIA's data sourcing and data computation architecture.

Oracle specification

Included price feeds

The DIA oracle on Stellar includes price feeds for the following assets:

AssetBlockchainAddressMarkets Overview
USDCEthereum0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48USDC Information
BTCBitcoin0x0000000000000000000000000000000000000000BTC Information
DIAEthereum0x84cA8bc7997272c7CfB4D0Cd3D55cd942B3c9419DIA Information

Pricing methodology

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.

Reflector Network

The Reflector oracle protocol is a combination of specialized smart contracts and peer-to-peer consensus of data provider nodes maintained by trusted Stellar ecosystem organizations. Feeds include on-chain and off-chain asset prices, CEX & DEX exchange rates, stock indices, financial market APIs, etc. Reflector nodes process, normalize, aggregate, and store trades information from Stellar Classic DEX, Soroban DEX protocols, as well as external sources.

Also available are Reflector Subscriptions: a service for user-defined customized triggers invoked automatically once the price change for the specified asset reaches a certain threshold. Users or Developers interested in creating subscriptions can learn more here.

Learn how to integrate Reflector feeds in their documentation.

Deployed Reflector contracts

AddressData SourceNetwork
CALI2BYU2JE6WVRUFYTS6MSBNEHGJ35P4AVCZYF3B6QOE3QKOB2PLE6MStellar DEXMainnet
CAFJZQWSED6YAWZU3GWRTOCNPPCGBN32L7QV43XX5LZLFTK6JLN34DLNExternal CEXs & DEXsMainnet
CAVLP5DH2GJPZMVO7IJY4CVOD5MWEFTJFVPD2YY2FQXOQHRGHK4D6HLPStellar DEXTestnet
CCYOZJCOPG34LLQQ7N24YXBM7LL62R7ONMZ3G6WZAAYPB5OYKOMJRN63External CEXs & DEXsTestnet