Omniscia Tangible Audit

BasketsVrfConsumer Static Analysis Findings

BasketsVrfConsumer Static Analysis Findings

BVC-01S: Inexistent Sanitization of Input Address

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:

src/BasketsVrfConsumer.sol
77function initialize(address _factory, address _operator, uint256 chainId) external initializer {
78 __FactoryModifiers_init(_factory);
79 operator = _operator;
80 testnetChainId = chainId;
81}

Recommendation:

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

Alleviation (106fc61dcd38fe29a81d1984ccde9171f5f231af):

The input _operator address argument of the BasketsVrfConsumer::initialize function is adequately sanitized as non-zero in the latest in-scope revision of the codebase, addressing this exhibit.