It's convenient to not duplicate code and extract whenever possible such code into a function.
The following code is used multiple times in Lender.sol:
if (pools[poolId].lender != msg.sender) revert Unauthorized();
In such cases, it is recommended to create a modifier that will be verifying that the msg.sender is allowed to use functions addToPool, removeFromPool, updateMaxLoanRatio and updateInterestRate.
It will also save gas by having less code implemented.
None
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.