TWAP Oracle

Algorithm

A TWAP Oracle functions as a decentralized mechanism for determining an asset’s average price over a specified time period, mitigating manipulation inherent in point-in-time price feeds. Its core operation involves querying price data at regular intervals, calculating a time-weighted average, and reporting this value as a single, representative price. This approach is particularly valuable in decentralized finance (DeFi) where reliable and tamper-proof price discovery is paramount for liquidations, collateralization ratios, and stablecoin pegs. The resulting price feed provides a smoothed value, reducing the impact of short-term volatility and front-running attempts.