CarmineOptions / konoha

A toolkit for DAO-like governance on Starknet
Apache License 2.0
29 stars 41 forks source link

Update delegation to work with linear decay based staking #124

Open tensojka opened 1 month ago

tensojka commented 1 month ago

Currently, delegation doesn't work with staking at all. It needs to be redone to work with the new linear decay based staking (#113).

When counting adjusted voting power, votes from people who delegated to the voter should be counted too.

The adjusted voting power (including delegated votes) should be counted in such a way to not depend on the total number of people who delegated to the voter. (O(1) not O(n))

You should also have decreased voting power if you delegated your voting power.

Double-counting votes when undelegating should not be possible. (Once, the person you delegated to votes, then you undelegate, then you vote – the second vote should fail and vice versa.)

EjembiEmmanuel commented 1 month ago

@tensojka can I work on this?

djeck1432 commented 1 month ago

@tensojka I would like to work on this issue

onlydustapp[bot] commented 1 month ago

Hey @djeck1432! Thanks for showing interest. We've created an application for you to contribute to Konoha. Go check it out on OnlyDust!

tensojka commented 1 month ago

Assigned to @djeck1432 who requested this issue earlier, sorry @EjembiEmmanuel .