Third Etherboard prototype (Nov 7, 2015): adds a public check() helper that refunds failed bids and cuts the minimum price to 10 finney
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 third Etherboard prototype, deployed on November 7, 2015 at block 505,709. 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. Compared with the first two prototypes, the inline Log-and-return guards are factored into a public check(bool, string, uint) helper. When a check fails, the helper also sends msg.value back to the sender, which the earlier versions did not do. The bounds messages are reworded ('Y must be less than heigth [1000].', typo included), the minimum price drops from 50 to 10 finney, and the outbid threshold is computed once up front. It saw about 2,750 transactions in 2015. The final Etherboard kept the check() helper.
Source Verified
Byte-exact on both runtime and creation. Runtime: 2251 bytes (SHA-256 0734e896a5db26de1e3da1fef547e0b18646ba4e877be46aecff266d2a770d7e). Creation: 2308 bytes (SHA-256 0b24c1adf6006c254bcc05c5a66fb06e205ea9ce575a629665b1d68d2dd4e526), 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 adds public check(bool,string,uint256) helper with msg.value refund. 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 = 10 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) {
var minToOutbid = pixels[x][y].price * outbidPercent / 100;
if (!check (x < width, "X must be less than width [1000].", x) ||
!check (y < height, "Y must be less than heigth [1000].", y) ||
!check (msg.value >= minPrice, "Minimum pixel price is 10 finney.", msg.value) ||
!check (msg.value >= minToOutbid, "Value must be 10% higher than current pixel price.", minToOutbid))
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 check(bool condition, string message, uint value) returns (bool pass) {
if (!condition) {
Log(msg.sender, message, value);
msg.sender.send(msg.value);
}
return condition;
}
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 deployerSecond Etherboard prototype (Nov 6, 2015): redeployed 25 minutes after the first with the fee/min-price setter bug fixed
0x8d4eac...4b71beNovember 6, 2015Etherboard
Same deployer1000x1000 pixel canvas on Ethereum - buy, color, and trade pixels on-chain
0x350e0f...668945November 13, 2015