chainlink-oracle-guide

Explain Chainlink oracle price feeds and validate `latestRoundData()` responses.

5|Updated May 2, 2026
One-click install
npx skills add https://github.com/nirholas/three-ui --skill chainlink-oracle-guide-nirholas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chainlink-oracle-guide
Source: https://github.com/nirholas/three-ui/tree/main/data/skills/protocol/chainlink-oracle-guide
Command: npx skills add https://github.com/nirholas/three-ui --skill chainlink-oracle-guide-nirholas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you understand how Chainlink oracle price feeds turn off-chain market data into on-chain reliable prices, and how to use them safely in DeFi.

Core Features & Use Cases

  • Oracle architecture: Explains the aggregator model, data sources, median calculation, and update triggers (deviation threshold and heartbeat).
  • How to read feeds: Shows how to query latestRoundData() and apply decimals() to convert the scaled integer answer into a real-world price.
  • Oracle security & pitfalls: Covers stale price risks, oracle manipulation concerns, and contract-side safety checks like validating updatedAt and positive prices.
  • DeFi context: Connects oracle pricing to lending, stablecoin pegs, liquidation thresholds, and fair swaps.

Quick Start

Ask the agent to explain how Chainlink oracle feeds work and how to read an ETH/USD feed on an EVM chain, including the key safety checks to prevent stale-price usage.

Frequently Asked Questions about chainlink-oracle-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do Chainlink oracle price feeds convert off-chain data into on-chain values?

Chainlink oracle price feeds aggregate off-chain market data from multiple sources into a median on-chain value, updating via deviation thresholds or heartbeats to supply reliable pricing for smart contracts.

How do I read an ETH/USD price feed using latestRoundData and apply decimals?

Query `latestRoundData()` to fetch the scaled integer price answer, then call `decimals()` to divide the raw value and calculate the real-world ETH/USD price for your smart contract.

What safety checks prevent stale or invalid oracle prices in DeFi smart contracts?

Validate the `updatedAt` timestamp to ensure freshness and check that the returned price is positive to prevent stale or invalid oracle answers from executing incorrect DeFi transactions.

How does the Chainlink aggregator model use median calculations and rounds?

The Chainlink aggregator model collects data from multiple oracle nodes, calculates the median value to resist outliers, and organizes these updates into sequential rounds for on-chain reference.

Can I use Chainlink price feeds for DeFi lending, stablecoin pegs, and trading risk controls?

Chainlink price feeds provide the necessary on-chain valuation data for calculating liquidation thresholds in DeFi lending, maintaining stablecoin pegs, and enforcing fair trading risk controls.

Why do smart contracts need oracle validation against stale or manipulated pricing data?

Smart contracts require oracle validation against stale pricing data because outdated or manipulated `updatedAt` timestamps can trigger false liquidations or unfair swaps in DeFi protocols.