Files
nexus/wiki/entities/Chainlink.md
2026-04-21 00:02:55 +08:00

36 lines
1006 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Chainlink"
type: entity
tags: [oracle, defi, infrastructure]
sources: [blockchain-security-auditor]
last_updated: 2026-04-20
---
## 定义
Chainlink 是去中心化预言机网络Oracle Network为智能合约提供外部数据源是防止 Oracle Manipulation 攻击的关键基础设施。
## 核心产品
- **Price Feeds**资产价格数据TWAP
- **VRF**:可验证随机函数
- **CCIP**:跨链互操作协议
## 在安全审计中的意义
```solidity
// 安全使用 Chainlink Oracle
AggregatorV3Interface priceFeed;
(, int256 price, , uint256 updatedAt, ) = priceFeed.latestRoundData();
require(price > 0, "Invalid price");
require(updatedAt > block.timestamp - MAX_STALENESS, "Stale price");
```
## Oracle Manipulation 防护
- 时间加权平均价格TWAP
- 多数据源聚合
- 冗余预言机节点
- 偏差阈值检查
## Connections
- [[Oracle Manipulation]] ← prevents ← [[Chainlink]]
- [[DeFi Infrastructure]] ← provides ← [[Chainlink]]