In the _init() function, there is a loop that checks if _reserve is zero and returns if so, but this check is not present in other functions that also handle reserves, such as readInstantaneousReserves(), readCappedReserves(), and others. This inconsistency could lead to unexpected behavior if zero reserves are encountered outside of initialization.
Here's the relevant part from _init():
In other functions there is no explicit check for zero reserves before proceeding with calculations that assume non-zero values.
This could potentially lead to incorrect calculations or other unintended effects.
Manual Review
Add a check after retrieving the current reserves. If any reserve is zero, the function could revert or handle it according to the intended logic.
This approach prevents any subsequent calculations from being performed with a zero reserve, which could lead to incorrect results or mathematical errors.
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.