Skip to main content

What Is the Role of Time-Weighted Average Price (TWAP) in DeFi Oracles?

Time-Weighted Average Price (TWAP) is a method used by DeFi oracles to calculate the average price of an asset over a specific time period, rather than using a single instantaneous price. This technique is employed to mitigate the risk of flash loan attacks and price manipulation.

By averaging the price over time, temporary, large-volume price spikes are smoothed out, making the oracle feed more resistant to manipulation.

What Is a Time-Weighted Average Price (TWAP) Oracle?
How Does a Flash Loan Attack Exploit a Simple Spot Price Oracle?
What Is the Difference between a Spot Price Oracle and a Volume-Weighted Average Price (VWAP) Oracle?
How Does a Time-Weighted Average Price (TWAP) Oracle Mitigate Flash Loan Attacks on a Derivatives Contract?