Back to Home

Crowdsale

Utility
0x880b1c7d098d...c3bcfcfb6830
Tangerine WhistleContract #25KSource VerifiedEdit this contract
Deployed November 11, 2016 (9 years ago)Block 2,606,533

The ethereum.org crowdsale tutorial: contributions run to a deadline against a goal, pay out a separate reward token, and are refunded if the goal is missed.

Tangerine Whistle EraVerified Source

Historical Significance

The ethereum.org crowdsale tutorial was the worked example most token sales of the period started from, and its shape, a deadline, a goal, a fixed price and a refund if the goal is missed, is the one the sales of the following two years repeated. The flaws are instructive too: unchecked send() calls and an unbounded refund loop are exactly the failures auditors spent the next years writing up.

Context

By 2016 the ethereum.org tutorial had been rewritten around the transfer interface that ERC-20 was standardising, and its crowdsale took its funding goal and token price in whole ether rather than wei. Copies of it went on chain steadily through the year, most of them as trials with short deadlines and small goals rather than as real sales.

Key Facts
Deployment Block
2,606,533
Deployment Date
Nov 11, 2016, 03:06 PM
Code Size
1.1 KB
Gas at Deploy
458,391

Description

The crowdfunding contract from the ethereum.org tutorial. Its constructor fixes the beneficiary, the funding goal in whole ether, the length of the campaign in minutes, the price of one reward token in whole ether, and the token contract that pays contributors. None of them can be changed afterwards.

Contributions arrive through the fallback function, which records the sender and amount in a public funders array and calls transfer on the reward token for the amount divided by the price. After the deadline anyone may call checkGoalReached(): if the goal was met the balance is sent to the beneficiary, otherwise the contract loops over the funders and refunds them, and in both cases whatever remains is swept to the beneficiary and the sale is marked closed.

The reward tokens must already be held by this contract when the sale opens, and nothing checks that they are. The refund loop is unbounded and no send() return value is checked, so a campaign with many contributors can leave funds it cannot pay out.

This one pays 0x82976773868b3d7275006afce3893a7947560e00 on success. It was opened with a goal of 200000 ether, a window of 400000 minutes, and a price of 1 ether for one token, handing out the token at 0x82976773868b3d7275006afce3893a7947560e00.

Heuristic Analysis

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

Detected Type: Utility
Has ERC-20-like patterns

Bytecode Overview

Opcodes1,084
Unique Opcodes133
Jump Instructions64
Storage Operations37

External Links

Related contracts