This contract implements the voting contract interface (via voting_query
), it allows a DAO to use
multiple voting contracts with different weightings. For example my DAO has a core-team which is a cw4-voting
and the rest of the community via the DAOs token cw20-staked-balance-voting
. We would like the core team to
hold enough power to get the vote most of the way, however the community can always reject the core team. Lets model
this using a 49%, 51% model, where the community has 51%.
This would be stored in the contract as:
cw20-staked-balance-voting-address
-> 0.51
cw4-voting
-> 0.49
The powers will now need to be weighted accordingly:
Our cw4-group
has a total weight of 2, (assume 2 members with 1 weight each).
Our cw20
has a total weight of 100, (assume 100 tokens to 2 people).
We can achieve this using percentages of each contracts VP, shown in the example below:
There are two token holders, one holds 10, one holds 90. (Total 100)
Token Holder A % vote share = 10 / 100 = 10% = 0.1
Token Holder B % vote share = 90 / 100 = 90% = 0.9
Now we can apply the weights (51% to the token):
10% * 51% = 5.1% (this is their multi-voting power) 90% * 51% = 45.9%
Their total should come to 51%
5.1% + 45.9% = 51%
Now we can do the same for the multisig, lets assume two multisig members with 1 weight each:
Multisig Member A % vote share = 1 / 2 = 50% = 0.5
Multisig Member B % vote share = 1 / 2 = 50% = 0.5
Now we can apply the weights (49% to the multisig)
50% * 49% = 24.5% 50% * 49% = 24.5%
Their total should come to 49%
24.5% + 24.5% = 49%
These totals give us our 100% voting power:
51% + 49% = 100%
This will probably need an accuracy factor such as 2^6
to multiply the numerators by to ensure we dont drop fractional votes.