← Academy library

Crypto / Evergreen

A time-weighted price smooths observations over an interval

A time-weighted average price combines price observations over a defined period, reducing reliance on one instantaneous pool state.

THE IDEA TO KEEP

Averaging changes the attack and timing problem; it does not remove the need to analyze the underlying market.

The distinction that matters

A time-weighted average price combines price observations over a defined period, reducing reliance on one instantaneous pool state. Blockchains cannot independently know every fact about the outside world. An oracle supplies information that a contract uses, such as a market price, event result, or state from another system. The oracle's design determines how observations are collected, combined, authenticated, and delivered.

How the mechanism works

The window changes the trade-off between resistance to brief manipulation and responsiveness to genuine market moves. Decentralizing transaction execution does not automatically decentralize the source of an external fact. Price data is especially sensitive to definition and timing. A last trade, a volume-weighted measure, a median across sources, and a time-weighted pool observation can all be called a price while describing different things. An oracle can deliver exactly what its specification promises while an application uses that value incorrectly for its own risk model.

A worked situation

Consider this hypothetical situation: A hypothetical attacker briefly moves a pool price for one block, while a consumer uses a much longer time-weighted observation. The short disturbance may have a smaller effect on the average, but sustained manipulation or shallow liquidity can still matter.

Where interpretation can fail

A long window can also lag a real rapid price change, creating a different risk for collateral valuation. Evaluate window length, pool liquidity, observation availability, and the cost of maintaining a distorted price over that interval. Averaging changes the attack and timing problem; it does not remove the need to analyze the underlying market.

The wider technical implication

The manipulation cost depends on how long the distorted price must persist and how much capital is needed to maintain it against arbitrage. A longer window can increase that cost while making the value slower to reflect real changes. The window also needs sufficient recorded observations; a newly created or infrequently updated pool may not support the desired history. An application should verify both the mathematical averaging method and the underlying observation availability. A time-weighted label alone does not establish that the chosen pool and window provide a robust reference for the value at risk.

A global perspective

Oracle data may involve market-data licenses, service agreements, and jurisdiction-specific definitions. A published feed is not automatically a legally authoritative valuation.

Sources & further reading

Ethereum.org — Oracles ↗Chainlink documentation — Data feeds ↗

Sources checked Oct 27, 2026. Educational examples. Historical observations are attributed to their sources. No affiliation with cited organizations.

Make the idea stick.

Mark complete when you are ready. Reaching the end alone does not mark a lesson complete.

What assumption in this guide would change the result in a different situation? Revisit the example and explain that change in your own words.

Explore crypto →

KEEP THE CONNECTION

Your next useful question.

Your saved guides →