20,000 USDC
View results
Submission Details
Severity: gas
Valid

Can use modifier for repeated checks

Summary

Some checks are repeating over and over. Can use modifier.

Vulnerability Details

In Lender.sol the following check is repeated if (pools[poolId].lender != msg.sender) revert Unauthorized(); we can make this into a modifier. Issue spans across functions in these lines.

Impact

Does not follow DRY principle.

Tools Used

Manual review

Recommendations

Create a modifier for that check and use in the necessary functions.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.