Price feed
Last updated
Last updated
The index price for perpetual futures contracts is derived from either:
the spot prices of an underlying asset from or
the spot prices of an underlying asset from
(if the prices are not updated for 10 seconds by Sei's Oracle) or
the index price is calculated across several major exchanges
(if the prices are not updated for 10 seconds by Pyth's oracle).
For example, the BTC/ETH-USDC perpetual futures' index price either:
comes from Sei's BTC/ETH-USDC spot prices or
comes from Pyth's BTC/ETH-USDC spot prices or
is calculated from several exchanges' weighted average EMA of TWAP: Binance, OKX, Huobi, KuCoin, HitBTCβ¦etc. The weights will be rebalanced quarterly based on trading volume changes.
If Sei failed to update prices for 10 seconds, Pyth provides BTC/ETH-USDC spot price updates as perps' index prices accompanied by a confidence interval. Meanwhile, vDEX employs three mechanisms to prevent losing trades:
Index price comes from Pyth if it publishes in the current slot (which requires a minimum number of publishers)
If Pyth does not update a slot, the index price will come from several exchanges' weighted average EMA of TWAP.
The confidence interval must be sufficiently narrow (this parameter varies by pool)
In cases of the aforementioned situations, vDEX may adjust the reference components of the index price and take protective measures:
Source Price Deviation:
β₯ 3 exchanges
The price of exchange A deviates more than Β±3% from the median price of all selected exchanges (including exchange A).
The price of exchange A will be calculated as Β±3% of the median price of all selected exchanges.
= 2 exchanges
The price difference between the 2 exchanges is greater than 25%.
The price of the exchange with a smaller deviation from the previous index price is considered normal, while the other exchange is considered as a fat finger error. And the index price will temporarily exclude the 'abnormal' price.
= 1 exchange
The difference between the latest price and the previous one is greater than 25%.
It is considered as a fat finger error, the previous price is adopted as the index price.
Data Source Exclusion:
Suppose an exchange cannot provide market data at a specific time (due to exchange downtime, data interruption, or security incidents); the index price will be calculated based on the most recent valid price.
If the data from an exchange in the previous 300 data points (5 min) is less than 10%, the price of this exchange will be excluded, and the weight of this exchange will be temporarily adjusted to 0. When the data of this exchange recovers, and at least 90% of the data are valid out of 300 data points, the weight of this exchange will be recovered.
No Valid Data from the Source:
If none of the data sources provide valid prices or data retrieval encounters abnormal issues, the most recent valid index price will be used as the current index price, and the timestamp will be updated until a new valid value is calculated.