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

Create strategy for OpenZeppelin ERC20Votes with individual override option #449

Closed
serenae-fansubs opened this issue Mar 8, 2022 · 0 comments

Comments

@serenae-fansubs
Copy link
Contributor

serenae-fansubs commented Mar 8, 2022

This strategy is similar to ERC-20 Votes, except that it also allows individual delegators to override their vote on a particular proposal if they wish. This is most useful for social (off-chain only) proposals.

If an account has any delegated voting power returned from getVotes, adds that value, minus the balances from any delegators that have also individually voted.

If an account is delegating to itself, then its own token balance will already be included in the getVotes return value.

If an account is delegating to a different valid address, adds the local token balance. The account must be delegated to another valid address, otherwise the local token balance will not be added.

Primarily for token contracts using OpenZeppelin's ERC20Votes: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Votes.sol

However the getVotes method can also be overridden in the options too if need be.

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