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

Lack of zero-address validation in various functions

Summary

Lack of zero-address checks might lead to inoperable contract if parameter settings are not handled carefully.

Vulnerability Details

A number of constructors/functions in the codebase do not revert if the zero address is passed in for a parameter that should not be set to zero.
An example can be seen in the setFeeReceiver() function of Lender.sol

/// @notice set the fee receiver
/// can only be called by the owner
/// @param _feeReceiver the new fee receiver
function setFeeReceiver(address _feeReceiver) external onlyOwner {
feeReceiver = _feeReceiver;
}

Impact

If any of the parameters are accidentally set to address zero address, this would easily cause huge impact to the protocol.

Tool Used

Manual Audit

Recommend Mitigation

Add zero-address validation for the parameters listed above. Review input validation across components.

Additional Note

For brevity reasons only one instance has been indicated in report but issue occurs multiple times in codebase and should correctly mitigated against in all instances.

Support

FAQs

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