Back to Home

Contract 0xec99a35dc3cf...2550ac10cb44

Utility
0xec99a35dc3cf...2550ac10cb44
FrontierContract #5,139DecompiledEdit this contract
Deployed December 14, 2015 (10 years ago)Block 688,981

The ethereum.org democracy tutorial: token holders propose a transaction, vote on it for a fixed period, and the contract sends it if it passes.

Frontier Era

Historical Significance

The revision of the tutorial that introduced committing to a hash of the transaction when the proposal opens, so voters and executor cannot be shown different code. It is the pattern The DAO was built on at a scale one person could deploy, and it kept the flaw that votes are weighed when the proposal is executed rather than when they were cast.

Context

The democracy tutorial sat on ethereum.org beside the token and crowdsale tutorials and was rewritten repeatedly. This revision is from the winter of 2015 and 2016, months before The DAO opened, when a shareholder-voted treasury was still a page in a tutorial rather than something with a hundred and fifty million dollars in it.

Key Facts
Deployment Block
688,981
Deployment Date
Dec 14, 2015, 05:05 AM
Code Size
3.6 KB
Gas at Deploy
1,012,661
Transactions by Year
201516

Description

The democracy contract from the ethereum.org tutorial, in its December 2015 form. Members are whoever holds a balance in a separate shares token, whose address, along with a minimum quorum and a debating period in minutes, is fixed when the contract is deployed.

A shareholder opens a proposal naming a recipient, an amount and a description, and the contract stores a hash of the transaction that would be sent, so the exact call being voted on is committed before voting starts. Shareholders vote for or against until the deadline, one vote each. After it passes anyone may execute the proposal by supplying the transaction again for the contract to check against the stored hash; votes are weighed by the balance each voter holds at that moment, and the total has to clear the quorum before the result counts.

Heuristic Analysis

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

Detected Type: Utility

Bytecode Overview

Opcodes3,662
Unique Opcodes187
Jump Instructions133
Storage Operations102

External Links

Related contracts