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.
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
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.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
External Links
Related contracts
Contract 0xd6e5d4...60945d
Same deployerThe ethereum.org democracy tutorial: token holders propose a transaction, vote on it for a fixed period, and the contract sends it if it passes.
0xd6e5d4...60945dDecember 8, 2015Greeter
Same eraA HelloWorld greeter deployed at block 51,909 on 8 August 2015, one of a run of contracts from the same account that week.
0x412fda...7267edAugust 8, 2015Greeter
Same eraA Greeter with the message 'Ethereum will change the world smarter' - deployed Aug 8, 2015 by a developer connected to the Tokyo Smart Contract meetup.
0xda0c1c...7a68ebAugust 8, 2015MessageStore
Same eraA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015Greeter
Same eraThe go-ethereum Contract Tutorial greeter, deployed with the greeting: Hello World!
0x506f4b...466983August 8, 2015Contract 0xd4eae4...a2c77a
Same eraThe ethereum.org crowdsale tutorial, deployed on the ninth day of the public chain, with the funding goal, deadline and price fixed at construction.
0xd4eae4...a2c77aAugust 8, 2015