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

Absence of Address(0) and Error Check when updating feeReceiver Address could lead to loss of fund

Summary

Absence of Address(0) and Error Check when updating feeReceiver Address could lead to loss of fund

Vulnerability Details

L101 of the setFeeReceiver(...) function in the Lender.sol contract lacks necessary checks which could cause error in code execution if unnoticed, this is medium has low likelyhood but it is a possibility with high impact

Impact

Absence of Address(0) and Error Check when updating feeReceiver Address could lead to loss of fund
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L101

function setFeeReceiver(address _feeReceiver) external onlyOwner {
feeReceiver = _feeReceiver;
}

Tools Used

solidity, Hardhat

Recommendations

Address(0) check and Error check should be implemented into this function update

Support

FAQs

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