This repository has been archived by the owner on May 26, 2023. It is now read-only.
GimelSec - bountyIsClaimable()
should revert when the bounty is invalid
#500
Labels
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
Non-Reward
This issue will not receive a payout
GimelSec
medium
bountyIsClaimable()
should revert when the bounty is invalidSummary
bountyIsClaimable()
should revert when the bounty is invalid.Vulnerability Detail
bountyIsClaimable()
checks if bounty associated with_bountyAddress
is open:A valid bounty should be minted by
OpenQV1
. ButbountyIsClaimable()
doesn't check if the_bountyAddress
exists inOpenQV1.bountyIdToAddress
. It means that users may get an invalid result from a malicious bounty contract which is not created fromOpenQV1
.Furthermore, a valid bounty should have a valid bounty type
[ATOMIC, ONGOING, TIERED_PERCENTAGE, TIERED_FIXED]
, else thebountyIsClaimable()
should always returnfalse
or revert the transaction.Impact
Users will get a wrong result from
bountyIsClaimable()
, users may also suffer from phishing attacks due to a malicious bounty contract.Code Snippet
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/ClaimManager/Implementations/ClaimManagerV1.sol#L345
Tool used
Manual Review
Recommendation
Check
OpenQV1.bountyIdToAddress
and revert in invalid bounty type.Duplicate of #386
The text was updated successfully, but these errors were encountered: