Second Etherboard prototype (Nov 6, 2015): redeployed 25 minutes after the first with the fee/min-price setter bug fixed
Historical Significance
Shows the development history of Etherboard, one of the earliest pixel-canvas experiments on Ethereum, through a series of Frontier-era prototypes deployed in the week before the final contract.
Context
Deployed by 0x4f5b350b662fb17ca4ec22116e91dc1417b892bc, the same address that a week later (November 13, 2015, block 536,195) deployed the final Etherboard contract (https://www.ethereumhistory.com/contract/0x350e0ffc780a6a75b44cc52e1ff9092870668945). Three prototypes went up on November 6-7, 2015: 0x242034238b5d9c0001bc06320bb4cfd8d20d8ed4, 0x8d4eac10d68745e2a8c36ab33c5c3961ed4b71be and 0x1776281d0d40108941cb41e604dcafbdc3cd61a1. Taken together, they show the design being iterated onchain.
Key Facts
Description
The second Etherboard prototype, deployed on November 6, 2015 at block 500,859, 25 minutes after 0x242034238b5d9c0001bc06320bb4cfd8d20d8ed4. The only change is that setMinPrice and setFeePercent now write their own storage slots (in the first deployment they were swapped). Every version is a 1000x1000 pixel board. setColor(x, y, color) pays the previous pixel owner the bid minus a 1% fee, then stores (msg.sender, block.number, color, msg.value) for the pixel. A bid has to be at least 110% of the current price and at least the minimum price. setColorRgb(x, y, red, green, blue, alpha) packs the colour as alpha1048576 + red65536 + green*256 + blue, and getRow(y) returns the owners, colours and prices of a whole row. Unlike the final Etherboard, these prototypes store full addresses per pixel rather than compact uint16 owner IDs, and have no batch-paint function. The PixelChanged event is emitted after the pixel is overwritten, so its 'old' owner/colour/price fields actually log the new values. Failed checks emit a Log event and return false without refunding the ETH sent. The minimum price is 50 finney. It saw about 2,000 transactions in 2015.
Source Verified
Byte-exact on both runtime and creation. Runtime: 2158 bytes (SHA-256 b7bc9fd613934a7efe5e6dccd311b280fbe3a36db6ec7f1a2787662221a425e5). Creation: 2215 bytes (SHA-256 b7b2fbbc8adfe52fb4e49f2f2598954006cd6ff82950fb5343502b50fbb5826d), no constructor arguments. Compiled with soljson v0.1.6+commit.d41f8b7c, optimizer ON (200 runs); all 19 builds from v0.1.4-nightly.2015.10.2 through v0.1.7 produce identical output (130 v0.1.x/v0.2.x builds swept). Function names were recovered by brute-forcing the selectors, and the event topics confirm the event signatures. Struct-field and parameter names follow the verified Etherboard source. Source differs from 0x24203423 only in the corrected setMinPrice/setFeePercent slots. Verified on Etherscan.
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 Etherboard {
struct Pixel {
address owner;
uint lastChanged;
int color;
uint price;
}
address public owner;
uint constant width = 1000;
uint constant height = 1000;
uint public outbidPercent = 110;
uint public feePercent = 1;
uint public minPrice = 50 finney;
Pixel[1000][1000] public pixels;
event Log(address sender, string message, uint value);
event PixelChanged(uint x, uint y, address oldOwner, int oldColor, uint oldPrice, address newOwner, int newColor, uint newPrice);
function Etherboard () {
owner = msg.sender;
}
function setColorRgb(uint x, uint y, int red, int green, int blue, int alpha) returns (bool success) {
return setColor(x, y, alpha * 1048576 + red * 65536 + green * 256 + blue);
}
function setColor(uint x, uint y, int color) returns (bool success) {
if (x < 0 || x >= width) {
Log(msg.sender, "X must be > 0 and < 1000.", x);
return false;
}
if (y < 0 || y >= height) {
Log(msg.sender, "Y must be > 0 and < 1000.", y);
return false;
}
if (msg.value < minPrice) {
Log(msg.sender, "Minimum pixel price is 50 finney.", msg.value);
return false;
}
if (msg.value * 100 < pixels[x][y].price * outbidPercent) {
Log(msg.sender, "Value must be 10% higher than current pixel price.", pixels[x][y].price * outbidPercent / 100);
return false;
}
var oldPixel = pixels[x][y];
if (oldPixel.owner > 0) {
var fee = msg.value * feePercent / 100;
oldPixel.owner.send(msg.value - fee);
}
pixels[x][y] = Pixel(msg.sender, block.number, color, msg.value);
PixelChanged(x, y, oldPixel.owner, oldPixel.color, oldPixel.price, msg.sender, color, msg.value);
return true;
}
function getRow(uint y) returns (address[1000] owners, int[1000] colors, uint[1000] prices) {
for (uint x = 0; x < width; x++) {
owners[x] = pixels[x][y].owner;
colors[x] = pixels[x][y].color;
prices[x] = pixels[x][y].price;
}
}
function setFeePercent(uint percent) {
if (msg.sender == owner)
feePercent = percent;
}
function setMinPrice(uint price) {
if (msg.sender == owner)
minPrice = price;
}
function setOutbidPercent(uint percent) {
if (msg.sender == owner)
outbidPercent = percent;
}
function empty() {
if (msg.sender == owner)
owner.send(this.balance);
}
}External Links
Related contracts
Etherboard
Same deployerFirst Etherboard prototype (Nov 6, 2015): a 1000x1000 pixel canvas whose fee and min-price setters write to each other's storage slots
0x242034...0d8ed4November 6, 2015Etherboard
Same deployerThird Etherboard prototype (Nov 7, 2015): adds a public check() helper that refunds failed bids and cuts the minimum price to 10 finney
0x177628...cd61a1November 7, 2015Etherboard
Same deployer1000x1000 pixel canvas on Ethereum - buy, color, and trade pixels on-chain
0x350e0f...668945November 13, 2015