A mineable subcurrency where claimMiningReward() mints 1 token to block.coinbase once per block. Deployed Jun 16 2016.
Key Facts
Description
An early proof-of-work mining mechanic implemented in Solidity. The claimMiningReward() function mints 1 token to block.coinbase (the address of the miner who produced the current block), but only once per block number — preventing multiple claims in a single block.
This pattern extends the classic ethereum.org coin tutorial with a mining layer: tokens are distributed to miners in proportion to their block production, creating a mineable ERC-20-style token before the ERC-20 standard was formalized.
The miningReward mapping records which address claimed each block's reward (mapping(uint => address)), functioning as both a guard against double-claiming and a historical ledger of which miner earned each block.
Deployed June 16 2016 — six days after solc v0.3.3 was released (June 10 2016). Almost certainly compiled with the latest available version.
Compiler discovery: Native C++ solc v0.1.5–v0.2.1 all produce 340 bytes due to aggressive bool-return deduplication. The JS emscripten build of v0.3.3 preserves ISZERO ISZERO canonicalization and separate bool return paths, yielding the correct 352 bytes.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Homestead Era
The first planned hard fork. Removed the canary contract, adjusted gas costs.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
contract token {
mapping (address => uint) public coinBalanceOf;
mapping (uint => address) miningReward;
event CoinTransfer(address sender, address receiver, uint amount);
function token(uint supply) {
coinBalanceOf[msg.sender] = supply;
}
function sendCoin(address receiver, uint amount) returns(bool sufficient) {
if (coinBalanceOf[msg.sender] < amount) return false;
coinBalanceOf[msg.sender] -= amount;
coinBalanceOf[receiver] += amount;
CoinTransfer(msg.sender, receiver, amount);
return true;
}
function claimMiningReward() {
if (miningReward[block.number] == 0) {
coinBalanceOf[block.coinbase] += 1;
miningReward[block.number] = block.coinbase;
}
}
}