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

kiki_dev - Token Address Limit can be reached by sending dust amounts of junk tokens. #307

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

kiki_dev

medium

Token Address Limit can be reached by sending dust amounts of junk tokens.

Summary

Bad actor can prevent an issuer from funding a bounty with their desired token. Making the bounty unusable and protocol unusable.

Vulnerability Detail

After a bounty is minted anyone can contribute fuds to the bounty. When they do they need to go though the fundBountyToken(). There are two checks that occur in the begining of this process. The first checks if the _tokenAdress is not whitelisted. If true the following check is a requrie statement, requiring that tokenAddressLimitReached(_bountyAddress) is false.

This allows a bad actor to deposit x amount of junk tokens to the bounty thus reaching the limit and preventing the actual issuer from depositing their desired token.

Here is a scenario:

For simplicity sake lets say the token limit is 5.

Alice mints a bounty
Bob sees this transaction goes though and deposits 5 junk tokens with more or less zero value.
Alice tries to deposit her protocols Token $GODS as the bounty reward.
$GODS is not whitelisted so depositManager checks if the token limit has been reached. Which due to bobs intererance it has.
Alice can no longer fund her bounty with the desired token.
Alice attempts to create a new bounty
Bob does the same thing which prevents Alice from making a deposit again.
Alice determines that this protocol is unusable because she cant deposit her protocols token.

Impact

DOS will make the protocol unusable for some users that want to post bounties.

Code Snippet

https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/DepositManager/Implementations/DepositManagerV1.sol#L45-L48

Tool used

Manual Review

Recommendation

Either have their be a minimum deposit to make this attack to costly. Or allow issuer to always deposit at least 1 token.

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