How Does a Time-Weighted Average Price (TWAP) Oracle Mitigate Price Manipulation for Derivatives?
A TWAP oracle calculates the average price of an asset over a specified time period, rather than taking a single, instantaneous price feed. This method mitigates "flash loan" and "front-running" attacks, where a malicious actor briefly manipulates the spot price to trigger an unfair liquidation or settlement.
By averaging the price over time, a large, short-lived price spike becomes less influential, ensuring a more robust and fair reference price for derivative contract execution.