Omniscia 0xPhase Audit

CashOracle Static Analysis Findings

CashOracle Static Analysis Findings

COE-01S: Inexistent Sanitization of Input Addresses

TypeSeverityLocation
Input SanitizationCashOracle.sol:L13-L16

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:

oracle/oracles/cash/CashOracle.sol
13constructor(IPegToken cash_, IBond bond_) {
14 cash = cash_;
15 bond = bond_;
16}

Recommendation:

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

Alleviation (3dd3d7bf0c2693b2f9c23bacedfa420393f7ea84):

Both input addresses of the contact's CashOracle::constructor are sanitized as non-zero, preventing the contract from being misconfigured on deployment.