TWAP

TWAP (Time-Weighted Average Price) is time weighted average price between two points in time. The TWAP is calculated over a fixed period size of 15 minutes. A simple fixed period size TWAP is used as described by https://docs.uniswap.org/protocol/V2/concepts/core-concepts/oracles

TWAP=priceCumulative2priceCumulative1timestamp2timestamp1{TWAP} = \frac{priceCumulative_2 -priceCumulative_1}{timestamp_2 - timestamp_1}

TWAPs are used to reduce the risk of price manipulations (see: https://shouldiusespotpriceasmyoracle.com/)

Last updated