How Does a Time-Weighted Average Price (TWAP) Oracle Enhance Security?

A TWAP oracle calculates the average price of an asset over a specific time interval, rather than relying on a single, instantaneous price quote. This averaging technique makes the oracle highly resistant to flash loan attacks or temporary price manipulations, as a manipulation attempt would need to be sustained and significant over the entire time window to materially affect the reported price, making the attack prohibitively expensive.

How Does a Time-Weighted Average Price (TWAP) Oracle Mitigate Flash Loan Attacks on a Derivatives Contract?
What Is a “Flash Loan” and How Is It Used in Conjunction with Oracle Manipulation?
What Is a Time-Weighted Average Price (TWAP) Oracle and Its Benefit?
What Is a Time-Weighted Average Price (TWAP) Oracle and Why Is It Used?
What Is the Role of Time-Weighted Average Price (TWAP) in Mitigating Oracle Attacks?
How Does Data Aggregation Help Prevent “Flash Loan” Attacks on DeFi Protocols?
How Does the Choice of a Time-Weighted Average Price (TWAP) Calculation Defend against This Attack?
What Is the Role of Time-Weighted Average Price (TWAP) in DeFi Oracles?

Glossar