Back to Home

Lotto

Utility
0x4bf42d0ce494...881361d2e7e3
FrontierContract #578Exact Bytecode MatchEdit this contract
Deployed August 28, 2015 (11 years ago)Block 156,304

EtherPot, a blockhash lottery that runs in rounds and pays out in subpots

Frontier EraVerified Source

Context

Deployed in August 2015, in the first month of the Frontier chain, and compiled with solc v0.1.1. The source is lotto.sol from the etherpot contract repository, which has since been deleted from GitHub.

Key Facts
Deployment Block
156,304
Deployment Date
Aug 28, 2015, 03:52 PM
Code Size
2.6 KB
Gas at Deploy
726,952

Description

The EtherPot lottery. Rounds are defined by block height rather than by any state: getRoundIndex is simply the block number divided by blocksPerRound, set here to 5760 blocks, roughly a day. Sending ether to the fallback function buys tickets at a tenth of an ether each, with any remainder refunded, and records the buyer in that round's list. Once a round is over anyone may call cash, which splits the pot into subpots of five ether and pays each one to the holder whose ticket index matches the hash of the round's decision block, modulo the ticket count. A subpot can only be cashed once. The design leans on block.blockhash for randomness, which a miner producing the decision block can influence.

Source Verified

Exact bytecode match(2,706 bytes)
Compiler: v0.1.1+
Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Utility

Bytecode Overview

Opcodes2,706
Unique Opcodes143
Jump Instructions118
Storage Operations39

External Links

Related contracts