Omniscia Native Audit

PeripheryImmutableState Static Analysis Findings

PeripheryImmutableState Static Analysis Findings

PIS-01S: Inexistent Sanitization of Input Addresses

TypeSeverityLocation
Input SanitizationPeripheryImmutableState.sol:L16-L19

Description:

The linked function(s) accept address arguments yet do not properly sanitize them.

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:

contracts/libraries/PeripheryImmutableState.sol
16constructor(address _factory, address _WETH9) {
17 factory = _factory;
18 WETH9 = _WETH9;
19}

Recommendation:

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

Alleviation:

Both input addresses referenced in the exhibit are now sanitized as non-zero per our recommendation.