Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

Reward logic issues in claimReeward() function

Vulnerability Details

If the balance of the vault contract is low, it might not be able to cover the entire amount calculated for distribution. In such a scenario, the code reduces tokenToDistribute to the balance of the token held by the vault contract, potentially resulting in users receiving fewer tokens than expected.

For example, if the value of

uint256 tokenAmountToDistribute = (numberOfDaysInCouple *
10 ** loveToken.decimals()) - amountAlreadyClaimed;

is 100 and the

loveToken.balanceOf(address(airdropVault)

is 50

In this case, user will only get 50 tokens instead of 100

Impact

If the airdrop vault balance is low, users may receive fewer tokens than they are entitled to.

Tools Used

Manual

Recommendations

It is recommended to add a conditional statements to verify the availability of tokens and adjusting the distribution process accordingly.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.