Possible that unanimous votes is unachievable
The voting power calculation rounds down for all users except the split recipient, which can cause the sum of individual voting powers to be less than the total contributions. This can prevent unanimous votes from being achieved, blocking proposals that require unanimous approval.
Submitted by Lambda, also found by CertoraInc
Impact
Currently, the votingPower calculation rounds down for every user except the splitRecipient. This can cause situations where 99.99% of votes (i.e., an unanimous vote) are not achieved, even if all vote in favor of a proposal. This can be very bad for a party, as certain proposals (transferring precious tokens out) require an unanimous vote and are therefore not executable.
Proof Of Concept
Let’s say for the sake of simplicity that 100 persons contribute 2 wei and splitBps is 10 (1%). votingPower for all users that contributed will be 1 and 2 for the splitRecipient, meaning the maximum achievable vote percentage is 102 / 200 = 51%.
Of course, this is an extreme example, but it shows that the current calculation can introduce siginificant rounding errors that impact the functionality of the protocol.
Recommended Mitigation Steps
Instead of requiring more than 99.99% of the votes, ensure that the individual votingPower sum to the total contribution. For instance, one user (e.g., the last one to claim) could receive all the remaining votingPower, which would require a running sum of the already claimed votingPower.
merklejerk (PartyDAO) acknowledged and commented:
We consider it highly unlikely that an NFT would be crowdfunded for dust amounts so we don’t think this would actually occur in the wild.
HardlyDifficult (judge) commented:
Rounding error could prevent unanimous votes.. agree with Medium risk.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the voting power is calculated by rounding down each user's share individually, and the sum of these rounded values can be less than the total contributions, so the required percentage for unanimous votes is not met.
Impact
This could prevent unanimous votes from being achieved, making certain proposals (such as transferring precious tokens out) non-executable.
What the attacker needed
Multiple contributors; rounding down of voting power; proposal requiring unanimous vote
The fix
The voting power calculation should be adjusted so that the sum of individual voting powers equals the total contributions, for example by giving any remaining voting power to the last user to claim.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When people contribute to a crowdfund, each person gets voting power based on their share. The code calculates this by rounding down, which can lose small fractions. If enough fractions are lost, the total voting power falls short of 100%, so even if everyone votes yes, the proposal might not pass when it needs unanimous approval.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.