TWAP settlement, and why the last trade is not used
A time-weighted average price is the mean of a price over a window of time. Markets that have to produce exactly one number at exactly one instant tend to settle on one, because the alternative is settling on whatever the last print happened to be, and a single print is the cheapest thing in any market to move.
- Live product data
- Self-custodial
- Human confirmed
What the average is, exactly
Take a price sampled at equal intervals over a window: one hundred, one hundred and two, one hundred and one, ninety nine. The time-weighted average is their mean, one hundred point five. Weighting by time rather than by volume means a price that sits somewhere for a long stretch counts for more than one that is touched for a moment, regardless of how much traded at either. That property is the reason it is used as a reference: influence over the number requires holding the price, not printing it.
Why a settlement needs one
Any contract that pays out based on a price at a deadline has to name the number that decides it. Naming the last trade makes the outcome a function of a single order, which is a target. Naming an average over the seconds leading up to the deadline means that moving the outcome requires moving the market and holding it there, which costs real capital and is visible while it happens. Options expiries, index rebalances and short-window prediction markets all reach for the same solution.
The lookback is the parameter that matters
A TWAP is defined by its window, usually called the lookback: the stretch of time ending at the settlement instant over which the average is taken. On the up or down markets, a five minute window settles on a Chainlink TWAP stream with a thirty second lookback, and a fifteen minute window settles on the same kind of stream with a sixty second lookback. A shorter lookback tracks the current price more closely and is easier to influence. A longer one is smoother and harder to push, and lags further behind what the ticker is showing.
Why the spot price and the settling number disagree
They are supposed to. The spot ticker is the price right now; the TWAP is the average of the recent past. A sharp move in the final seconds enters the average only in proportion to how much of the window it occupies, so with a thirty second lookback a move that happens with five seconds to go carries roughly a sixth of the weight. In practice this means the price on the chart can sit dollars away from the number that settles the market, and reading the chart as though it were the settlement price is the single most common mistake on these instruments.
Two different things called TWAP
The name is used for a settlement reference and for an execution algorithm, and they are not the same tool.
- A settlement TWAP averages a published price feed to produce one reference number at one instant
- An execution TWAP slices a large order into equal pieces released over a period, so the fills average out
- The first decides what a contract pays; the second decides what your order costs
- Both average over time, and only one of them sends orders to a market
What to check before trading against one
Four things tell you almost everything. Which feed the average is taken from, and who publishes it. How long the lookback is. How often the underlying stream updates, since the average is only as granular as its samples. And what happens on an exact tie, because a rule that is undefined at the boundary is a rule that will eventually be argued about. On the up or down windows an exact tie resolves Up.
Frequently asked questions
- Is a TWAP the same as a VWAP?
- No. A TWAP weights by time, so every second counts equally. A VWAP weights by volume, so a second in which a lot traded counts for more. VWAP describes where the money traded; TWAP describes where the price sat.
- Why not just settle on the last trade?
- Because it is a single number that one order can set. On a contract with a binary payoff, that turns the settlement instant into an auction for the right to decide the outcome, and the cost of winning it can be far less than the payoff.
- Does a longer lookback make settlement fairer?
- Harder to influence and less current. A sixty second average is more expensive to push than a thirty second one, and it also reflects the market as it was up to a minute ago. Neither is right in general, which is why the window is matched to the length of the contract.
- Can I trade the gap between spot and the TWAP?
- The gap is real and observable, but it is not a free position: it closes as the window rolls forward, on its own schedule rather than yours. Treating it as information about what will settle is more useful than treating it as a trade.
Take the next step in Hypertradeworx
Move from reference to the live product when you are ready.
Perpetual futures are leveraged instruments and can lose more than your initial margin. Nothing on this page is investment advice.