Back to Home

Frontier Difficulty Oracle

oracle
0x33ca8b5377c9...4dc00a5cb10d
FrontierContract #203Exact Bytecode MatchEdit this contract
Deployed August 12, 2015 (10 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.

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