Day 20 — Oracles and connecting blockchains to the real world
A smart contract on Ethereum knows everything that happens inside Ethereum. It knows every balance. It knows every transaction. It can read any state on the chain.
What it cannot do is look outside.
A smart contract has no way to know the current price of ETH in dollars. It can't read the weather. It can't check who won last night's soccer game. It can't ask if the President made a statement today. The blockchain is hermetically sealed from the rest of reality.
This is a problem, because almost every interesting use case of smart contracts requires real-world data. A lending protocol needs to know the price of ETH to compute whether to liquidate a position. A derivatives platform needs to know spot prices to settle contracts. A weather-insurance smart contract needs to know if a hurricane actually hit. A prediction market needs to know who won the election.
The infrastructure that solves this problem is called an oracle. Oracles are the connective tissue between the on-chain world and the off-chain world. They are also one of the most under-appreciated parts of the DeFi stack.
The oracle problem
The naive solution to "we need real-world prices on chain" is to have a single trusted party post prices. The problem with that is obvious: now the entire DeFi ecosystem depends on a single party not lying or getting hacked. That's not a decentralization story. That's a "we built a beautiful trustless system and then bolted a single point of failure onto it" story.
The serious oracle networks solve this differently. They use multiple independent data providers who each report a price, then aggregate the reports with anti-manipulation logic to produce a single on-chain price feed.
Chainlink is the dominant oracle network. Their typical setup for a major price feed: 16-31 independent node operators each pull prices from multiple exchanges and trading venues, the data is aggregated, outliers are discarded, and the median is posted on chain at a regular cadence or when the price moves more than a threshold (often 0.5% or 1%).
The result is a price feed that's resilient to any single data source going wrong, any single node operator getting compromised, and most attempts at price manipulation on a single exchange.
This works well enough that the vast majority of DeFi runs on Chainlink price feeds. Aave uses Chainlink. Compound uses Chainlink. Most lending protocols use Chainlink. When you read about an "oracle" in DeFi without further specification, Chainlink is usually what's meant.
Why oracle failures are catastrophic
A bad price feed in a lending protocol can trigger mass liquidations at wrong prices. A bad price feed in a derivatives platform can cause every position to settle at the wrong number. A bad price feed in a stablecoin's collateral system can cause the peg to break.
The classic failure mode goes like this. An attacker spots that a lending protocol uses a single thinly-traded DEX as its price source. The attacker uses a flash loan to drain liquidity from that DEX, manipulating the price by tens of percent for the duration of a single transaction. They then borrow against the manipulated collateral price and walk away with the proceeds before anything can be done about it.
This pattern has played out dozens of times. Compound had a near-miss in 2020 when DAI briefly traded over $1.30 on Coinbase Pro, the protocol's oracle source at the time, causing $80M+ of unnecessary liquidations. The protocol pivoted to Chainlink afterward.
The lesson is consistent: a protocol's security is bounded by the security of its weakest oracle. A lending protocol built on Chainlink can be more secure than a protocol built on a single DEX spot price, but no protocol can be more secure than its oracle layer.
Beyond price feeds
Most discussion of oracles centers on price feeds because they are the highest-volume use case. But oracles increasingly serve much broader functions.
Sports outcomes for prediction markets like Polymarket. Weather data for parametric insurance products (hurricane-trigger insurance, drought-trigger crop insurance). Identity attestations for KYC-light DeFi products. Cross-chain state for bridges (some bridges effectively use oracles to know what happened on the other side). Real-world asset valuations for tokenized RWA products (this is the use case IMPCT cares about most).
The category of "verifiable real-world data on chain" is much larger than just prices, and the next generation of DeFi (and the broader on-chain economy) depends on it growing.
A few oracle networks worth knowing beyond Chainlink:
Pyth Network is a newer competitor focused specifically on high-frequency price feeds for derivatives. Their model is to have major financial firms (market makers, exchanges, trading firms) push their actual trading prices directly to the network. Different security model from Chainlink, different tradeoffs, growing fast on Solana and the EVM L2s.
Redstone is another newer entrant focused on modular oracle design — applications can choose what data sources to use and how to verify them.
API3 is an oracle network where data providers run their own nodes (rather than going through a Chainlink-style intermediary), reducing the trust assumptions further.
The competition is real and improving the category. Most major DeFi protocols are now multi-oracle: they use Chainlink as the primary, Pyth as the secondary, and have automatic switching if one diverges from the other.
Why this matters for IMPCT
Look ahead to Week 4 (where we go into tokenized real-world assets). The whole thesis of bringing transparency to impact investing depends on being able to bring real-world data on-chain in a verifiable, tamper-resistant way. The capital flows, the project performance, the impact KPIs, the attestation that a particular acre of land actually got reforested — all of this is oracle infrastructure.
Without oracles, smart contracts are sealed off from the world they're supposed to represent. With good oracles, smart contracts can encode any verifiable claim about reality. Most of what IMPCT will eventually build on the platform side runs through this layer.
Tomorrow we close Week 3 with the recap structure you've seen before. A real news scenario, decoded sentence by sentence, applying everything from Days 15-20.
Glossary
| Term | Definition |
|---|---|
| Oracle | Infrastructure that brings off-chain data on-chain so smart contracts can use it. |
| Price feed | An oracle that provides current asset prices, the most common type of oracle data. |
| Chainlink | The dominant oracle network. Most major DeFi protocols use Chainlink price feeds. |
| Pyth Network | A newer oracle network using direct data push from major financial firms, focused on high-frequency price feeds. |
| Node operator | A participant in an oracle network responsible for fetching, aggregating, and posting data on-chain. |
| Median aggregation | The standard technique for combining multiple data reports into a single value, resilient to outliers. |
| Oracle manipulation | An attack where someone manipulates the data source an oracle pulls from, causing the on-chain price to be wrong. |
| Off-chain | Data, events, or computation that happens outside the blockchain. |
| On-chain | Data, events, or computation that happens on the blockchain. |
| Parametric insurance | Insurance that pays out automatically when a predefined parameter is met (e.g., wind speed exceeds X), enabled by oracles bringing reality on-chain. |
Reality check
A new DeFi lending protocol launches and advertises high yields. Walk through how you would evaluate its oracle layer.
The strongest sequence: (1) what oracle does it use (Chainlink, Pyth, custom, single DEX)? (2) if custom or single-source, treat as significantly higher risk, (3) does the protocol have any liquidation pause or circuit breaker if the oracle goes wrong? (4) what is the historical track record of the oracle source for the assets the protocol supports? (5) is the protocol multi-oracle, or single-source-of-truth? If you can answer all of these, you have a working evaluation framework that catches most of the oracle-related disasters in DeFi history.
Read deeper
1. What is Chainlink? A beginner's guide to LINK by The Block
The standard primer on the dominant oracle network.
Read on IMPCT (curated commentary) | Read original (theblock.co)
Deven's take. Read this for the architectural picture. Chainlink has been operating since 2017 and has settled trillions of dollars in DeFi value over its history without a major oracle failure. The track record is the moat. The network of node operators, data sources, and integrations is hard to replicate quickly. New oracle networks have to either offer something Chainlink doesn't (Pyth's high-frequency feeds, for example) or just compete on the same axis at lower cost.
2. Chainlink documentation: Data Feeds (docs.chain.link)
The technical detail on how a price feed actually works.
Read on IMPCT (curated commentary) | Read original (docs.chain.link)
Deven's take. Optional read, technical. Skim the Data Feeds section if you want to understand exactly what's happening when a smart contract calls getLatestPrice(). The on-chain query, the aggregator contract, the node-operator threshold, the deviation triggers. Useful when you're evaluating whether a particular protocol is using oracles well.
3. Pyth Network (pyth.network)
The new approach to oracles.
Read on IMPCT (curated commentary)
Deven's take. Pyth's model is different from Chainlink's: instead of having node operators fetch data from exchanges, Pyth has the data providers themselves (Jane Street, Jump, OKX, Wintermute, and similar major market participants) push their prices directly to the network. The argument is that the data source is now first-party rather than scraped, which should be more accurate for fast-moving derivatives. The competition between Pyth and Chainlink is one of the more interesting infrastructure stories in DeFi right now.
4. Oracle Hack Roundup (multiple sources, rekt.news)
The case studies.
Deven's take. Spend 30 minutes reading three or four oracle-related DeFi exploits on rekt.news. Mango Markets ($110M, Solana, 2022, oracle manipulation). Cream Finance ($130M, 2021, flash-loan price manipulation). Synthetix ($1B+ exposure, 2019, sUSD/sBTC mispricing). The patterns repeat. The fix in every case is multi-oracle redundancy, better aggregation, and circuit breakers. Most protocols have learned the lesson. New protocols sometimes haven't.
5. RedStone and API3 (the other major oracle players)
Different architectures, different tradeoffs.
Deven's take. Skim. RedStone offers on-demand oracle data pushed at the moment of query (saving gas vs. continuous on-chain price updates). API3 has data providers run their own nodes, reducing the trust layer. Neither is as dominant as Chainlink or growing as fast as Pyth, but both are legitimate alternatives in specific contexts. Worth knowing they exist.
Tomorrow
Week 3 recap. Real news scenario decoded, applying everything from Days 15-20. By the end of tomorrow you'll have completed three full weeks of foundational crypto literacy. Week 4 opens with the investor's lens — tokenomics, market cycles, risk, and the path through to the IMPCT bridge.
See you in the morning.
Preview reader
You are reading a private preview of IMPCT Institute. If something landed, didn't land, or felt confusing on this lesson, tell us. Short notes are useful. Long notes are useful. No notes are also fine.