Auditor
Smart Contract Engineer
Security Engineer
Solidity
refundDeposit
between tiers claimsrefundDeposit
can be called between tiers claims which will result in last claimants not receiving their rewards.TieredPercentageBountyV1
bounty 1000 USDC and with payoutSchedule == [50,30,20]
. When claimants have validated their obligation, they will be able to call permissionedClaimTieredBounty
. Consider the following scenario:permissionedClaimTieredBounty
and together claim 50% of the available USDC or 500 USDC.permissionedClaimTieredBounty
which will revert because in TieredPercentageBountyV1
, claimTiered
will call _transferToken
with 500 USDC as claimedBalance
.refundDeposit
between tiers claims. Winners of a competition will not get their rewards.refundDeposit
function can be called by funder after the end of a competition. Therefore, I recommend to stop refunds after the closing of a competition by using require(status == OpenQDefinitions.OPEN, Errors.CONTRACT_IS_CLOSED);
in BountyCore.refundDeposit
.
With this added, if nobody claims the rewards the funds would be locked in the contract. Thus, I additionally recommend adding a permissioned function for the bounty issuer to retrieve funds if necessary when the bounty is closed.Posted Jul 12, 2023
OpenQ Sherlock's contest: Funders can deny rewards to last claimants by calling refundDeposit between tiers claims
0
18
Auditor
Smart Contract Engineer
Security Engineer
Solidity