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
A malicious account could deposit any ERC20 tokens they want into bounty with the amount of 1 wei. If they deposit number of tokens equal TOKEN_ADDRESS_LIMIT, the bounty will not accept any valid tokens from the issuer.
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
ast3ros
medium
[M-02] receivingFunds is subjected to DDOS attacks
Summary
When receiving funds, the
receivingFunds
function allow maximum of not-yet-whitelist tokens to be deposited into the bounty.https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/DepositManager/Implementations/DepositManagerV1.sol#L45-L50
A malicious account could deposit any ERC20 tokens they want into bounty with the amount of 1 wei. If they deposit number of tokens equal
TOKEN_ADDRESS_LIMIT
, the bounty will not accept any valid tokens from the issuer.Vulnerability Details
The
receivingFunds
function accept any ERC20 tokens and record it totokenAddresses
set.https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/DepositManager/Implementations/DepositManagerV1.sol#L45-L50
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/BountyCore.sol#L55
The length of the
tokenAddresses
set can be manipulated by any external account.Impact
TOKEN_ADDRESS_LIMIT
.tokenAddresses
set is higher.Code Snippet
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/DepositManager/Implementations/DepositManagerV1.sol#L45-L50
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/BountyCore.sol#L55
Tool used
Manual
Recommendation
Allow issuers to whitelist token address for their own bounty. The bounty only receives funds using whitelist tokens
Duplicate of #530
The text was updated successfully, but these errors were encountered: