Skip to main content

What Is a Time-Weighted Average Price (TWAP) and Why Is It Safer than a Spot Price?

A TWAP is a price calculated by taking the average of an asset's price over a specified time interval, weighted by the time each price was valid. It is safer than a spot price because a flash loan manipulation only lasts for a single block or transaction.

The short-lived price spike is diluted when averaged over a longer period, making the resulting TWAP a much more stable and attack-resistant metric for protocols.

How Does the ‘N’ Value in PPLNS Affect the Pool’s Payout Stability?
What Is a Time-Weighted Average Price (TWAP) Oracle?
What Is ‘Time-Weighted Average Price’ (TWAP) and When Is It Preferred over VWAP?
How Does a Transaction Get Added to the Mempool?