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-08-26 by 0x4aa9950530c116b0bf5fcaf9c1f0e295dcc98d0c. 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
Refund
Same deployerAn 86-byte contract that returns your ether: any plain transfer is refunded to the sender while its single storage slot stays zero.
0x27f7eb...fac218August 27, 2015Contract 0x177283...4664aa
Same eraAn early on-chain lottery contract deployed on Frontier by the prolific 0xFD2605 deployer cluster.
0x177283...4664aaAugust 10, 2015Roulette
Same eraAn early Ethereum roulette contract from August 2015, notable for a critical randomness vulnerability: its 'private' seed is hardcoded to 1 in the constructor.
0x5fe5b7...25a4fdAugust 10, 2015Gamble
Same eraA 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.
0x4b9105...7ea144August 19, 2015Prediction Market
Same eraLMSR prediction market (Aug 2015 – Jun 2016, 662 ETH). 11/25 selectors byte-exact, 14/25 semantic reconstructions.
0x2935aa...7a9085August 23, 2015Gamble
Same eraA 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.
0xc0e0cc...e5e84dSeptember 5, 2015