-
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
The users may front-run the authorities by calling rageQuit() #172
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-545
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
c4-submissions
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
Nov 9, 2023
c4-submissions
added a commit
that referenced
this issue
Nov 9, 2023
authority typically a smart contract( Invalid: Insufficient proof with in scope context |
c4-pre-sort
added
the
insufficient quality report
This report is not of sufficient quality
label
Nov 12, 2023
ydspa marked the issue as insufficient quality report |
|
c4-judge
added
the
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
label
Nov 19, 2023
gzeon-c4 marked the issue as unsatisfactory: |
gzeon-c4 marked the issue as duplicate of #545 |
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-545
insufficient quality report
This report is not of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L344
Vulnerability details
Impact
In
PartyGovernanceNFT.sol
, there is a function calleddecreaseVotingPower()
and it allows to decrease thevotingPower
of a certain tokenId. It can only be called by the authorities. The problem is that therageQuit()
function can be called by anyone who holds the tokenId with votingPower and the users may avoid decreasing theirvotingPower
if they see the authorities's transaction to do so. The transaction, in its turn, will revert due to underflow as thevotingPower
that the tokenId holds will be updated after burning the tokenId.Proof of Concept
votingPower
and they calldecreaseVotingPower()
function.rageQuit()
so his tokenId will be burnt and the money will be withdrawn:https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L401
https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L236-242
Tools Used
Manual review.
Recommended Mitigation Steps
Transaction to
decreaseVotingPower()
should be executed via private mempool.Assessed type
Other
The text was updated successfully, but these errors were encountered: