The _diff
zero check in Staking.update(), if (_diff >0) {}
is redundant.
In Staking.update()
, it is first checked that _balance
is greater than balance
(i.e., the WETH balance of Staking is more than the deposited token balance). Then, the difference between the two is stored in _diff = _balance - balance
. Afterward, it is checked if (_diff > 0) {}
. However, this zero check is redundant as if _balance
is greater than balance
, their difference, ipso facto, will be more than 0.
Gas
Manual Review
Remove the if (_diff > 0) {...}
check from Staking.update()
, the check if (_balance > balance) {...}
is enough.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.