Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Delegated Voting in pallet_dao_token #118

Open
8 tasks
deep-ink-ventures opened this issue Aug 2, 2023 · 2 comments
Open
8 tasks

Implement Delegated Voting in pallet_dao_token #118

deep-ink-ventures opened this issue Aug 2, 2023 · 2 comments

Comments

@deep-ink-ventures
Copy link
Owner

deep-ink-ventures commented Aug 2, 2023

Description

Objective

To introduce a delegated voting mechanism in pallet_dao_token. DAO token holders should be able to delegate their voting power to another account. This delegation should be forward-looking, meaning it should not affect old checkpoints or currently running proposals.

Requirements

  1. Create an Extrinsic to Delegate Voting Power: This extrinsic should write a new checkpoint for the caller, setting their voting power to 0, and another checkpoint for the delegate, adding the caller's voting power to them.
  2. Handle Voting Power During Transfers and Other Actions: When a transfer or any other action that affects voting power occurs, update the delegate's voting power in a new checkpoint. Do not write a new checkpoint for the original user.
  3. Create an Extrinsic to Remove the Delegate: This extrinsic should write a new checkpoint for the original user with their current balance and another checkpoint for the delegate with the reduced voting power.

Note: The implementation should not increase the maximum number of possible checkpoints per user.

Tasks

Implementation Phase

  • Implement the extrinsic for delegating voting power.
  • Implement logic to update the delegate's voting power during transfers and other actions.
  • Implement the extrinsic for removing the delegate.

Testing Phase

  • Unit tests for delegating voting power.
  • Unit tests for updating delegate's voting power during transfers and other actions.
  • Unit tests for removing the delegate.

Documentation Phase

  • Write inline code documentation.
  • Update user guide to include delegated voting features.
@deep-ink-ventures deep-ink-ventures changed the title Ink! Delegated Council Voting for Streamlined and Expert DAO Governance Delegated Council Voting for Streamlined and Expert DAO Governance Sep 11, 2023
@deep-ink-ventures deep-ink-ventures changed the title Delegated Council Voting for Streamlined and Expert DAO Governance Implement Delegated Voting in pallet_dao_token Sep 11, 2023
@sudipghimire533
Copy link
Contributor

In addition we also have to have following changes in pallet_asset.

[ ] Currently while storing AccountHistory we are only storing the balance. If this change is to made without extra storage we have to add another field stating weather it is delegated or not. if so from whom.

@deep-ink-ventures
Copy link
Owner Author

WIP added for tests to work again. Not prod ready yet/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants