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` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Attacker can block funding for OngoingBounty if paymentTokenAddress is non-whitelisted
Summary
In an OngoingBountyV1 type, the bounty issuer decides the payment token, and the bounty winner has only access to the payment in payoutTokenAddress. However a malicious user can block funding for payoutTokenAddress if it is not whitelisted in TokenWhitelist by funding with dust in multiple other non whitelisted tokens to reach openQTokenWhitelist.TOKEN_ADDRESS_LIMIT().
Vulnerability Detail
Impact
Funding in not-whitelisted payoutTokenAddress is blocked rendering the bounty Useless. A new bounty has to be created.
Code Snippet
Tool used
Manual Review
Recommendation
Add the payoutTokenAddress to the list of tokenAddresses in BountyCore, on creation of an OngoingBounty
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` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
cergyk
medium
Attacker can block funding for OngoingBounty if paymentTokenAddress is non-whitelisted
Summary
In an OngoingBountyV1 type, the bounty issuer decides the payment token, and the bounty winner has only access to the payment in
payoutTokenAddress
. However a malicious user can block funding forpayoutTokenAddress
if it is not whitelisted inTokenWhitelist
by funding with dust in multiple other non whitelisted tokens to reachopenQTokenWhitelist.TOKEN_ADDRESS_LIMIT()
.Vulnerability Detail
Impact
Funding in not-whitelisted payoutTokenAddress is blocked rendering the bounty Useless. A new bounty has to be created.
Code Snippet
Tool used
Manual Review
Recommendation
Add the
payoutTokenAddress
to the list oftokenAddresses
in BountyCore, on creation of anOngoingBounty
the adding can be done in the initialization of the bounty:
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/OngoingBountyV1.sol#L89
Duplicate of #530
The text was updated successfully, but these errors were encountered: