Description
In the MapleLoan contract, the following variables are loaded from storage multiple times:
- acceptNewTerms(): lender is loaded twice from storage.
- acceptNewTerms(): borrower is loaded from storage three times.
- makePayment(): lender is loaded from storage three times.
Recommendation
These variables should be loaded from storage just once and placed in temporary memory for later use (within the same function).
Status
Addressed in the following PR: https://github.com/maple-labs/open-term-loan-private/pull/48