Files
nexus/wiki/entities/The-DAO-2016.md
weishen 55d3745bb0 ingest: Blockchain Security Auditor + 4 entities + 2 concepts
- Source: blockchain-security-auditor.md (The Agency Specialized, smart contract security audit agent)
- Entities: The-DAO-2016, Euler-Finance, Nomad-Bridge, Curve-Finance
- Concepts: Reentrancy, Oracle-Manipulation
- Updated: index.md (消除了source missing标记), overview.md, log.md
2026-04-25 10:52:41 +08:00

2.0 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
The DAO (2016) entity
blockchain
defi
exploit
reentrancy
ethereum
blockchain-security-auditor
2026-04-25

Aliases

  • The DAO
  • Decentralized Autonomous Organization (the original)

基本信息

  • 时间2016 年 6 月 17 日
  • 平台Ethereum
  • 损失:约 360 万 ETH当时价值约 5,000 万美元)
  • 根本原因重入攻击Reentrancy
  • 历史地位以太坊历史上首次重大安全事件直接导致以太坊硬分叉ETH/ETC 分裂)

攻击原理

攻击者利用DAO合约的 withdraw() 函数,在向攻击者合约转账时触发 receive() 回调。由于状态更新(balances[msg.sender] = 0)在外部调用之后执行,攻击者合约可以在余额清零前回拨 withdraw() 重复提取资金:

// 漏洞代码(简化)
function withdraw() external {
    uint256 amount = balances[msg.sender];
    // BUG: 外部调用在状态更新之前
    (bool success,) = msg.sender.call{value: amount}("");
    require(success);
    balances[msg.sender] = 0; // 攻击者在此行执行前已再次调用 withdraw()
}

关键影响

  • 技术层面开创了智能合约安全研究领域Reentrancy 成为最经典的漏洞类型之一
  • 以太坊层面:引发 ETH/ETC 硬分叉Coinbase 等交易所拒绝支持 ETC 引发争议
  • 行业层面推动了安全审计行业Trail of Bits、OpenZeppelin的兴起Solidity 编译器加强了对重入的检查

关联漏洞类型

  • Reentrancy核心漏洞类型The DAO 是该漏洞类型的"教科书案例"
  • Checks-Effects-Interactions Pattern修复方案——先更新状态再执行外部调用

关联页面