Time-Weighted Average Oracles

Calculation

Time-Weighted Average Oracles (TWAPs) represent a methodology for determining an asset’s average price over a specified period, mitigating the impact of short-term price fluctuations and potential market manipulation. These oracles are crucial in decentralized finance (DeFi) for fair price discovery, particularly within automated market makers (AMMs) and lending protocols, ensuring accurate valuations for collateral and liquidations. The calculation involves sampling the price at regular intervals and averaging those values, weighted by the duration of each interval, providing a more representative price than a single point-in-time observation. Consequently, TWAPs are frequently employed in options pricing and derivatives valuation to establish strike prices and settlement values.