Back to Home

WithdrawDAO Balance Split

Part of The Vitalik Collection
0x74eeb52c0ad5...7956ad3a2918
DAO ForkExact Bytecode MatchEdit this contract
Deployed July 25, 2016 (9 years ago)Block 1,951,725

A Serpent forwarder that routes its entire balance to one of two addresses depending on whether the WithdrawDAO refund contract still holds over 1,000,000 ETH.

DAO Fork EraVerified Source
Key Facts
Deployer
Vitalik Buterin(0x1db343...fa6ee6)
Deployment Block
1,951,725
Deployment Date
Jul 25, 2016, 08:04 PM
Code Size
158.0 B
Transactions by Year
201612

Description

Deployed July 25, 2016 (block 1951725) by Vitalik Buterin (0x1db3439a22ee7c4d034e9b26437d3960b5af0517), five days after the DAO hard fork. Written in Serpent. Both the 158-byte runtime and the 176-byte creation bytecode reproduce byte-for-byte from the reconstructed source using ethereum/serpent at commit 9dc8c1c (commits 9cec73c and 0a7a488 also match).

How it works: split(addr1, addr2) reads the ETH balance of the WithdrawDAO refund contract (0xbf4ed7b27f1d666546e30d74d50d173d20bca754). If that balance is greater than 1,000,000 ETH (1e24 wei), the contract forwards its entire balance to addr1; otherwise it forwards to addr2. Both branches send balance(self), the contract's full balance, via a raw call with a zero gas stipend.

The 1,000,000-ETH threshold works as a switch on how far the DAO refund had progressed: WithdrawDAO was funded with the recovered ETH and drained as token holders withdrew, so the branch taken depends on whether enough had already been withdrawn at call time.

This is the on-chain sibling of the verified Serpent forwarder 0x6e9ccd1496ef424cb1e75eb1422eaac4d0aee851. The two differ only in the evaluation order of the call arguments: this deployment writes call(0, addr, balance(self), ...) where the sibling writes call(0, balance(self), addr, ...), which swaps two adjacent PUSH sequences inside the emitted CALL.

Source Verified

SerpentExact bytecode match(158 bytes)
Compiler: 9dc8c1c

Runtime (158 bytes) and creation (176 bytes) both reproduce byte-for-byte from the reconstructed Serpent source using ethereum/serpent commit 9dc8c1c; commits 9cec73c and 0a7a488 also match. On-chain creation tx input equals the compiled creation exactly. runtime sha256 d0ac74044583f30adbe2c1ecfabe4741bdc48720991929928d12b51d40ba0d6f, creation sha256 f1ce5a141f0899fbfdb6362f99d663af1b09587078cf37a05677eca1be5b1933.

Bytecode Overview

Opcodes158
Unique Opcodes65
Jump Instructions7
Storage Operations2

External Links

Related contracts