Data feed categories
It is important to understand that there are different types of data feeds in Binance Oracle. For real data feeds, there are different types of them based on their data sources. We also have synthetic data feeds in which data is derived from the real data feeds.
Real data feeds
🟢 Certified Feeds: Binance Oracle certified data feeds. These assets have great market coverage and are listed on most of the major CEXs (e.g. BTC, ETH).
🔵 Verified Feeds: The assets are issued by renowned projects/companies. They also have good market coverage and are listed on major DEXs or some CEXs.
🟡 Standard Feeds: The assets are issued by renowned project/company. The data sources mainly rely on contracts maintained by external entities. Special caution and in-depth understanding of the risk is recommended before use.
🔴 Cautionary Feeds: These feeds have a limited number of data sources, which may not be entirely reliable and could potentially be manipulated by the market. Users should be aware of these risks when deciding to use this feed.
Synthetic data feeds
What are synthetic asset pairs
Most of the price data feeds in Binance Oracle are with quote asset = USD. For example, we are providing the prices for BTC/USD and ETH/USD, but the price of BTC/ETH has to be artificially derived using the intermediate currency USD.
Example 1:
If the price of BTC/USD = , ETH/USD = , the price of synthetic asset pair BTC/ETH should be .
Example 2:
If the price of BTC/USD = , the price of synthetic asset pair USD/BTC should be .
Binance Oracle supports synthetic asset pairs
Instead of users having to bake their own conversion formula into their smart contracts, Binance Oracle has incorporated such conversion in the Feed Registry smart contract. Users simply need to call the Feed Registry with the base and quote names and get the price of these synthetic asset pairs.
We offer two endpoints for users to get the price of synthetic asset pairs:
To get the synthesized answer for the pair, call
function latestAnswerByName(string memory base, string memory quote) external view returns (int256);
To get the decimals of the synthesized answer for the pair, call
function decimalsByName(string memory base, string memory quote) external view returns (uint8);
The query by asset addresses is not supported for synthetic asset pairs resolution. In this case, we return "feed not found" error.
To tell whether a pair is synthetic
Whenever possible, Binance Oracle will try to provide the actual price for the required asset pair. Only when the price for the asset pairs is not found, Binance Oracle will try to synthesize that.
Triangular Arbitrage
Users have to realize that the price of a synthetic asset pair is not exactly the same as the price of that pair trading in the market. There exists a triangular arbitrage opportunity as the exchange rate for three assets might not exactly match up. But, since triangular arbitrage opportunities are regularly exploited, these irregularities are expected to be minimal and the prices more accurate.