You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Feb 21, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
Depositors can refund their deposit at anytime causing insufficient balance for claims.
Vulnerability Detail
According to the natspec documentation and discussion with FlacoJones, closeCompetition() should “freezes the current funds for the competition.” This is not the case for depositor refunds. Depositors can refund their deposit at anytime. This is problematic because if a deposit is refunded after the competition has closed, there may not be enough tokens to fund the claims.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
ltyu
high
Deposits can be refunded after closing
Summary
Depositors can refund their deposit at anytime causing insufficient balance for claims.
Vulnerability Detail
According to the natspec documentation and discussion with FlacoJones,
closeCompetition()
should “freezes the current funds for the competition.” This is not the case for depositor refunds. Depositors can refund their deposit at anytime. This is problematic because if a deposit is refunded after the competition has closed, there may not be enough tokens to fund the claims.Impact
Code Snippet
This is the refund logic in all Bounty contracts. Notice that there are no restrictions in regards
status
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/BountyCore.sol#L64-L93
Proof of concept
Tool used
Manual Review
Recommendation
Consider validating if the competition has closed for deposit refunds.
Duplicate of #266
The text was updated successfully, but these errors were encountered: