Back to Home

ObamaOracle

Utility
0x66c67a9e26f5...e2f01db5785a
FrontierContract #2,403Exact Bytecode MatchEdit this contract
Deployed October 22, 2015 (11 years ago)Block 422,591

October 2015 Oraclize demo by Thomas Bertani that self-destructs if WolframAlpha stops naming Obama as US president.

Frontier EraVerified Source

Historical Significance

One of the earliest oracle-driven contracts on Ethereum: it uses Oraclize, then weeks old, to bring a WolframAlpha answer on chain and act on it, a self-destruct condition tied to a real-world fact. It shows the first-generation Oraclize API (query(uint256,string,string)) and an on-chain substring search written before Solidity had string utilities.

Context

Deployed in October 2015, about three months after Ethereum launched and a few weeks before Devcon 1 in London, where Thomas Bertani presented Oraclize as a provably honest oracle service. Smart contracts had no native way to read off-chain data, and Oraclize was among the first services to offer it.

Key Facts
Deployment Block
422,591
Deployment Date
Oct 22, 2015, 02:44 PM
Code Size
2.0 KB
Gas at Deploy
499,370

Description

Obama Oracle is an early Oraclize demonstration contract deployed on October 22, 2015 (block 422,591) by 0x0047a8033cc6d6ca2ed5044674fd421f44884de8, the key Thomas Bertani used for his September 2015 Oraclize experiments. Two byte-identical copies followed within minutes at 0x593f6c40023183a3b6c0811d2612c31c1aaec4e0 (block 422,602) and 0x29b46a3f3fcc2353f6bef5d5bb6811ce75be3849 (block 422,609).

On deployment the constructor asks the Oraclize contract at 0xd4cb3eb955e03ac64644678fd3d6a7f3104ee70d to query WolframAlpha for "president of the United States". When the answer arrives from the Oraclize callback address 0x26588a9301b0428d95e6fc3a5024fce8bec12d51, the contract searches it for "Obama" with an on-chain indexOf. If the name is missing it self-destructs and sends its balance to the deployer; otherwise it queries WolframAlpha again. The owner can also destroy it with kill().

None of the three copies ever received a callback: each has only its creation transaction, and all three are still on chain, long after Obama left office in January 2017.

Source Verified

SolidityExact bytecode match(2,017 bytes)
Compiler: soljson

Byte-exact runtime and creation. The public uint getter (selector 0x14ff041d) uses the collision name fOjqVd(); the original name is unknown (7+ characters).

Heuristic Analysis

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

Detected Type: Utility
Contains SELFDESTRUCT opcode

Bytecode Overview

Opcodes2,017
Unique Opcodes146
Jump Instructions77
Storage Operations10

External Links

Related contracts