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

Rounding errors can lead to wrong voting power #255

Closed
code423n4 opened this issue Sep 19, 2022 · 1 comment
Closed

Rounding errors can lead to wrong voting power #255

code423n4 opened this issue Sep 19, 2022 · 1 comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists low quality report This report is of especially low quality

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/PartyDAO/party-contracts-c4/blob/3896577b8f0fa16cba129dc2867aba786b730c1b/contracts/crowdfund/Crowdfund.sol#L370-L375

Vulnerability details

Impact

The calculation of voting power in Crowdfund._getFinalContribution() can lead to loss of voting power due to rounding errors.

Tools Used

Manual audit

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Sep 19, 2022
code423n4 added a commit that referenced this issue Sep 19, 2022
@merklejerk merklejerk added duplicate This issue or pull request already exists low quality report This report is of especially low quality labels Sep 21, 2022
@merklejerk
Copy link
Collaborator

merklejerk commented Sep 21, 2022

Duplicate of #114

@merklejerk merklejerk marked this as a duplicate of #144 Sep 21, 2022
@merklejerk merklejerk marked this as a duplicate of #114 Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists low quality report This report is of especially low quality
Projects
None yet
Development

No branches or pull requests

2 participants