DA0-DA0 / dao-contracts

CosmWasm smart contracts for Interchain DAOs.
https://docs.daodao.zone
BSD 3-Clause "New" or "Revised" License
202 stars 132 forks source link

Voting module aggregator #803

Open NoahSaso opened 4 months ago

NoahSaso commented 4 months ago

DAOs may want to derive voting power from multiple different sources. Maybe they want both token and NFT governance tokens, or consistent members and fluid token membership, or two different token types. All of these should be possible.

To accomplish this, we need to create a voting module that allows for the registration of other voting modules—essentially a voting module aggregator. This is similar to Neutron's voting registry.

The DAO needs to be able to register a set of voting modules on creation, as well as be able to add and remove existing voting modules. All voting modules should be removable except when there is only one remaining.

Additionally, each voting module should have a weight so that voting modules can be equal or weighted differently. This configuration should be updatable. Weights should be able to be set to 0 so that voting modules can be disabled.

We must validate that at least one voting module has non-zero weight on creation, when updating any weights, and when removing any voting modules.

NoahSaso commented 1 week ago

original spec from @Callum-A:

https://gist.github.com/Callum-A/53319b415246a89cade7e656fc8ff01d

we may need an accuracy factor if doing weightings: image