Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: medium
Valid

Lacks Zero Check Address

Summary

implementation Lacks Zero Check Address in Constructor in Proxy.sol

Vulnerability Details

Impact

The contract lacks a check for a zero address in the constructor. This could potentially lead to issues if the contract is accidentally initialized with a zero address.

Tools Used

Manual Review

Recommendations

It is recommended to add a check in the constructor to prevent the implementation address from being a zero address. This can be done using a require/revert statement as follows:
initialize Error : error Proxy__NoZeroAddress();
Implement This as in Constructor :

constructor(address implementation) {
if (implementation == address(0)) revert Proxy__NoZeroAddress();
_implementation = implementation;
}

Support

FAQs

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