The Solidity-documentation 'Coin' subcurrency (Homestead, Jan 2016) deployed under a mismatched contract name, leaving Coin() as a public function that lets any
Historical Significance
A textbook early-Solidity constructor footgun: because the contract was renamed away from 'Coin', the intended constructor stayed a public mint-authority grab that anyone could call.
Context
Compiled with soljson-v0.1.3 (optimizer ON); exact match of both the 375-byte runtime and 393-byte creation bytecode.
Key Facts
Source Verified
Exact bytecode match. Runtime: 375 bytes (byte-for-byte). Creation: 393 bytes (byte-for-byte). Compiled with soljson-v0.1.3+commit.028f561d, optimizer ON. The contract is named 'Subcurrency', so the intended constructor function Coin() became a public callable: anyone can call Coin() to overwrite minter and seize minting rights (early-Solidity constructor footgun).
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)
// 0x1C606eE0c43f60166AB497B33548f7E4E909d447 (deploy block 930142, 2016-01-31)
// CRACKED byte-exact: soljson 0.1.3-0.2.0, optimizer ON, runtime 375 bytes.
//
// The "Coin" subcurrency from the official Solidity documentation, deployed under a contract
// whose name is NOT "Coin" -> the intended constructor `function Coin()` became a PUBLIC
// callable function (early-Solidity constructor footgun): ANYONE can call Coin() to overwrite
// `minter` and seize minting rights. Function declaration order is Coin, send, mint (matters
// for byte-exactness: the last-declared body falls through to the shared epilogue).
contract Subcurrency {
address public minter;
mapping (address => uint) public balances;
event Sent(address from, address to, uint amount);
function Coin() {
minter = msg.sender;
}
function send(address receiver, uint amount) {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
Sent(msg.sender, receiver, amount);
}
function mint(address receiver, uint amount) {
if (msg.sender != minter) return;
balances[receiver] += amount;
}
}