-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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
- 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.
- 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.
- 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.
Metadata
Metadata
Assignees
Labels
No labels