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

Fix/early withdrawal manipulation #186

Conversation

dcrescimbeni
Copy link
Contributor

Relates to issue #167, and DXD-19 in the audit.

Users were allowed to decrease voting power for proposal execution by withdrawing their tokens after voting.

Added a new variable to Proposal struct: votingPowerForProposalExecution.

Now, the voting power is calculated at the time of proposal creation and stored. Then, when executing the proposal, voting power is read from the Proposal instead of calculated on the fly.

…ble to Proposal struct and modified logic for end proposal execution
@dcrescimbeni dcrescimbeni marked this pull request as ready for review June 24, 2022 13:46
@rossneilson
Copy link
Collaborator

I'm not sure this is the solution we want here. What we are essentially making is a half snapshot approach where the amount to execute is snapshotted but individual's voting power is not. This could lead to some bad behaviour as quorum will not scale on an active proposal.
I think Madusha's #187 fixes this in a better way and am a little surprised the audit suggested both solutions.

@AugustoL
Copy link
Member

Yes, I just saw that Madusha #187 fixes this. Closing the issue for now.

@AugustoL AugustoL closed this Jun 28, 2022
@dcrescimbeni dcrescimbeni deleted the fix/early-withdrawal-manipulation branch October 24, 2022 14:17
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.

3 participants