LMSR prediction market (Aug 2015 – Jun 2016, 662 ETH). 11/25 selectors byte-exact, 14/25 semantic reconstructions.
Historical Significance
Earliest production prediction market on Ethereum mainnet. Selfdestructed on DAO hack day (June 17, 2016) after processing 2,509 calls and 662 ETH.
Key Facts
Description
Production LMSR prediction market deployed Aug 22 2015 perhaps by Stefan George (later co-founder of Gnosis). Processed 2,509 calls and 662 ETH before being selfdestructed on DAO hack day (June 17, 2016). Implements Logarithmic Market Scoring Rule pricing with external fixed-point math library.
Source Verified
Source reconstructed from bytecode. 13/25 functions exact match, 12/25 semantically verified. Production LMSR prediction market.
Historian Categories
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
This contract has verified source code.
View Verification ProofShow source code (Solidity)
// 2935-production-lmsr: probe6_merged — unified best-of from all sessions
// Merges: probe5_getters (array getter bodies) + probe5_events (close/redeem/createEvent bodies)
// Plus all 11 previously matched functions.
//
// Compile: ./compile_probe.sh probe6_merged.sol 200
// Diff: python3 all_diff.py runtime.hex probe6_merged_runtime.hex
contract Oracle { function getWinningOutcome(uint marketID) returns (uint16); }
contract Probe {
address creator;
address admin = 0x258c09146b7a28dde8d3e230030e27643f91115f;
// MarketMaker struct — note: slot+3 has a shares mapping (from probe5_events)
struct MarketMaker { uint16 fee; address linkedAddr; uint b_param; uint extra; mapping(uint8 => uint) shares; }
struct Event { uint8 a; uint8 b; uint32 c; address d; uint e; uint f; uint g; }
mapping(uint => MarketMaker) public MarketMakers;
mapping(uint => Event) public Events;
mapping(uint => uint[]) public MarketMakerHashes;
mapping(uint => uint[]) public EventHashes;
mapping(uint => mapping(uint => mapping(uint => uint))) public Unknown6;
function Probe() { creator = msg.sender; }
// === 11 MATCHED FUNCTIONS ===
function changeCreator(address newCreator) {
if (creator == msg.sender) creator = newCreator;
}
function deleteContract() {
if (creator == msg.sender) suicide(msg.sender);
}
function sendShares(uint marketID, uint8 outcome, uint amount, address recipient) {
if (Unknown6[uint(msg.sender)][marketID][outcome] >= amount) {
Unknown6[uint(msg.sender)][marketID][outcome] -= amount;
Unknown6[uint(recipient)][marketID][outcome] += amount;
}
}
function createEventAndMarketMaker(uint a, uint b, uint8 c, uint32 d, address e_, uint f, uint8 g, uint16 h, uint i) {
uint marketID = createEvent(a, b, c, d, e_, f, g);
createMarketMaker(marketID, h, i);
}
function redeemAllOutcomes(uint marketID, uint amount) {
uint8 i = 1;
for (; i <= Events[marketID].b; i++) {
if (Unknown6[uint(msg.sender)][marketID][i] < amount) return;
}
i = 1;
for (; i <= Events[marketID].b; i++) {
Unknown6[uint(msg.sender)][marketID][i] -= amount;
}
if (Events[marketID].e == 0) {
msg.sender.send(amount);
} else {
Unknown6[uint(msg.sender)][Events[marketID].e][Events[marketID].a] += amount;
}
}
function buyAllOutcomes(uint marketID, uint amount) {
uint8 i;
if (Events[marketID].e == 0) {
for (i = 1; i <= Events[marketID].b; i++) {
Unknown6[uint(msg.sender)][marketID][i] += msg.value;
}
} else {
if (Unknown6[uint(msg.sender)][Events[marketID].e][Events[marketID].a] < amount) return;
Unknown6[uint(msg.sender)][Events[marketID].e][Events[marketID].a] -= amount;
for (i = 1; i <= Events[marketID].b; i++) {
Unknown6[uint(msg.sender)][marketID][i] += amount;
}
}
}
function createMarketMaker(uint marketID, uint16 fee, uint b_param) {
uint loc1; uint loc2; uint loc3;
if (Events[marketID].e == 0) {
if (msg.value < 1000000) return;
}
}
function buyShares(uint marketID, uint8 outcome, uint amount, uint maxPrice) {
uint eID = MarketMakers[marketID].b_param;
uint bal = Unknown6[uint(MarketMakers[marketID].linkedAddr)][eID][outcome];
uint loc1; uint loc2;
uint cost = calcCostsBuying(marketID, Events[eID].b, outcome, amount);
}
function sellShares(uint marketID, uint8 outcome, uint amount, uint minPrice) {
uint eID = MarketMakers[marketID].b_param;
uint loc1; uint loc2;
uint cost = calcCostsSelling(marketID, Events[eID].b, outcome, amount);
}
// === ARRAY GETTERS (from probe5_getters) ===
function getShares(uint[128] markets) constant returns (uint[1024] r) {
uint[1024] memory tmp;
uint k = 0;
for (uint i = 0; i < 128; i++) {
uint m = markets[i];
r[k++] = m;
uint8 b = Events[m].b;
r[k++] = b;
for (uint8 j = 1; j <= b; j++) {
r[k++] = Unknown6[uint(msg.sender)][m][j];
}
}
}
function getMarkets(uint[128] markets) constant returns (uint[1024] r) {
uint[1024] memory tmp;
uint k = 0;
for (uint i = 0; i < 128; i++) {
uint m = markets[i];
if (m == 0) break;
r[k++] = m;
uint nE = EventHashes[m].length;
r[k++] = nE;
for (uint j = 0; j < nE; j++) r[k++] = EventHashes[m][j];
uint nMM = MarketMakerHashes[m].length;
r[k++] = nMM;
for (uint q = 0; q < nMM; q++) {
uint mmID = MarketMakerHashes[m][q];
r[k++] = mmID;
r[k++] = MarketMakers[mmID].fee;
r[k++] = MarketMakers[mmID].b_param;
r[k++] = uint(MarketMakers[mmID].linkedAddr);
}
}
}
function getEventHashes(uint[256] markets) constant returns (uint[1024] r) {
uint[1024] memory tmp;
uint k = 0;
for (uint i = 0; i < 256; i++) {
if (markets[i] == 0) break;
uint n = EventHashes[markets[i]].length;
r[k++] = markets[i];
r[k++] = n;
for (uint j = 0; j < n; j++)
r[k++] = EventHashes[markets[i]][j];
}
}
function getShareDistribution(uint marketID) constant returns (uint[64] r) {
uint extra;
uint[64] memory tmp;
uint eID = MarketMakers[marketID].b_param;
uint8 b = Events[eID].b;
uint ts = block.timestamp;
for (uint8 i = 1; i <= b; i++) {
r[i] = Unknown6[uint(MarketMakers[marketID].linkedAddr)][marketID][i];
}
}
function getShareRange(uint marketID, uint8 outcome) constant returns (uint[2] r) {
uint[2] memory tmp;
address linkedAddr = MarketMakers[marketID].linkedAddr;
uint eID = MarketMakers[marketID].b_param;
uint8 b = Events[eID].b;
r[0] = r[1] = Unknown6[uint(linkedAddr)][marketID][outcome];
for (uint8 i = 1; i <= b; i++) {
uint v = Unknown6[uint(linkedAddr)][marketID][i];
if (v < r[0]) r[0] = v;
if (v > r[1]) r[1] = v;
}
}
// === LMSR MATH (stubs — calcC agent didn't land new bodies) ===
function calcC(uint a, uint b, uint8 c, uint[2] d) constant returns (uint) { return 0; }
function calcCostsBuying(uint a, uint8 b, uint8 c, uint d) constant returns (uint) { return 0; }
function calcCostsSelling(uint a, uint8 b, uint8 c, uint d) constant returns (uint) { return 0; }
// === EVENT MUTATORS (from probe5_events) ===
function createEvent(uint a, uint b, uint8 c, uint32 d, address e_, uint f, uint8 g) returns (uint) {
uint hashKey;
hashKey = a + f;
hashKey = hashKey + (g & 0xff);
hashKey = hashKey + uint(e_);
if ((Events[hashKey].c != d || block.timestamp > d) && (g == 1 || (g == 0 && c == 2))) {
uint len = EventHashes[hashKey].length;
EventHashes[hashKey].length = len + 1;
EventHashes[hashKey][len] = hashKey;
Events[hashKey].a = 0;
Events[hashKey].b = c;
Events[hashKey].c = d;
Events[hashKey].d = e_;
Events[hashKey].e = a;
Events[hashKey].f = f;
Events[hashKey].g = g;
}
return hashKey;
}
function closeMarketMaker(uint marketID) {
if (MarketMakers[marketID].linkedAddr != msg.sender) return;
uint eID = MarketMakers[marketID].b_param;
for (uint8 i = 1; i <= Events[eID].b; i++) {
Unknown6[uint(msg.sender)][eID][i] += MarketMakers[marketID].shares[i];
MarketMakers[marketID].shares[i] = 0;
}
}
function redeemWinnings(uint marketID) {
Event ev = Events[marketID];
uint16 winning = Oracle(ev.d).getWinningOutcome(marketID);
if (winning == 0) return;
if (ev.f != 1) return;
if (ev.e == 0) return;
Unknown6[uint(msg.sender)][ev.e][ev.a] +=
Unknown6[uint(msg.sender)][marketID][winning];
Unknown6[uint(msg.sender)][marketID][winning] = 0;
}
}