Omniscia 0xPhase Audit

Element Static Analysis Findings

Element Static Analysis Findings

ETN-01S: Inexistent Sanitization of Input Address

TypeSeverityLocation
Input SanitizationElement.sol:L27-L29

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:

proxy/utils/Element.sol
27function _initializeElement(IDB db_) internal {
28 _es().db = db_;
29}

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 (Element::_initializeElement) mechanism is properly sanitized as non-zero, preventing it from being misconfigured during its initialization.