-
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
A user can reach maxTotalContribution, finalize, and then withdraw via rageQuit in a single transaction, effectively making a just finalized party fundless. #534
Comments
Known issue: code-423n4/2023-04-party-findings#25 Invalid: OOS |
ydspa marked the issue as insufficient quality report |
gzeon-c4 marked the issue as unsatisfactory: |
This issue is not the same as code-423n4/2023-04-party-findings#25 In summary, this issue describes a griefing attack how a malicious user can use a flashloan to finalize a crowdfund, and withdraw the flashloan via ragequit. Consider this scenario:
This is not fair to the hosts as the crowdfund got finalized, but their Party funds is less than the minTotalContributions they had in mind. Looking at the sponsor's comment in the previous competition: "Looking into this more, the issue can only occur if a party sets an executionDelay of 0...". Please have a closer look. |
gzeon-c4 removed the grade |
gzeon-c4 changed the severity to QA (Quality Assurance) |
Agree this is a slightly different issue due to the introduction of rage quit. However, the impact is also significantly lower as the attacker can only perform a DOS and unable to steal additional fund from the party. Also this only works when rage quit is enabled on party creation. Downgrading to Low/QA @0xble |
Hi @gzeon-c4
Isn't this DOS significant enough to be a medium severity issue?
Please note that funds present in the Party before the finalization of the Crowdfund can also be stolen, because rageQuit transfers a pro rata amount of funds in the Party |
The Low risk judgement is a combination of Med impact (DOS), and Low likelihood (can be easily avoided by not allowing rage quit) |
Hello @gzeon-c4 , please take another look at this: #119 can be easily avoided by making #127 can also be easily avoided by making This issue can be easily avoided by disallowing ragequit, so I think they all have about same severity |
Fair, although #119 and #127 have higher impact due to fund would be temporarily stuck where as in this case funds are immediately released. There does not seems to be anything in the doc or codebase to suggest rageQuitTimestamp should not start with a nonzero value before finalizing and thus a valid DOS. @0xble |
This previously downgraded issue has been upgraded by gzeon-c4 |
1 similar comment
This previously downgraded issue has been upgraded by gzeon-c4 |
gzeon-c4 marked the issue as selected for report |
gzeon-c4 marked the issue as satisfactory |
gzeon-c4 marked the issue as primary issue |
@gzeon-c4 Even if someone used a flash loan and rage quit leaving the party with funds less than the goal.
For the 6 reasons listed, I don't think there is any reason to keep this as a med. |
Attacker's flashloan contribution will cause crowdfund to be finalized, so totalVotingPower will be updated
It obviously is a griefing attack, and not an expected behaviour. See example above
Some protocols offer free flashloans like dYdX
Correct. Cost of Attack is expensive due to rageQuit fee, Result is unprofitable griefing. Hence, does not qualify for Medium.
Enabling ragequit is a normal operation, so this alone is not enough to make this QA
Just like most other flashloan attacks, rich people can easily execute them, so this is not a valid point |
Hello @gzeon-c4 , Based on the point raised by @stalinMacias that there is a rageQuit fee, which makes the attack expensive + Impact is unprofitable griefing , I don't think this issue qualifies for a MEDIUM(Probably QA). I really appreciate your time and effort🙏 |
Thanks for the inputs! I do realize there is a fee, but if Downgrading this to Low but bumping the warden's overall QA report grade. |
gzeon-c4 changed the severity to QA (Quality Assurance) |
gzeon-c4 marked the issue as not selected for report |
Good points. Agree it should be a QA over Medium |
Lines of code
https://github.com/code-423n4/2023-10-party/blob/main/contracts/crowdfund/InitialETHCrowdfund.sol#L164
https://github.com/code-423n4/2023-10-party/blob/main/contracts/crowdfund/ETHCrowdfundBase.sol#L317
https://github.com/code-423n4/2023-10-party/blob/main/contracts/party/PartyGovernanceNFT.sol#L344
Vulnerability details
Impact
Malicious user can use a flashloan to finalize a crowdfund, and withdraw flashloan in a transaction, causing Party to immediately go bankrupt just after finalizing crowdfund.
Proof of Concept
In InitialETHCrowdfund, once total contributions reach maxTotalContribution, crowdfund gets finalized, and the funds get transferred to the Party. After this, no more conttributions will be accepted.
A malicious user can in a single transaction:
The effect of this is that the party will now be with very low or no funds just after it got finalized. This can be used to grief hosts as they will have to start another crowdfunding just after completing one.
Tools Used
Manual Review
Recommended Mitigation Steps
Consider implementing the following:
lastContributionTimestamp
should be updated after every contribution.Now, an account cannot contribute over maxContribution, and an attempt to contribute with multiple accounts in a single transaction will revert.
Assessed type
Other
The text was updated successfully, but these errors were encountered: