Sep 2015 timelocked ETH bank whose locks can be turned into a crowd-funded burn: if supporters match the locked balance, the funds are annihilated.
Key Facts
Description
A three-contract system deployed 2015-09-13. Bank holds ETH per address and transfer() pays out through a TimeLock that the recipient can release after a 60-second delay, or the sender can cancel. The lock's owner can call requestAnnihilation(deadline), which moves the locked ETH into a Support campaign whose recipient is address 0: if supporters contribute as much as the locked balance before the deadline, every supporter is refunded and the locked ETH is burned; otherwise release() returns it to the owner. Source reconstructed from bytecode with exact runtime and creation match (soljson v0.1.1, optimizer off); requestAnnihilation was recovered by selector brute force.
Source Verified
Exact runtime match, soljson v0.1.1+commit.6ff4cd6, optimizer off, fresh compiler process. Source BankPublic.sol in the proof folder.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract Support {
struct Supporter {
address addr;
uint amount;
}
address public fallback;
address public recipient;
uint public supportNeeded;
uint public deadline;
Supporter[] public supporters;
uint public supportTotal;
event Supported(address supporter, uint amount);
function Support(address _fallback, address _recipient, uint _supportNeeded, uint _deadline) {
fallback = _fallback;
recipient = _recipient;
supportNeeded = _supportNeeded;
deadline = _deadline;
}
function release() {
if (now >= deadline) {
refund();
suicide(fallback);
}
}
function support() {
if (msg.value > 0) {
supporters[supporters.length++] = Supporter(msg.sender, msg.value);
supportTotal += msg.value;
Supported(msg.sender, msg.value);
if (supportTotal >= supportNeeded) {
refund();
suicide(recipient);
}
}
}
function refund() internal {
for (uint i = 0; i < supporters.length; i++) {
Supporter s = supporters[i];
s.addr.send(s.amount);
}
}
}
contract TimeLock {
address public owner;
address public recipient;
uint public releaseTime;
function TimeLock(address _owner, address _recipient, uint _releaseTime) {
owner = _owner;
recipient = _recipient;
releaseTime = _releaseTime;
}
function release() {
if (now >= releaseTime) {
suicide(recipient);
}
}
function cancel() {
if (msg.sender == owner) {
suicide(owner);
}
}
function requestAnnihilation(uint deadline) returns (address) {
if (msg.sender == owner) {
address r = 0;
address s = new Support(owner, r, this.balance, deadline);
suicide(s);
return s;
}
}
}
contract Bank {
uint public delay;
mapping (address => uint) public balances;
function Bank(uint _delay) {
delay = _delay;
}
function store(address addr) {
balances[addr] += msg.value;
}
function transfer(address to, uint amount) returns (address) {
address from = msg.sender;
if (balances[from] < amount) return 0;
address t = new TimeLock(from, to, now + delay);
balances[from] -= amount;
return t;
}
}External Links
Related contracts
Bank
Same deployerSep 2015 timelocked ETH bank whose locks can be turned into a crowd-funded burn: if supporters match the locked balance, the funds are annihilated.
0x40c350...044f77September 13, 2015token
Same eraAn early ERC-20-like token deployed in Ethereum's first week, built directly from the example in the official Ethereum Frontier Guide documentation.
0x8374f5...46609aAugust 7, 2015token
Same eraA second deployment of the FirstCoin tutorial token by the same creator, 11 blocks after the original — both derived from the official Ethereum Frontier Guide e
0x3b4446...295f52August 7, 2015Contract 0xd958b5...ec4c9f
Same eraEthereum.org tutorial Coin contract deployed on Frontier day 1. Contains a bug: balance(address) ignores its argument and returns msg.sender balance.
0xd958b5...ec4c9fAugust 7, 2015token
Same eraEarly tutorial-derived coin contract compiled with Solidity v0.1.1, deployed 9 days after Ethereum Frontier launch.
0x3c401b...da1634August 8, 2015token
Same eraTutorial-derived coin contract (Solidity v0.1.1), one of multiple token instances deployed by the same address on Aug 8, 2015.
0x33e986...395d13August 8, 2015