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

Bugfix/double voting bug #187

Merged

Conversation

mprasanjith
Copy link
Member

@mprasanjith mprasanjith commented Jun 24, 2022

Fixes #150 - DXD-02: Double-voting in BaseERC20Guild.

Previous behavior:
After locking tokens and voting on a proposal, a user could withdraw their tokens when their locking period ends, even if the voting hasn't finished. This way, it was possible for the tokens to be moved to a different wallet and used for voting again.

New behavior:
Whenever a user votes on a proposal, their token lock-time is extended to at least the end time of the voted proposal, preventing the attack.

Modified BaseERC20Guild.sol and added tests.

@mprasanjith mprasanjith requested review from AugustoL, rossneilson and a team June 24, 2022 18:57
@mprasanjith mprasanjith changed the base branch from main to develop June 24, 2022 18:57
@mprasanjith mprasanjith marked this pull request as ready for review June 24, 2022 18:57
@mprasanjith mprasanjith linked an issue Jun 28, 2022 that may be closed by this pull request
@mprasanjith mprasanjith merged commit ae35eda into DXgovernance:develop Jun 28, 2022
@mprasanjith mprasanjith deleted the bugfix/double-voting-bug branch June 28, 2022 16:18
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

Successfully merging this pull request may close these issues.

Double-voting in BaseERC20Guild
3 participants