code-423n4 / 2021-09-wildcredit-findings

0 stars 0 forks source link

Unused parameter removal can save gas #87

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

0xRajeev

Vulnerability details

Impact

Unused parameter removal of _account in _checkBorrowLimits() can save gas similar to _checkDepositLimit().

Proof of Concept

https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/LendingPair.sol#L727-L733

Tools Used

Manual Analysis

Recommended Mitigation Steps

Remove unused parameter _account in _checkBorrowLimits().