Skip to main content

What Is the Trade-off between Using a TWAP and a Real-Time Price (RTP) Feed?

The trade-off is between stability and freshness. A TWAP offers high stability and manipulation resistance by smoothing out volatility, but the price is inherently lagged and not "real-time." An RTP feed offers maximum price freshness and accuracy at the moment of the trade, but it is highly vulnerable to momentary price spikes and flash loan attacks.

The choice depends on the application's priority: security (TWAP) or speed (RTP).

How Do “Heartbeat” Mechanisms Ensure the Freshness of an Oracle’s Price Data?
What Is a “Time-Weighted Average Price” (TWAP) Oracle and Its Anti-Front-Running Benefit?
What Is the Main Drawback of Using a Simple Spot Price for a Price Feed?
What Is the Trade-off between Using a TWAP and a Spot Price Oracle?