PoolGauge.withdraw()
can be optimized when _value
equals zero
#47
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pants
Vulnerability details
The function
PoolGauge.withdraw()
doesn't have to execute these lines of code when_value
equals zero:Impact
There is no reason to execute these lines of code if
_value
equals zero because they won't affect the system. An identical optimization is already implemented inPoolGauge.deposit()
.Tool Used
Manual code review.
Recommended Mitigation Steps
Execute these lines of code only if
_value
doesn't equal zero.The text was updated successfully, but these errors were encountered: