Oracle Integration
Smart contracts need external data. Oracle manipulation vector.
Attacks
Flash loan: manipulate spot price in one transaction.
TWAP
Uniswap v3 TWAP 30 min: harder to manipulate but slow.
Chainlink
Decentralized aggregate. Problem: staleness check missing.
Pyth
Pull model: app pulls price in transaction. 400ms latency.
Choice
Chainlink: lending protocols. Pyth: perpetuals/options. TWAP: fallback.
Timelines
Chainlink: 2–4 weeks. Multi-oracle: 6–10 weeks.







