What Is a Time-Weighted Average Price (TWAP) Oracle and Why Is It Used?
A TWAP oracle calculates the average price of an asset over a specific time interval, rather than relying on a single, instantaneous price feed. It is used to prevent rapid price manipulation attacks, such as those using flash loans, by smoothing out short-term volatility and preventing single-block price spikes from triggering unfair liquidations or settlements in derivatives contracts.