Auto-sync: 2026-04-21 00:02
This commit is contained in:
36
wiki/concepts/Oracle-Manipulation.md
Normal file
36
wiki/concepts/Oracle-Manipulation.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "Oracle Manipulation"
|
||||
type: concept
|
||||
tags: [smart-contract, vulnerability, defi, security]
|
||||
sources: [blockchain-security-auditor]
|
||||
last_updated: 2026-04-20
|
||||
---
|
||||
|
||||
## Definition
|
||||
预言机操纵(Oracle Manipulation)是指攻击者通过操纵区块链上的价格数据源(预言机)来影响资产价格,从而在 DeFi 协议中获取不正当利益。
|
||||
|
||||
## Attack Vector
|
||||
1. 识别使用链上价格预言机的协议
|
||||
2. 通过 Flash Loan 借用大量资产
|
||||
3. 在单笔交易内操纵交易对储备量
|
||||
4. 协议使用被操纵的价格计算抵押品价值
|
||||
5. 攻击者借出超出正常限额的资产
|
||||
6. 归还 Flash Loan,利润落袋
|
||||
|
||||
## Vulnerable Patterns
|
||||
- **Spot Price Oracle**:使用 Uniswap V2 即时价格
|
||||
- **缺乏 TWAP 时间加权)
|
||||
- **缺乏价格更新验证**
|
||||
- **过长的价格 staleness 容忍**
|
||||
|
||||
## Mitigation
|
||||
- **TWAP(Time-Weighted Average Price)**:使用时间加权平均价格
|
||||
- **Chainlink Oracle**:使用去中心化预言机网络
|
||||
- **价格更新验证**:检查 timestamp、roundId
|
||||
- **价格波动限制**:设置最大允许偏差
|
||||
|
||||
## Connections
|
||||
- [[DeFi Attack Vector]] ← is_type_of ← [[Oracle Manipulation]]
|
||||
- [[Flash Loan Attack]] ← exploits ← [[Oracle Manipulation]]
|
||||
- [[Chainlink]] ← provides ← [[Oracle Manipulation]] Mitigation
|
||||
|
||||
Reference in New Issue
Block a user