Oracle
DomFi uses an oracle which maintains realtime dominance. The calculation is updated every second via a time based weighted average on price data. The end-to-end data flow is as follows:
- Ingest raw trade data
- Perform a timed window average on price that produces average price data
- Take average price data and apply weights which produces weighted average price data
- Use weighted average price data to calculate market cap
- Use market cap to calculate dominance
In effect, the oracle maintains real time dominance with a one second publish window.
The oracle uses a push model. It does not publish every second and instead publishes onchain every 60 seconds.
Data Sourcing
The oracle sources tick data from the following central exchanges and maintain the following weights:
- Binance - 3
- Bybit - 2
- Coinbase - 1
- Gate - 1
- Mexc - 1
Some asset exclusions are applied prior to data ingest. Assets which have a measured:
- Zero market cap
- Detected anomaly
Are ignored and not included in the dominance calculation.
For meta data, proxy market data, sticky prices, and market cap data the oracle uses:
- Coingecko
Anomalies
We define an asset anomaly as a real time market cap calculation having a 0.5% percent difference to a known sticky market cap from a trusted meta data provider.
Publishing Data
Dominance data is published onchain every 60 seconds. The oracle onchain contract can be found here.