The industry-standard oracle network
Chainlink provides secure oracle services for DeFi. Get price feeds, VRF, and external adapters.
Get real-time asset prices for DeFi. Used by Aave, Compound, and major protocols.
Verifiable Random Function. Generate provably fair random numbers for NFTs and gaming.
Automate smart contract functions. Trigger liquidations, rebalancing, and more.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract PriceConsumerV3 {
AggregatorV3Interface internal priceFeed;
constructor() {
priceFeed = AggregatorV3Interface(0x...); // ETH/USD address
}
function getLatestPrice() public view returns (int) {
(,int price,,,) = priceFeed.latestRoundData();
return price;
}
}Use price feeds for collateral valuation and liquidations.
VRF for random NFT traits and game rewards.
Trigger policy payouts based on real-world events.