An early 100 ETH tree-payout chain letter (MyScheme) deployed on Frontier, Aug 9 2015; still holds 1 ETH.
Historical Significance
Part of the MyScheme chain-letter family by deployer 0xa14cf6ce, alongside the 10 ETH variant 0xa327075a and the later refined 100 ETH version 0x020522bf.
Context
A 'next level' tree-payout chain letter: each 100 ETH entrant is added to a growing tree (storage slot 3); when a level fills, earlier participants are paid. This is an earlier draft - in the numInvestorsMinusOne<=2 branch it forwards the balance to myTree[0] and zeroes treeBalance before setting treeDepth=1, behaviour the author dropped in the later 0x020522bf version. Source reconstructed and confirmed as an exact byte-for-byte match (soljson-v0.1.1+commit.6ff4cd6, optimizer ON). Reproducible proof: https://github.com/cartoonitunes/awesome-ethereum-proofs/pull/56
Key Facts
Source Verified
Exact byte-for-byte match. Compiled with soljson-v0.1.1+commit.6ff4cd6, optimizer ON. Creation 989 bytes (sha256 b1797e694b4fd61d0e0cf8f1cfeae75e8d7c21a37f083d0cb801e85684f1295d), runtime 830 bytes (sha256 583b284e29a4499b030d065be1f3b2e55b6030b367e523fd8574fbe151e3e54e). Source is MyScheme.sol, a 100 ETH tree-payout chain letter. This is an earlier variant of the later 100 ETH sibling 0x020522bf9b8ed6ff41e2fa6765a17e20e2767d64: in the numInvestorsMinusOne<=2 branch it sends the balance to myTree[0] and zeroes treeBalance before setting treeDepth=1. Storage: slot0=treeBalance, slot1=numInvestorsMinusOne, slot2=treeDepth, slot3=myTree array. Reproducible via verify.js. Proved by spiderwars.
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.
Show source code (Solidity)
contract MyScheme {
uint treeBalance;
uint numInvestorsMinusOne;
uint treeDepth;
address[] myTree;
function MyScheme() {
treeBalance = 0;
myTree.length = 6;
myTree[0] = msg.sender;
numInvestorsMinusOne = 0;
}
function getContractBalance() constant returns (uint a){
return treeBalance;
}
function getNumInvestors() constant returns (uint a){
return numInvestorsMinusOne+1;
}
function getNumNextLevel() constant returns (uint a){
return myTree.length - numInvestorsMinusOne - 1;
}
function() {
uint amount = msg.value;
if (amount>=100000000000000000000){
numInvestorsMinusOne+=1;
myTree[numInvestorsMinusOne]=msg.sender;
amount-=100000000000000000000;
treeBalance+=100000000000000000000;
if (numInvestorsMinusOne<=2){
myTree[0].send(treeBalance);
treeBalance=0;
treeDepth=1;
}
else if (numInvestorsMinusOne+1==myTree.length){
for(uint i=myTree.length-3*(treeDepth+1);i<myTree.length-treeDepth-2;i++){
myTree[i].send(50000000000000000000);
treeBalance-=50000000000000000000;
}
uint eachLevelGets = treeBalance/(treeDepth+1)-1;
uint numInLevel = 1;
for(i=0;i<myTree.length-treeDepth-2;i++){
myTree[i].send(eachLevelGets/numInLevel-1);
treeBalance -= eachLevelGets/numInLevel-1;
if (numInLevel*(numInLevel+1)/2 -1== i){
numInLevel+=1;
}
}
myTree.length+=treeDepth+3;
treeDepth+=1;
}
}
treeBalance+=amount;
}
}