A 541-byte deposit ledger: deposit() records the caller's ether and a timestamp, and only the owner can read a balance back. No withdrawal function exists.
Historical Significance
A ledger without an exit. The contract carefully tracks who deposited how much and when, and then offers no way to pay any of it back, which makes it a clear artifact of the period when the accounting half of a contract was written and tested before the withdrawal half existed. The owner-gated getBalance returning zero instead of reverting is also characteristic: 2015 Solidity had no revert, so access control usually degraded into a silently wrong answer.
Context
Deployed 2015-09-05 by 0xee291517c6290faf94dee71647c27b9737b2a2d2. Three byte-identical copies of this runtime exist. It is one of two near-identical 541-byte variants in the archive that differ in a single character: this one uses numDeposits++ (post-increment, so the first deposit is recorded as id 0), while the sibling variant uses the other form. Source recovered by exact runtime bytecode match, verified on Sourcify and Etherscan.
Key Facts
Description
Storage is an owner address in slot 0, three public uints (lastDepositId, numDeposits, lastTs) in slots 1 to 3, and a mapping from address to balance in slot 4. deposit() at selector 0xd0e30db0 bumps the deposit counter, copies it to lastDepositId, stamps lastTs with the block timestamp, and credits msg.value to the caller's entry in the mapping. getBalance(address) at 0xf8b2cb4f returns an entry only when the caller is the owner recorded at construction; every other caller receives zero rather than a revert. There is no withdrawal function of any kind, so ether sent to deposit() is credited in the mapping and then permanently stranded.
Source Verified
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 Bank {
address owner;
uint public lastDepositId;
uint public numDeposits;
uint public lastTs;
mapping (address => uint) balances;
function Bank() {
owner = msg.sender;
}
function getBalance(address a) constant returns (uint) {
if (msg.sender != owner) {
return;
}
return balances[a];
}
function deposit() {
numDeposits++;
lastDepositId = numDeposits;
lastTs = now;
balances[msg.sender] += msg.value;
}
}External Links
Related contracts
Contract 0x578713...7d7060
Same deployerThe Solidity tutorial subcurrency, compiled without the optimiser
0x578713...7d7060September 3, 2015Coin
Same deployerThe Solidity tutorial subcurrency, with the balance reader restricted to the minter
0x4d0cd1...4e6577September 3, 2015Coin
Same deployerThe subcurrency example from the Solidity documentation with a payable deposit bolted on.
0x8d9bba...d771b5September 4, 2015Bank
Same deployerA 532-byte deposit ledger: deposit() records the caller's ether and a timestamp, and only the owner can read a balance back. No withdrawal function exists.
0x76000f...0bae2eSeptember 5, 2015Bank
Same deployerA 541-byte deposit ledger: deposit() records the caller's ether and a timestamp, and only the owner can read a balance back. No withdrawal function exists.
0x02d8b1...322115September 5, 2015Bank
Same deployerA 541-byte deposit ledger: deposit() records the caller's ether and a timestamp, and only the owner can read a balance back. No withdrawal function exists.
0x1f54b4...07a6d6September 5, 2015