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.