Skip to main content

What Are the Trade-Offs between Using a TWAP and a Volume-Weighted Average Price (VWAP) Oracle?

A TWAP is simpler to implement and highly resistant to flash loan manipulation, but it can be slow to reflect sudden, legitimate market shifts. A VWAP oracle factors in the volume of each trade, giving more weight to larger transactions.

VWAP is generally considered a better representation of the true cost of execution but is more complex to implement and potentially more vulnerable to volume-based manipulation.

What Is a Volume-Weighted Average Price (VWAP) and How Does It Differ from TWAP?
How Can ‘Volume-Weighted Average Price’ (VWAP) Be Skewed by Wash Trading?
How Is ‘Volume-Weighted Average Price’ (VWAP) Used as a Benchmark for Trade Execution?
What Are the Trade-Offs between Using a Median Price versus an Average Price?