Difference between revisions of "Time Weighted Average Price (TWAP)"

From CryptoWiki

Tag: Reverted
m (Grand Master Pepe moved page TWAP to Time Weighted Average Price (TWAP))
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
CUPCAKKES VAGINA IS BETTER THAN THIS CRYPTO AND NFT SHIT
== Basics ==
 
* Abbreviation for Time-Weighted-Average-Price [[Oracle|oracles]].
* Used mainly in [[Uniswap (UNI)|Uniswap]].
* A comparison between TWAP and Chainlink oracles can be read [https://smartcontentpublication.medium.com/twap-oracles-vs-chainlink-price-feeds-a-comparative-analysis-8155a3483cbd here] (8-5-2021).
*[https://banklessdao.substack.com/p/the-oracle-edition-defi-download From] [[Bankless DAO (BANK)|Bankless]] (20-1-2023):
''"TWAP is a pricing algorithm used to calculate the average price of an asset over a specific period of time. Typically, these prices are created using [[On Chain|on-chain]] data. Prices are collected over this period of time and averaged to create a final price result.''
 
''For example, suppose we want to determine the price of an asset using TWAP. If we choose 1 minute intervals over the course of 60 minutes. However, in order to construct such a pricing mechanism, we need to use a price feed to get samples. Such a TWAP oracle feed can be constructed using prices provided by Uniswap’s constant product pricing function, offering a cumulative price that can be used to calculate a TWAP of any time interval. TWAP is simple to calculate, but there are fundamental tradeoffs between price accuracy and security. Because TWAP oracles use price history to calculate the current price, the accuracy of the price decreases during periods of high volatility.''
 
# ''Long periods: Hard to manipulate; Inaccurate during high volatility. TWAP is a lagging indicator of price because it takes previous prices to calculate the current price.''
# ''Short periods: Accurate during high volatility; but easy to manipulate.''
 
''However, this oracle would only represent prices and [[liquidity]] on Uniswap."''
[[Category:Jargon/Various]]

Latest revision as of 04:55, 9 February 2023

Basics

  • Abbreviation for Time-Weighted-Average-Price oracles.
  • Used mainly in Uniswap.
  • A comparison between TWAP and Chainlink oracles can be read here (8-5-2021).
  • From Bankless (20-1-2023):

"TWAP is a pricing algorithm used to calculate the average price of an asset over a specific period of time. Typically, these prices are created using on-chain data. Prices are collected over this period of time and averaged to create a final price result.

For example, suppose we want to determine the price of an asset using TWAP. If we choose 1 minute intervals over the course of 60 minutes. However, in order to construct such a pricing mechanism, we need to use a price feed to get samples. Such a TWAP oracle feed can be constructed using prices provided by Uniswap’s constant product pricing function, offering a cumulative price that can be used to calculate a TWAP of any time interval. TWAP is simple to calculate, but there are fundamental tradeoffs between price accuracy and security. Because TWAP oracles use price history to calculate the current price, the accuracy of the price decreases during periods of high volatility.

  1. Long periods: Hard to manipulate; Inaccurate during high volatility. TWAP is a lagging indicator of price because it takes previous prices to calculate the current price.
  2. Short periods: Accurate during high volatility; but easy to manipulate.

However, this oracle would only represent prices and liquidity on Uniswap."