Skip to main content
Hotstuff aggregates prices from CEXs, DEXs, and on-chain oracles to compute accurate index prices. The aggregation process is designed to remain resilient to exchange outages, stale data, and abnormal price deviations. Current price sources include Binance, Bybit, Gate.io, Hyperliquid, Kraken, KuCoin, MEXC, OKX, and Pyth Network. Each source is assigned a protocol-defined weight. Weights are maintained by the protocol and may differ between assets.

Calculation Process

1. Price Collection

The oracle service collects index prices from all available sources for a given asset. Invalid values, including zero, NaN, or unavailable prices, are discarded before aggregation.

2. Outlier Filtering

If three or more valid sources are available, Hotstuff applies Median Absolute Deviation (MAD) filtering. The process:
  1. Compute the median price.
  2. Measure each source’s deviation from the median.
  3. Compute the median deviation.
  4. Remove sources exceeding the configured MAD threshold.
Example:
SourcePrice
Binance100.00
Bybit100.10
OKX99.95
Kraken100.05
Exchange X115.00
Median Price = 100.05 Exchange X is identified as an outlier and excluded from the calculation.

3. Weighted Median Aggregation

The remaining sources are aggregated using a weighted median.
SourcePriceWeight
Binance100.0040%
Bybit100.1025%
OKX99.9520%
Kraken100.0515%
Sources are sorted by price and accumulated by weight. The first price where cumulative weight exceeds 50% becomes the final Index Price.