Inline unnecessary function can make the code simpler and save some gas #124
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-12-sublime/blob/9df1b7c4247f8631647c7627a8da9bdc16db8b11/contracts/CreditLine/CreditLine.sol#L466-L472
https://github.com/code-423n4/2021-12-sublime/blob/9df1b7c4247f8631647c7627a8da9bdc16db8b11/contracts/CreditLine/CreditLine.sol#L691-L727
updateinterestAccruedTillLastPrincipalUpdate()
is unnecessary as it's being used only once. Therefore it can be inlined inborrow()
to make the code simpler and save gas.Recommendation
Change to:
The text was updated successfully, but these errors were encountered: