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

Save gas for collecting protocol fees and interests

Summary

When a loan is touched (giving loan, buying loan, refinancing loan, borrowing loan, repaying, seizing loan), protocol fees is calculated and transferred to feeReceiver. By implementing like this, users are paying gas fee for governance. This is not gas optimized for users, especially token contract with complex logics (like rebase tokens, fee on transfer tokens...)

Recommendations

Consider using a storage value to accumulate fee amounts and let feeReceiver to call to Lender contract to withdraw fees(pull over push pattern).

Support

FAQs

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

Give us feedback!