Contract: 0xb336a86e2feb1e87a328fcb7dd4d04de3df254d0
Deployment tx: 0xc076a813...
Block: 963,186
Date: February 6, 2016, 16:12:18 UTC
Deployer: 0xb2afec1da55c15ad57b3310f9008c47f4e028de3
King of the Ether Throne v0.4.0 is the redesigned successor to the original v0.3.0 throne, deployed eight hours after the bug-discovery and three hours after the v0.3.0 throne fell silent in what Kieran Elby called the "Turbulent Age" (Feb 6–8, 2016). The v0.3.0 contract had used etherAddress.send(compensation) to pay the previous monarch — a call that failed silently against Mist-style contract wallets because the 2,300 gas stipend was insufficient. Several large compensation payments were lost as a result.
v0.4.0 was Kieran's attempt at a fix-and-improve revision. Notable changes vs. v0.3.0:
- Starting claim price raised from 10 finney (0.01 ETH) to 100 finney (0.1 ETH).
- No
accumulatedWizardPaymentsslot — the wizard now sweeps commission directly viasweepCommission(uint amount)rather than from an accumulating balance. - No 12-monarch limit — anyone can become king as long as the throne is active.
transferOwnership(address)added so the wizard role can be reassigned.- Two-significant-figure rounding of next claim price across tiers (0.001, 0.01, 0.1, 1, 10, 100, 1000 ETH) so prices don't accrue silly trailing decimals.
The same send() bug from v0.3.0 was not fully fixed in v0.4.0 — the compensation payment still uses the default 2,300 gas stipend on currentMonarch.etherAddress.send(...), so Mist-wallet monarchs would still fail to receive their compensation. The proper fix didn't land until commit 120f5a2 ("Fix for failed payment problem", Feb 21 2016) and the eventual v1.0 rewrite.
The contract author, Kieran Elby, references this exact contract address in the v0.4.0 source comment:
// This contract lives on the blockchain at 0xb336a86e2feb1e87a328fcb7dd4d04de3df254d0 // and was compiled (using optimization) with: // Solidity version: 0.2.1-fad2d4df/.-Emscripten/clang/int linked to libethereum
- Compiler:
soljson-v0.2.1-nightly.2016.2.3+commit.fad2d4df - Optimizer: ON (default 200 runs)
- Language: Solidity
Source code was published by the contract author (Kieran Elby) in the KingOfTheEtherThrone GitHub repository at commit 6d77929 ("Bump to new contract", Feb 6, 2016 16:23 UTC — eleven minutes after deployment).
There is one small wrinkle: the source as committed at 6d77929 defines sweepCommission before transferOwnership, but the deployed bytecode requires the opposite order — transferOwnership defined first. Kieran appears to have cosmetically swapped the two functions in the source after deploying. With the two functions swapped back to the deployment order, compiling KingOfTheEtherThrone.sol with soljson-v0.2.1-nightly.2016.2.3+commit.fad2d4df (optimizer ON) produces a byte-for-byte exact match of the 2,109-byte on-chain runtime bytecode.
The version of KingOfTheEtherThrone.sol in this repository is the deployment-order source: identical to the 6d77929 commit except that transferOwnership is defined before sweepCommission, and an // Submitted by EthereumHistory (ethereumhistory.com) attribution line has been added at the top.
KingOfTheEtherThrone.sol— Solidity source (deployment-order; functions swapped back from6d77929commit)onchain-runtime.hex— on-chain runtime bytecode (2,109 bytes)soljson-v0.2.1-nightly.2016.2.3+commit.fad2d4df.js— pinned compiler binaryverify.sh— reproducible verification script
| Field | Value |
|---|---|
| Starting claim price | 100 finney |
| Claim price adjustment | x1.5 each reign (x3/2), rounded to 2 sig fig |
| Wizard commission | 1% (1/100) |
| Monarch limit | none |
| Slot | Variable |
|---|---|
| 0 | wizardAddress |
| 1 | currentClaimPrice |
| 2–5 | currentMonarch (struct: etherAddress, name, claimPrice, coronationTimestamp) |
| 6 | pastMonarchs (array length) |
- EthereumHistory contract page
- awesome-ethereum-proofs
- Original GitHub repo
- KoTH v0.3.0 verification (the predecessor throne at
0xa9d160e3...) - Post-mortem — Kieran's writeup of the
send()bug