🔮 Oracle Internals
Smart contracts are blind — they can't access external data like prices, weather, or API responses. Oracles bridge this gap by bringing off-chain data on-chain. In DeFi, price oracles are critical infrastructure: lending protocols use them for liquidations, DEXs for limit orders, and derivatives for settlement. A broken oracle means broken DeFi — over $1B has been lost to oracle manipulation attacks.
📡 Oracle Landscape
Chainlink
Decentralized oracle network. Nodes fetch from multiple APIs, aggregate via median. Most widely used — secures $75B+ TVL.
Pyth
Pull-based oracle from market makers. Sub-second updates, used by perp DEXs. First-party data from exchanges.
UMA / Optimistic
Optimistic oracle: data accepted unless disputed. Dispute triggers voting. Great for long-tail data.
Uniswap TWAP
On-chain price from DEX trades. Time-weighted average resists manipulation. But limited to traded pairs.
✦ Live
Price Feeds
How Chainlink and Pyth aggregate prices from multiple sources into reliable on-chain data
✦ Live
Oracle Manipulation
Flash loan attacks on spot price oracles, TWAP resistance, and real-world exploits