Dederi calculates the index price, including the BTC index and ETH index, by aggregating and verifying the latest spot prices from five exchanges: Bitstamp, Gemini, Bitfinex, Coinbase, and Binance. If any exchange data exhibits a delay exceeding 3 minutes, that exchange is excluded from the index calculation. The index price is updated every second using the following algorithm:
If at least one of the price discrepancies remains within the MaxIndexDiscrepancy, the calculated IndexPrice is valid and adopted; otherwise, an anomaly is flagged, and the IndexPrice is computed as follows:
At 3:22 PM on January 9, 2024, market data was collected from five exchanges. The Chainlink and Uniswap index prices were 46,725.12 and 46,334.29, respectively. The Dederi index price algorithm works as follows:
IndexTWAP is computed off-chain by sampling the underlying index price at 5-second intervals and calculating the arithmetic mean of the samples over the most recent 10-minute window.
Validate the computed IndexTWAP by comparing it with the corresponding 10-minute TWAP from Chainlink and Uniswap. An exception is triggered if at least one price discrepancy ratios exceed the MaxIndexDiscrepancy:
SettleTWAP is computed off-chain by sampling the underlying index price at 5-second intervals and calculating the arithmetic mean of the samples over the 30-minute window prior to contract expiration.
Validate the computed IndexTWAP by comparing it with the corresponding 30-minute TWAP from Chainlink and Uniswap. An exception is triggered if at least one price discrepancy ratios exceed the MaxIndexDiscrepancy: