A coin flip on the block timestamp that pays double or keeps the stake
Context
Deployed in August 2015, in the first month of the Frontier chain. The same account verified another contract of its own with the identical interface, which is where the name comes from.
Key Facts
Description
Send it more than twice its own balance and it flips: the low bit of the block timestamp is written to storage as the result, and if that bit is set the sender is paid back twice what they sent, otherwise the contract keeps everything. Anything less than twice the balance is refused outright, which caps the payout at what the contract can cover. A donate function exists solely to fund it, and the flip result stays readable afterwards. The randomness is the timestamp, which the miner producing the block chooses.
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 CoinFlipper {
uint8 public flip;
function donate() {
}
function() {
var v = msg.value;
var b = address(this).balance;
if (v < 2 * b) {
return;
}
flip = uint8(block.timestamp % 2);
if (flip == 0) {
} else {
msg.sender.send(2 * v);
}
}
}External Links
Related contracts
Greeter
Same deployerA Frontier-era Greeter contract with the message: 'Hello World!'
0x113158...72fa8aAugust 8, 2015CoinFlipper
Same deployerTimestamp-parity coinflip with balance guard and donate().
0xb87824...8642adAugust 8, 2015CoinFlip
Same deployerTimestamp-parity coinflip; payout is `2 * msg.value` via `send`.
0x0013e7...1c2989August 8, 2015Multiply7
Same deployerThe Multiply7 tutorial contract — one of the first Solidity examples ever deployed to mainnet.
0xfcb20a...b96d3fAugust 10, 2015Pyramid
Same deployerMember-added pyramid/chain list with equal-share claim distribution.
0xdf4b51...dc9b87August 10, 2015MessageStore
Same eraA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015