Omniscia Myso Finance Audit

LenderVaultImpl Static Analysis Findings

LenderVaultImpl Static Analysis Findings

LVI-01S: Data Location Optimizations

TypeSeverityLocation
Gas OptimizationLenderVaultImpl.sol:L111, L335

Description:

The linked input arguments are set as memory in external function(s).

Example:

contracts/peer-to-peer/LenderVaultImpl.sol
110function updateLoanInfo(
111 DataTypesPeerToPeer.Loan memory _loan,
112 uint128 repayAmount,
113 uint256 loanId,
114 uint256 collAmount
115) external {

Recommendation:

We advise them to be set as calldata optimizing their read-access gas cost.

Alleviation (c740f7c6b5):

The former instance referenced by this exhibit is no longer present in the codebase, however, the second instance remains and has not been optimized rendering this exhibit acknowledged.

Alleviation (37cf23668b):

All instances have been properly optimized in the latest commit hash of the report, rendering this exhibit fully addressed.