TWAP & Oracles
Understand how Uniswap works as an on-chain price oracle, try to manipulate the TWAP with a whale wallet, and see why sustained manipulation is prohibitively expensive.
📈 Live Price Feed — Spot vs TWAP
Watch a simulated price feed. The spot price jumps around, but the TWAP (30-block average) smooths it out. Try clicking "Whale Pump" to see how each responds.
Spot Price
TWAP (30 blocks)
Chainlink (simulated)
Spot
$3,000
TWAP (30 blk)
$3,000
Chainlink
$3,000
TWAP Deviation
0.00%
💸 Manipulation Cost Calculator
How much would it cost to move the TWAP by a given percentage for a sustained period? The answer: a lot.
Capital Required
-
Slippage Cost
-
Arb Loss / Block
-
Total Cost
-
Key insight: To manipulate a TWAP, you must sustain the price deviation across many blocks. Each block, arbitrageurs will trade against you, costing you money. The TWAP window length is your protection — longer windows = more expensive to manipulate.