TWAP Oracle

Manipulation-resistant HIVE - USDC price oracles using TWAPs.

HIVE - USDC Time-Weighted Average Prices are calculated by the Hive Oracle.

DegenHive core SUI - USDC and SUI - HIVE Automated Market Maker (AMM) pools are used by the HiveOracle to determine the latest HIVE <> USDC exchange rate for facilitating subscription payments across profiles.

SUI <> USDC and SUI <> HIVE exchange rates are calculated from their respective AMM pools as follows :

TWAP=latest_cumulative_priceold_cumulative_pricelatest_timestampold_timestampTWAP = \frac{ latest\_cumulative\_price - old\_cumulative\_price} {latest\_timestamp - old\_timestamp}

HIVE - USDC TWAP exchange rate can be calculated from the SUI - USDC and SUI - HIVE twap as following

HIVEUSDCTWAP=hive_sui_twapsui_usdc_twapprecision_constantHIVE \xleftrightarrow{} USDC\,\,\,TWAP = \frac{hive\_sui\_twap * sui\_usdc\_twap}{precision\_constant}

Last updated