There are some if conditions which are checking if a value will be bigger than zero and due to prior verifications, this case is never going to happen.
In the function:
We can observe that the condition if (_diff > 0) is not necessary because prior to this we have that
uint256 _diff = _balance - balance;
and in order not to underflow the above line is only executed if this condition if (_balance > balance) is met. Hence, _diff is always going to be different than 0.
And besides that, since _diff is never going to be zero and _totalSupply needs to be bigger than 0, if (_ratio > 0) is not necessary neither as _ratio will always be different than zero.
Every time the update() function is called, you will be able to save some extra gas by removing the unnecessary code.
None
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.