A last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
Key Facts
Description
Players send ether to the contract and the most recent sender becomes the last player. If no one else plays for a set number of blocks, the next transaction pays the accumulated pot to the last player, minus a 1% fee to the owner. The same deployer later published a finished version of this game as LastIsMe in 2016; this is one of the prototypes that preceded it.
Source Verified
Exact runtime and creation bytecode match with soljson v0.1.1+commit.6ff4cd6, optimizer on. Source: handwritten reconstruction from bytecode. Verified on Etherscan. Not submitted to Sourcify: its oldest supported compiler is v0.1.7. Contract name is a stand-in: stand-in: the original 2015 contract name is not recoverable (MyBid() survives as a renamed former constructor in the earliest versions); LastIsMe is the name the same deployer gave this game when verifying its April 2016 successor at 0xaf396dce15cb9e834ff9187f34f589db22c849a8.
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 LastIsMe {
address owner;
address public lastPlayer;
uint public lastBlock;
uint public blocks;
uint public price;
address[] public winners;
uint[] public winnersPot;
uint totalWinnings;
function LastIsMe() {
owner = msg.sender;
price = 1 ether;
blocks = 200;
totalWinnings = 0;
}
function elapsed() returns (uint) {
return block.number - lastBlock;
}
function remaining() returns (uint) {
var e = elapsed();
if (blocks > e)
return blocks - elapsed();
else
return 0;
}
function totalWinners() returns (uint) {
return winners.length;
}
function() {
uint pot = 0;
uint fee;
uint payout;
if (this.balance > msg.value)
pot = this.balance - msg.value;
if (remaining() == 0 && lastPlayer > 0 && pot >= 100) {
fee = pot / 100;
payout = pot - fee;
owner.send(fee);
lastPlayer.send(payout);
winners[winners.length++] = lastPlayer;
winnersPot[winnersPot.length++] = payout;
totalWinnings += payout;
}
if (msg.value >= price) {
lastPlayer = msg.sender;
lastBlock = block.number;
if (msg.value > price)
lastPlayer.send(msg.value - price);
}
}
}External Links
Related contracts
LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0xd6b955...30dd2aSeptember 8, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0x6197b2...2eda88September 8, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0x78eea8...58ac23September 8, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0xb84f79...af6a30September 9, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0xf6a239...378d81September 9, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0x7d692b...5e0c15September 9, 2015