-
Notifications
You must be signed in to change notification settings - Fork 4
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
PartyGovernanceNFT#decreaseTotalVotingPower()
- Incorrect logic for setting totalVotingPower
#120
Comments
Authority( Invalid |
ydspa marked the issue as insufficient quality report |
gzeon-c4 marked the issue as unsatisfactory: |
Hi, @gzeon-c4. Thank you for the quick judging!
Please review my report again. |
It is judged as invalid / out-of-scope due to https://github.com/code-423n4/2023-10-party/blob/b23c65d62a20921c709582b0b76b387f2bb9ebb5/README.md?plain=1#L93
And the only supplied authority implementation is not vulnerable. |
My report is not about malicious authorities. My report is about how Also, the attack described in #414 comes from the fact that the |
Hey, @gzeon-c4! Would really appreciate if you take look at my comment above. |
According to the scope of this contest, I deemed that Authority contracts are expected to be audited so that they will not cause unintentional immediate or delayed side-effect. |
Lines of code
https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L255-L258
Vulnerability details
Impact
mintedVotingPower
will become larger thantotalVotingSupply
in the Party leading to many errors like:Party
PartyGovernanceNFT.sol#mint()
)Explanation
The
decreaseTotalVotingPower()
function is responsible for decreasing thetotal voting power
of the party.Proof of Concept
The problem is that the
decreaseTotalVotingPower()
function does not enforce any checks that theParty
newtotalVotingPower' is less than the actual
mintedVotingPower, which leads to a lot of errors in
Party` contract behavior.Coded Proof of Concept
Paste the following test in
PartyGovernanceNFTTest
:Tools Used
Recommended Mitigation Steps
Implement
decreaseTotalVotingPower()
function like this:Assessed type
Error
The text was updated successfully, but these errors were encountered: