Chainlink Price Feeds

Chainlink price feeds are the backbone of DeFi - over 1,000 protocols rely on them for accurate, tamper-proof price data. Each feed is powered by a Decentralized Oracle Network (DON) where independent node operators fetch prices from premium data providers, aggregate off-chain, and deliver the result on-chain.

Oracle Network Visualization

Watch oracle nodes fetch price data from sources, aggregate off-chain, and deliver the median price to the on-chain aggregator. Adjust the number of nodes and deviation threshold.

Current Price
$3,245.82
Node Responses
21 / 21
Last Update
2s ago
Update Trigger
Deviation

Price Update Timeline

Simulated price feed showing when on-chain updates occur based on deviation threshold and heartbeat timing.

How Price Aggregation Works

Off-Chain Aggregation (OCR)

With Off-Chain Reporting (OCR), nodes communicate peer-to-peer to reach consensus off-chain. Only one transaction is submitted with all node signatures, reducing gas costs by up to 90% compared to on-chain aggregation.

Gas savings: ~90% vs on-chain aggregation
Median Calculation

The aggregator computes the median of all valid node responses. The median is resistant to outliers - even if a few nodes report bad data, the final price remains accurate. This is why odd numbers of nodes are preferred.

Byzantine tolerance: Up to ?(n-1)/3? faulty nodes

* Update Triggers

Deviation

When the off-chain aggregated price deviates from the last on-chain value by more than the threshold (e.g., 0.5%), an update is triggered immediately. Critical for volatile markets.

Heartbeat

Even if the price is stable, a heartbeat update occurs at regular intervals (e.g., every 3600s). This guarantees freshness and lets consumers verify the feed is still active.

? Staleness Check

Smart contracts should always check the updatedAt timestamp. If the feed is stale (older than heartbeat + buffer), the protocol should pause or use a fallback oracle.