20,000 USDC
View results
Submission Details
Severity: low

Lender & borrowerFee fees can be zero

Summary

a) If this is intended functionality, all fine, otherwise:
When lender fees is zero, this means interest will never be reduced by fees. But if lender fee not allowed to be zero, then there's currently a check missing.

b) Similar for borrowerFee on L93.

Vulnerability Details

n/a

Impact

When lender fees is zero, this means interest will never be reduced by fees.

Tools Used

VSC, manual.

Recommendations

add the following into function as shown:
if (_fee == 0) revert FeeZero();

function setLenderFee(uint256 _fee) external onlyOwner {
		if (_fee == 0) revert FeeZero();
    if (_fee > 5000) revert FeeTooHigh();
    lenderFee = _fee;
}

Support

FAQs

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