A 2015 time-lock vault: deposit ETH to lock it ~20 years, withdraw after it expires.
Historical Significance
Early example of a self-custody time-lock vault on Ethereum, known in community lore for its long lock period and sizeable balance.
Context
In December 2015, Ethereum was five months old and Solidity was at version 0.1.x. Formal auditing practices, security tooling, and established patterns for time-locked contracts did not yet exist. Developers were experimenting directly with on-chain logic without the benefit of later community knowledge around common pitfalls. The concept of a personal time-lock savings vault was a natural early experiment, and several variations appeared in this period. The absence of testnets in common use and the experimental culture of the time meant that contracts with subtle logical errors were regularly deployed to mainnet with real ETH.
Key Facts
Description
Send ETH to lock it for a fixed duration (~20 years); send a 0-value transaction (or call withdraw()) to take it back once the lock expires. One active lock per address. Source reconstructed from the 433-byte on-chain runtime: compiling with solc v0.1.7 (optimizer ON) yields exactly 433 bytes with the same physical function-body layout and 12 of 14 internal blocks byte-identical, including the full withdraw guard (balance>0 && unlockTime>0 && now>unlockTime). The residual is a ~3-opcode optimizer stack-scheduling artifact of the exact original build.
Source Verified
Source reconstructed from on-chain runtime. solc v0.1.7 (optimizer ON) -> 433/433 bytes, exact body order, 12/14 bodies byte-identical; residual ~3 opcodes of optimizer stack-scheduling.
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
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// Verified by EthereumHistory (ethereumhistory.com)
// Source reconstructed from on-chain runtime bytecode of
// 0xed44f3c2081480b08643fe1ca281fab9ed643735 (deployed 2015-12-20).
// Compiles (solc 0.1.3-0.2.0, optimizer ON) to 433 bytes with exact function-body
// order and 12 of 14 function bodies byte-identical; see README for the residual.
contract TimeLockVault {
struct Account {
uint balance;
uint unlockTime;
}
mapping(address => Account) public accounts;
uint public duration;
function TimeLockVault() {
duration = 20 years;
}
// Deposit by sending ETH; withdraw by sending a 0-value tx (or calling withdraw()).
function() {
address a;
uint b;
if (msg.value > 0) {
a = msg.sender;
b = accounts[a].balance;
if (b > 0) {
a.send(msg.value); // already have a locked balance: refund
} else {
accounts[a].unlockTime = now + duration;
accounts[a].balance = b + msg.value;
}
} else {
withdraw();
}
}
function withdraw() {
if (accounts[msg.sender].balance > 0 &&
accounts[msg.sender].unlockTime > 0 &&
now > accounts[msg.sender].unlockTime) {
msg.sender.send(accounts[msg.sender].balance);
accounts[msg.sender].balance = 0;
}
}
}
External Links
Related contracts
HonestDice
Same eraOne of the earliest provably-fair dice gambling contracts on Ethereum, deployed August 12, 2015 (day 13 of Frontier). Commit-reveal dice game with 2% house edge
0xc4c51d...1ae9fcAugust 12, 2015ýÞ
Same eraWallet proxy stub generated by the Mist Wallet factory. Forwards all calls via CALLCODE to the master Ethereum Foundation Wallet contract at 0x273930d2.
0xd2f06b...74e89bAugust 21, 2015EthereumAlarmClock
Same eraThe first deployment of Piper Merriam's Ethereum Alarm Clock, a smart contract protocol for scheduling transactions at future block numbers, launched on Septemb
0xb0059e...cc0cc1September 22, 2015Alarm
Same eraThe first scheduled-transaction service on Ethereum, enabling smart contracts to schedule future function calls—deployed by Piper Merriam in October 2015.
0x07307d...9c4588October 23, 2015