When an issuer of a tiered fixed bounty wants to set funding goal, TieredFixedBountyV1.setFundingGoal also changes payoutTokenAddress. (TieredFixedBountyV1.sol#L123-L133)
So if payoutTokenAddress is changed during setting a funding goal, the issuer can be confused and payoutTokenAddress can be set to a wrong token by setFundingGoal.
If payoutTokenAddress is set to a wrong token, claimers can't claim their payouts.
Impact
Claimers can't claim their payouts when payoutTokenAddress is set to a wrong token.
XKET
medium
TieredFixedBountyV1.setFundingGoal
changespayoutTokenAddress
Summary
Vulnerability Detail
When an issuer of a tiered fixed bounty wants to set funding goal,
TieredFixedBountyV1.setFundingGoal
also changespayoutTokenAddress
. (TieredFixedBountyV1.sol#L123-L133)The
payoutTokenAddress
is changed duringsetPayoutScheduleFixed
. (TieredFixedBountyV1.sol#L138-L147)So if
payoutTokenAddress
is changed during setting a funding goal, the issuer can be confused andpayoutTokenAddress
can be set to a wrong token bysetFundingGoal
. IfpayoutTokenAddress
is set to a wrong token, claimers can't claim their payouts.Impact
Claimers can't claim their payouts when
payoutTokenAddress
is set to a wrong token.Code Snippet
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/TieredFixedBountyV1.sol#L123-L133
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/TieredFixedBountyV1.sol#L138-L147
Tool used
Manual Review
Recommendation
Don't update
payoutTokenAddress
inTieredFixedBountyV1.setFundingGoal
Duplicate of #519