Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

cergyk - Attacker can block funding for OngoingBounty if paymentTokenAddress is non-whitelisted #143

Closed
github-actions bot opened this issue Feb 21, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue

Comments

@github-actions
Copy link

github-actions bot commented Feb 21, 2023

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 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

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

@github-actions github-actions bot added Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue labels Feb 21, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A valid Medium severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant