CDP.sol#getUpdatedTotalDebt
can be optimized
#92
Labels
bug
Something isn't working
G (Gas Optimization)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
0x0x0x
Vulnerability details
Proof of Concept
Current implementation has two if statements, but actually the same logic can be coded with only one if statement. Since
_unclaimedYield == 0
is a special case of_unclaimedYield < _currentTotalDebt
and does not require any extra code.Tools Used
Manual analysis
The text was updated successfully, but these errors were encountered: