Back to Home

Frontier Difficulty Oracle

Oracle
0x33ca8b5377c9...4dc00a5cb10d
FrontierContract #203Exact Bytecode MatchEdit this contract
Deployed August 12, 2015 (11 years ago)Block 76,165

World's earliest known on-chain prediction-market resolution oracle, deployed August 12, 2015 — resolves bets on Ethereum mining difficulty.

Frontier EraVerified Source

Historical Significance

This contract is the world's earliest known on-chain prediction-market resolution oracle. Deployed at block 76,165 on August 12, 2015 — seven days after Ethereum's Frontier mainnet release — it introduces the pattern of using a protocol-level data source (block.difficulty) as the input to on-chain bet resolution. The mechanism predates later prediction-market platforms such as Augur, Gnosis, and Polymarket by years.

Context

Deployed in transaction 0xc9f378d160ea94f514a1c166c7221930f6492e7f53055e1c19e51a631cda2bca, this oracle resolves outcomes for prediction-market bets that wager on Ethereum's mining difficulty. A setWinningOutcome(targetBlock, lower, upper) call at or after targetBlock reads block.difficulty and writes a uint16 outcome — 1 if difficulty fell below the lower bound, 10001 if it exceeded the upper bound, or a linear interpolation 0..10000 within range, computed as 10000 * (block.difficulty - lower) / (upper - lower). Each (targetBlock, lower, upper) triple is keyed into a single mapping(uint => uint16) slot via the packed expression targetBlock + lower * (100 * 10**18) + upper * (10000000000000000000000 * 10**18).

The oracle is one of three contracts deployed in the same week by 0x77b97786b0fb73e55d9e92d4b182befbf346f979: the fixed-point math library at 0x258c09146b7a28Dde8d3e230030e27643F91115F (which exposes e_exp, ln, and floor_log2) and a market-maker contract intended to live at 0xdb7c577b93baeb56dab50af4d6f86f99a06b96a2 (the creation transaction ran out of gas, so no code was deployed at that address).

Key Facts
Deployment Block
76,165
Deployment Date
Aug 12, 2015, 09:45 PM
Code Size
496.0 B
Gas at Deploy
144,997
Transactions by Year
20151

Source Verified

SolidityExact bytecode match(496 bytes)
Compiler: solc 0.

Compiled with `solc 0.1.0` (native C++ build), optimizer OFF. Both creation (496 bytes) and runtime (477 bytes) are byte-for-byte exact matches against the on-chain bytecode. Reconstruction script and on-chain references at https://github.com/cartoonitunes/frontier-oracle-verification.

Historian Categories

Oracle
Heuristic Analysis

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

Detected Type: Oracle

Bytecode Overview

Opcodes496
Unique Opcodes79
Jump Instructions22
Storage Operations9

External Links

Related contracts

Fixed-Point Math Library

Same deployer

64.64 fixed-point library: e_exp, ln, floor_log2 for an early LMSR prediction market. Deployed Aug 12, 2015 — pre-Gnosis.

0x258c09...91115fAugust 12, 2015

Prediction Market

Same deployer

LMSR prediction market (Aug 2015 – Jun 2016, 662 ETH). 11/25 selectors byte-exact, 14/25 semantic reconstructions.

0x2935aa...7a9085August 23, 2015

Private Lottery

Same era

Vitalik Buterin Serpent oracle fetcher (Oct 12, 2015). get(string) requires >=0.007 ETH, derives a request id from sha3+block.prevhash, emits GetRequest, returns the id, and sends the balance to Vitalik's 0xde0b2956 address. Byte-for-byte cracked (Serpent @ f0b4128).

0x7e7f63...ddf746October 12, 2015

Private Lottery

Same era

Vitalik Buterin Serpent oracle fetcher (Oct 12, 2015). Same get(string) request contract as 0x7e7f6373; sweeps balance to 0xb3cd4c25. Byte-for-byte cracked (Serpent @ f0b4128).

0x36517c...f1eaf1October 12, 2015

Private Lottery

Same era

Vitalik Buterin Serpent oracle caller (Oct 12, 2015). Two functions: call() invokes an external fetcher's get(string) and stores a callback id; callback() re-emits the response as LogResponse. NOT a lottery. Byte-for-byte cracked (Serpent @ f0b4128).

0xc861fc...407166October 12, 2015

Private Lottery

Same era

Vitalik Buterin Serpent oracle caller (Oct 12, 2015). callback + call; call() forwards value to an external fetcher's get(string) and stores a callback id. Sibling of 0xc861fc8d. Byte-for-byte cracked (Serpent @ f0b4128).

0x4fea5c...aa609bOctober 12, 2015