Back to Home

Pyramid

Unknown
0x7011f3edc7fa...58174113b162
FrontierExact Bytecode Match
Deployed September 7, 2015 (10 years ago)Block 198,362

Classic 3:1 pyramid scheme with Bitcoin bridge integration, deployed September 7, 2015. 1 ETH to enter, 2.7 ETH payout every 3rd participant. Originally hosted...

Key Facts

Deployment Block
198,362
Deployment Date
Sep 7, 2015, 01:39 PM
Code Size
3.3 KB
Transactions by Year
2015175
2016695
201710
20182
20208
20223
20231
20256
20264

Description

EthereumPyramid was a classic 3:1 pyramid scheme deployed in September 2015, during Ethereum's early Frontier era. For every 1 ETH entry, the contract would pay 2.7 ETH (90% of 3 ETH) to the earliest waiting participant when every third new entry arrived. The remaining 10% went to collected fees.

What made this contract unusual was its Bitcoin bridge integration. Participants could optionally provide a Bitcoin address instead of an Ethereum address, and payouts would be routed through an on-chain BitcoinBridge contract (0x4d6387f3b967da39b11de111158d49754c31985d) for cross-chain settlement. This made it one of the earliest cross-chain payment contracts on Ethereum.

The contract collected 139 total participants. 69 ETH remains locked.

The contract was mislabeled as 'EtherLottery' in several academic smart contract analysis datasets. The original site was ethereumpyramid.com and the Solidity contract name is Pyramid.

Source Verified

SolidityExact bytecode match(3,409 bytes)
Compiler: soljson

Exact runtime (3,237 bytes) + creation (3,377 bytes + 32-byte constructor arg) match. soljson v0.1.1, optimizer disabled.

Heuristic Analysis

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

Detected Type: Unknown

Frontier Era

The initial release of Ethereum. A bare-bones implementation for technical users.

Block span: 01,149,999
July 30, 2015March 14, 2016

Bytecode Overview

Opcodes3,409
Unique Opcodes173
Jump Instructions142
Storage Operations88

Verified Source Available

Source verified through compiler archaeology and exact bytecode matching.

View Verification Proof
Show source code (Solidity)
contract Pyramid {
    enum PayoutType { Ether, Bitcoin }

    struct Participant {
        PayoutType payoutType;
        bytes desc;
        address etherAddress;
        bytes bitcoinAddress;
    }

    Participant[] public participants;

    uint public payoutIdx = 0;
    uint public collectedFees;

    address public owner;
    address public bitcoinBridge;

    // used later to restrict some methods
    modifier onlyowner { if (msg.sender == owner) _ }

    // events make it easier to interface with the contract
    event NewParticipant(uint indexed idx);

    function Pyramid(address _bitcoinBridge) {
        owner = msg.sender;
        bitcoinBridge = _bitcoinBridge;
    }

    // fallback function - simple transactions trigger this
    function() {
        enter(msg.data, '');
    }

    function enter(bytes desc, bytes bitcoinAddress) {
        if (msg.value < 1 ether) {
            msg.sender.send(msg.value);
            return;
        }

        if (desc.length > 16 || bitcoinAddress.length > 35) {
            msg.sender.send(msg.value);
            return;
        }

        if (msg.value > 1 ether) {
            msg.sender.send(msg.value - 1 ether);
        }

        uint idx = participants.length;
        participants.length += 1;
        participants[idx].desc = desc;
        if (bitcoinAddress.length > 0) {
            participants[idx].payoutType = PayoutType.Bitcoin;
            participants[idx].bitcoinAddress = bitcoinAddress;
        } else {
            participants[idx].payoutType = PayoutType.Ether;
            participants[idx].etherAddress = msg.sender;
        }

        NewParticipant(idx);

        if (idx != 0) {
            collectedFees += 100 finney;
        } else {
            // first participant has no one above them,
            // so it goes all to fees
            collectedFees += 1 ether;
        }

        // for every three new participants we can
        // pay out to an earlier participant
        if (idx != 0 && idx % 3 == 0) {
            // payout is triple, minus 10 % fee
            uint amount = 3 ether - 300 finney;

            if (participants[payoutIdx].payoutType == PayoutType.Ether) {
                participants[payoutIdx].etherAddress.send(amount);
            } else {
                BitcoinBridge(bitcoinBridge).queuePayment.value(amount)(participants[payoutIdx].bitcoinAddress);
            }

            payoutIdx += 1;
        }
    }

    function getNumberOfParticipants() constant returns (uint n) {
        return participants.length;
    }

    function collectFees(address recipient) onlyowner {
        if (collectedFees == 0) return;

        recipient.send(collectedFees);
        collectedFees = 0;
    }

    function setBitcoinBridge(address _bitcoinBridge) onlyowner {
        bitcoinBridge = _bitcoinBridge;
    }

    function setOwner(address _owner) onlyowner {
        owner = _owner;
    }
}

contract BitcoinBridge {
    function queuePayment(bytes bitcoinAddress) returns(bool successful);
}

External Links