Skip to content
Technical Concepts

TWAP

Time-Weighted Average Price

Average asset price calculated over time to resist manipulation

Definition

TWAP is the average price of an asset calculated over a specific time period, weighted by time. It's used by oracles and protocols to provide more stable, manipulation-resistant price feeds.

TWAP (Time-Weighted Average Price) is a technical term used to understand Average asset price calculated over time to resist manipulation. In practice, it matters because it affects how users evaluate protocols, compare opportunities, and avoid hidden assumptions.

Example

Uniswap V2 provides TWAP oracles that average prices over the last hour to prevent flash loan price manipulation attacks.

1

How it works

In practice, the concept shows up like this: Uniswap V2 provides TWAP oracles that average prices over the last hour to prevent flash loan price manipulation attacks.

2

Why it matters

TWAP matters because small misunderstandings in DeFi can turn into bad pricing, liquidation, governance, custody, or smart-contract risk. A good mental model helps you compare protocols without relying on marketing language.

3

What to check

Treat it as infrastructure: understand what it automates, what trust assumptions remain, and how failures propagate. The main checks are: Lagging prices; Still manipulable over time; Complexity.

Risks to Consider

  • Lagging prices
  • Still manipulable over time
  • Complexity

Common Questions

What does TWAP mean in DeFi?

TWAP means Average asset price calculated over time to resist manipulation. The useful question is not only the definition, but how the mechanism changes risk, return, liquidity, or governance for the user.

How is TWAP used in practice?

A practical example: Uniswap V2 provides TWAP oracles that average prices over the last hour to prevent flash loan price manipulation attacks.

What should I check before relying on TWAP?

Check lagging prices, still manipulable over time, complexity. Also verify liquidity, oracle assumptions, admin controls, and whether the protocol has been tested during stressed markets.