20,000 USDC
View results
Submission Details
Severity: gas
Valid

Redundant checks in Staking.sol

Summary

Remove redundant checks in the code and save gas

Vulnerability Details

In Staking.sol line no.67 : if (_diff > 0) it is a redundant check.As the condition above that check _balance > balance already checks that the _diff > 0. So remove the redundant code and optimize gas.

Impact

Gas / Informational

Tools Used

Recommendations

Remove the if codition _diff > 0 and save gas

Support

FAQs

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