Back to Home

Association

Utility
0x96cd538ff3af...90726104d65b
HomesteadContract #20KSource VerifiedEdit this contract
Deployed June 28, 2016 (10 years ago)Block 1,788,513

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.

Homestead EraVerified Source

Historical Significance

This is the pattern The DAO was built on, reduced to something one person could deploy: votes weighted by a token balance, a fixed debating period, and a passing proposal that executes as a raw call from the treasury. The tutorial also shows the defence that mattered, committing to a hash of the transaction when the proposal opens so that voters and executor cannot be shown different code. Weighing votes at execution time rather than at voting time is the flaw it kept: a voter can sell their shares and their vote still counts.

Context

Deployed at the end of June 2016, days after The DAO was drained, when the ethereum.org democracy tutorial was still the worked example anyone starting a small onchain organisation copied from.

Key Facts
Deployment Block
1,788,513
Deployment Date
Jun 28, 2016, 10:51 PM
Code Size
3.5 KB
Gas at Deploy
1,115,169

Description

The democracy contract from the ethereum.org tutorial: an association whose members are whoever holds a balance in a separate shares contract, and whose decisions are transactions the association itself sends.

Any holder may open a proposal naming a recipient, an amount in whole ether, a description and the bytecode of the transaction to send. What is stored is a hash of the recipient, the amount and that bytecode, so the exact transaction being voted on is committed in advance and cannot be swapped afterwards. Holders vote for or against until the debating period expires, one vote each.

After the deadline anyone may execute the proposal, supplying the bytecode again for the contract to check against the stored hash. Votes are weighed by the balance each voter holds at that moment rather than when they voted, and the tally has to clear a minimum quorum before it counts.

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

Opcodes3,609
Unique Opcodes200
Jump Instructions148
Storage Operations108

External Links

Related contracts