Omniscia 0xPhase Audit

ElementBase Static Analysis Findings

ElementBase Static Analysis Findings

EBE-01S: Inexistent Sanitization of Input Address

TypeSeverityLocation
Input SanitizationElementBase.sol:L13-L15

Description:

The linked function accepts an address argument yet does not properly sanitize it.

Impact:

The presence of zero-value addresses, especially in constructor implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.

Example:

diamond/Element/ElementBase.sol
13function _initializeElement(IDB db_) internal {
14 _es().db = db_;
15}

Recommendation:

We advise some basic sanitization to be put in place by ensuring that the address specified is non-zero.

Alleviation (3dd3d7bf0c2693b2f9c23bacedfa420393f7ea84):

The input address of the contract's initialization (ElementBase::_initializeElement) mechanism is properly sanitized as non-zero, preventing it from being misconfigured during its initialization.