Bytecode verified via sibling
This contract shares identical runtime bytecode with Gamble (0x4b9105d0...) which has been verified through compiler archaeology.
A 106-byte coin-flip: send ether and, if the block timestamp is odd, the contract tries to send back double. If it is even, you lose the stake.
Historical Significance
A compact example of the two mistakes that defined early on-chain gambling. Block timestamp is set by the miner within a tolerance, so the coin flip is not random and is influenced by the party best placed to bet on it. And because the unchecked send fails when the house is empty, the game is only fair while somebody keeps it funded. Both patterns were later formalised as standard audit findings, but in 2015 they were still being discovered by deploying them.
Context
Deployed 2015-09-05 by 0x7931c90100285910556fd3c6406942995930ad34. Six byte-identical copies of this runtime exist, deployed by four distinct addresses between 2015-08-19 and 2015-09-21. Most now hold a zero balance, so a winning flip against them would pay nothing. Source recovered by exact runtime bytecode match and verified on Sourcify.
Key Facts
Description
The contract has no named functions at all. Everything happens in the fallback, so a plain ether transfer is the bet. It reads block.timestamp and takes it modulo 2. On an even timestamp it returns immediately and keeps the ether. On an odd timestamp it calls msg.sender.send(2 * value), attempting to pay double the amount just received. The return value of send is not checked, which matters because the payout can only succeed if the contract already holds at least as much ether as the incoming bet. An unfunded copy silently keeps the stake even on a winning flip.
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 Gamble {
function() {
uint value = msg.value;
uint t = block.timestamp;
if (t % 2 == 0) {
return;
} else {
msg.sender.send(2 * value);
}
}
}External Links
Related contracts
greeter
Same deployerThe Frontier-era greeter tutorial contract: returns a constructor-set greeting from greet(), with an owner-only kill() inherited from mortal.
0x08ac66...84e44aAugust 25, 2015Contract 0x76517f...e0ee4c
Same deployerThe ethereum.org crowdsale tutorial: contributions run to a deadline against a goal, pay out a separate reward token, and are refunded if the goal is missed.
0x76517f...e0ee4cSeptember 3, 2015Contract 0x79ae16...a7785f
Same deployerThe 2015 ethereum.org democracy tutorial under its original name: token holders propose payments, vote a position, and the contract pays out if the vote passes.
0x79ae16...a7785fSeptember 3, 2015datafeed
Same deployerThe datafeed example from the ethereum dapp-bin standardized contract APIs, a single owner key value oracle.
0x65ede7...4e25fbSeptember 9, 2015Democracy DAO
Same deployerOn-chain governance contract with proposals, voting, and execution. Stripped-down version of the go-ethereum wiki Democracy DAO tutorial.
0xb5b8a0...9cfec6September 24, 2015ProtoDAO_0x7931c901_Sep24
Same deployerSep 24, 2015 proto-DAO experiment — eight months before TheDAO. One of 10 byte-identical sister contracts deployed by 0x7931c901 in a 40-minute burst.
0xcbe06c...54c81cSeptember 24, 2015