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.
Key Facts
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
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.
DAO Fork Era
The controversial fork to recover funds from The DAO hack.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Serpent)
# Verified by EthereumHistory (ethereumhistory.com)
def split(addr1:address, addr2:address):
if balance(0xbf4ed7b27f1d666546e30d74d50d173d20bca754) > 1000000000000000000000000:
call(0, addr1, balance(self), 0, 0, 0, 0)
else:
call(0, addr2, balance(self), 0, 0, 0, 0)External Links
Related contracts
SerpentGamble
Same deployerProvably-fair betting game where players choose their own odds. The owner settles bets with a commit-reveal random seed. Includes a 2-day emergency refund.
0x034df8...200e2fSeptember 20, 2015SerpentGamble
Same deployerSibling of 0x034dF870 (SerpentGamble). Provably-fair Serpent betting game; players choose their own odds, owner settles via commit-reveal seed, 2-day refund.
0x9ca7e9...fa8bb4September 21, 2015SerpentGamble
Same deployerSibling of 0x034dF870 (SerpentGamble). Provably-fair Serpent betting game; players choose their own odds, owner settles via commit-reveal seed, 2-day refund.
0x75649a...176028September 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xe1a99f...0d2457September 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xdc00a9...15861fSeptember 21, 2015SerpentGamble
Same deployerIntermediate build of serpent_gamble, a provably-fair betting dapp (Bet/Win/Loss/NewSeed), related to verified sibling 0x59375871. Source not yet reconstructed.
0xd0ed09...300b48September 21, 2015