What Is a Time-Weighted Average Price (TWAP) Oracle and Its Benefit?
A TWAP oracle calculates the average price of an asset over a specific time interval, rather than using a single snapshot price. The primary benefit is that it makes the oracle less susceptible to manipulation through flash loan attacks or temporary price spikes on a single exchange.
By averaging over time, it provides a more robust and representative price feed for decentralized protocols.