Omniscia Vendor Finance Audit
VendorOracle Static Analysis Findings
VendorOracle Static Analysis Findings
VOE-01S: Inexistent Sanitization of Input Addresses
Type | Severity | Location |
---|---|---|
Input Sanitization | VendorOracle.sol:L32-L34 |
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/VendorOracle.sol
31constructor(32 address _registry,33 address _NativeAddress,34 address _wNativeAddress35) {36 registry = FeedRegistryInterface(_registry);37 NATIVE = _NativeAddress;38 pegs[_wNativeAddress] = _NativeAddress;39}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that each address
specified is non-zero.
Alleviation:
The first two input addresses are now validated as non-zero and the two new _natives
and _wraps
data entries are properly sanitized as being composed of non-zero members thus alleviating this exhibit in full.