Auto-sync: 2026-04-21 00:02

This commit is contained in:
2026-04-21 00:02:55 +08:00
parent 177469a1cd
commit cb7c11e14f
235 changed files with 16567 additions and 237 deletions

View File

@@ -0,0 +1,35 @@
---
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]]