1Hive / conviction-voting-app

Aragon app used to collectively allocate funds from a shared treasury πŸ’§
93 stars 32 forks source link
aragon aragon-app conviction-voting ethereum-dapp

Conviction Voting

1Hive's Conviction Voting app is used to allocate funds on proposals based on the conviction an entire organization has on them. Conviction can be signaled by staking organization tokens on proposals, and it is not fully activated until a certain period of time has passed.

🐲 Project Stage: Complete

The Conviction Voting app has been published to open.aragonpm.eth. If you experience any issues or are interested in contributing please see review our open issues.

🚨 Security Review Status: pre-audit

The code in this repository has not been audited.

How to run Conviction Voting app locally

The Conviction Voting template requires the use of 1Hive's Tokens app, so please follow the instructions in the README to deploy the app in the local devchain. Many devchains can coexist in the same computer, make sure you are deploying the Tokens app in the same devchain that is going to be deployed Conviction Voting.

To use the Conviction Voting application, you can simply do:

npm install
npm start # It actually starts `npm run start:ipfs:run`

If everything is working correctly, your new DAO will be deployed and your browser will open http://localhost:3000/#/YOUR-DAO-ADDRESS. It should look something like this:

Deployed DAO with conviction voting app

NOTE: What the script npm run start:ipfs:run does is running npm run start:ipfs:template, kill the devchain, and reinitiate it with a block time of 15s, so we can see conviction growing over time.

How to deploy Conviction Voting to an organization

Conviction Voting has been published to APM on Rinkeby at conviction-voting.open.aragonpm.eth.

A newer version with the latest functionality is available at conviction-beta.open.aragonpm.eth

To deploy an organization you can use the Aragon CLI.

aragon dao install <dao-addr> conviction-voting.open.aragonpm.eth --app-init-args <org-token> <vault-addr> <funds-token> 9999599 2000000 20000 200000000000000000

This are the initalization parameters you can use:

Once the app has been installed, we can create permissions for anybody to create proposals on conviction voting, and for conviction voting to transfer funds from the vault/agent:

aragon dao acl create <dao-addr> <conviction-voting-app> CREATE_PROPOSALS_ROLE 0xffffffffffffffffffffffffffffffffffffffff <voting-app>
aragon dao acl create <dao-addr> <vault-app> TRANSFER_ROLE <conviction-voting-app> <voting-app>

Background

The process of allocating funds in DAOs that are being used today feels very clunky, typically requiring a series of yes/no votes evaluated independently. These organizations also suffer from a number of challenges like 51% attacks, low participation, and overall inability to effectively prioritize and decide when there are many potential options all competing for consideration at once.

Conviction voting as proposed by Commons Stack and Block Science provides an interesting solution, that feels more organic and DAO-like than other methods we have seen proposed.

Our implementation of Conviction Voting as an Aragon application is intended to be used to collectively allocate funds from a shared treasury, or to signal priorities when used over proposals without money allocation.

Proposals can be submitted for consideration at any time and do not have an explicit expiration.

A user can vote for a single proposal at a time, when they do their token-weighted balance adds conviction to that proposal. In this way we can think of voting for a proposal a bit like the emission of a signal directed towards a specific proposal, when the signal is moved it takes time to fully arrive on the new proposal, and at same time the remnants of the signal can still be felt at the previous proposal for some time after the source of the signal has been redirected.

Proposals can be executed only if there is enough accumulated conviction. The threshold at which a proposal can be execute is dependent on the proportion of the funds requested relative to the available funds in the shared treasury. This relationship between the funds requested and available funds means that the threshold at which a proposal can be executed depends on the state of the system at any given time. As proposals pass and remove funds from the treasury, the remaining proposals will become harder to pass (because they now represent a larger proportion of the shared treasury), conversely, as new funds are added to the share treasury the threshold for passing existing proposals will decrease. This provides some natural self regulation to the spending rate of the organization relative to its income.

The time based accumulation forces voters to prioritize where they place their conviction and may encourage members to more effectively converge on a mutually acceptable compromise to most effectively leverage their influence on the DAOs fund allocations.

Structure

This app has the following structure:

root
β”œβ”€β”€ app
β”œ β”œβ”€β”€ src
β”œ └── package.json
β”œβ”€β”€ contracts
β”œ β”œβ”€β”€ ConvictionVoting.sol
β”œ └── Template.sol
β”œβ”€β”€ migration
β”œβ”€β”€ test
β”œβ”€β”€ arapp.json
β”œβ”€β”€ manifest.json
β”œβ”€β”€ truffle.js
└── package.json

Contributing

We welcome community contributions!

Please check out our open Issues to get started.

If you discover something that could potentially impact security, please notify us immediately. The quickest way to reach us is via the #conviction-voting channel in our team Keybase chat. Just say hi and that you discovered a potential security vulnerability and we'll DM you to discuss details.

Contributors

Thanks goes to these wonderful people (emoji key):


Luke Duncan

πŸ” πŸ€” πŸ“†

Patricia Davila

🎨 πŸ€”

David Llop

πŸ’» πŸ€” πŸ›‘οΈ

Yalda Mousavinia

πŸ€”

Deam

πŸ’»

Fabrizio Vigevani

πŸ’» πŸ›‘οΈ

Javier Alaves

🎨

Viviane Dias

πŸ’»

Sabaun Taraki

⚠️

The Commons Stack

πŸ“ πŸ€” πŸ”§

1Hive

πŸ’΅ πŸš‡

Aragon

πŸ’΅

P2P Models

πŸš‡

fioreb

🎨

Paulo J. Colombo

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!