-
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
minAmount
is ignored when amount
is zero during rage quit
#469
Comments
QA: L |
ydspa marked the issue as insufficient quality report |
ydspa marked the issue as primary issue |
gzeon-c4 changed the severity to 2 (Med Risk) |
Potential value leak, no reason to ignore specified values. |
gzeon-c4 marked the issue as selected for report |
gzeon-c4 marked the issue as satisfactory |
gzeon-c4 marked the issue as not selected for report |
gzeon-c4 marked issue #237 as primary and marked this issue as a duplicate of 237 |
Lines of code
https://github.com/code-423n4/2023-10-party/blob/053fb9345b0739b3c26d12e1eae1eefbfd70b223/contracts/party/PartyGovernanceNFT.sol#L426-L432
Vulnerability details
During rage quit the rage quitter supplies a list of tokens to take a fair share of and the expected minimum amount out. If the share of any of the tokens is less than the minimum then the function reverts.
However, if the share is zero then the minimum amount is ignored and the function doesn't revert.
A user might be rage quitting during a proposal execution that empties out a token (e.g. the party is purchasing an NFT) expecting the function to revert if the proposal was executed already. But in that case the function wouldn't revert and the user would end up losing a part of their share.
Impact
Rage quitter might get less than the fair share they deserve
Proof of Concept
In the following code snippet it can be seen that the check is done only if
amount > 0
Recommended Mitigation Steps
In case that amount is zero - revert if the minimum amount is greater than zero
Assessed type
Other
The text was updated successfully, but these errors were encountered: