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

Bad balance check in Staking_deposit()

Summary

Vulnerability Details

In the function deposit() the line of code
‘if(loveToken.balanceOf(address(stakingVault)) = 0 ‘ makes not that much
sense.

Impact

This has not that much sense because imagine a situation when
stakingVault balance is not 0 but is lower than the amount deposited, this is
also obviously a possible bug.

Tools Used

Foundry

Recommendations

Check if stakingVault balance has that
‘amount’ of tokens deposited * 2

Updates

Lead Judging Commences

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

Support

FAQs

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