In-depth essays · #28 / 50 · Wallets, Oracles, Security & Payments
Oracles—The Eyes and Ears of Smart Contracts: How Chainlink Brings Off-Chain Truth On-Chain
Why blockchains cannot fetch web APIs directly and how decentralized price feeds prevent flash-loan manipulation
A smart contract executes code with deterministic precision, yet by itself it cannot see the outside world—it does not know the USD/KRW exchange rate, the price of gold, or even the market price of ETH on exchanges. Oracles like Chainlink (LINK) bridge that gap safely.
1. The Oracle Problem: Why Nodes Cannot Simply Call an HTTP API
Every validator node verifying a block must reach the exact same state root. If a smart contract fetched an external web API directly, slight differences in network latency or response values across nodes would break consensus immediately—and a single compromised server could corrupt billions in DeFi contracts.
2. Why Reading a Single DEX Spot Pool Invites Flash-Loan Attacks
Using a single on-chain AMM pool as a price oracle is equally dangerous: an attacker can take a massive flash loan, skew the pool’s ratio for a single block, borrow against the artificially inflated collateral price in a lending protocol, and walk away with the vault’s funds.
3. How Decentralized Oracle Networks Aggregate Volume-Weighted Prices
Chainlink solves this by aggregating volume-weighted market data across dozens of exchanges, having independent node operators sign observations off-chain, and publishing a tamper-resistant median price feed on-chain across Ethereum and its L2 districts.
4. Beyond Price Feeds: Proof of Reserve (PoR) and Cross-Chain Interoperability
Today, oracle networks also verify off-chain backing for RWA tokens and stablecoins via automated Proof of Reserve feeds and route cross-chain messages across districts.
Related districts in the city
Related glossary terms
This essay is an explainer written to help you read the city; it is not investment advice. Facts on this page are as of 2026-10 and may change. If you spot a mistake, please tell us through the contact page.