Back to Home

Contract 0x6960a6a7e95a...52ae6c8464a1

Utility
0x6960a6a7e95a...52ae6c8464a1
HomesteadContract #13KDecompiledEdit this contract
Deployed March 26, 2016 (10 years ago)Block 1,217,003

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 Era

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

Homestead arrived in March 2016 and the ethereum.org tutorials were rewritten around the transfer and balanceOf names that ERC-20 was standardising. Deploying a token or an organisation had become a matter of filling in constructor arguments, and most of what went on chain in this period is exactly that.

Key Facts
Deployment Block
1,217,003
Deployment Date
Mar 26, 2016, 02:04 AM
Code Size
3.5 KB
Gas at Deploy
1,083,781
Transactions by Year
20161

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,610
Unique Opcodes200
Jump Instructions145
Storage Operations106

External Links

Related contracts