TWAP (time-weighted average price)
TWAP
A price metric averaged over a time window — used by oracles to resist short-burst manipulation.
TWAP-based oracles weight recent ticks by time, meaning a single-block price spike contributes proportionally less than a sustained move. Window length is the key parameter: too short and manipulation is cheap; too long and oracle lag during fast moves causes liquidation gaps.
Related terms
- OracleA service that brings off-chain data on-chain — most commonly asset prices used for liquidations and CDP minting.
- Price feedAn oracle-published time-series of an asset price, queried on-chain by protocols to value collateral or compute liquidations.
- Oracle manipulationAn exploit class where an attacker moves the price an oracle reports, then triggers favourable liquidations / mints.