Omniscia vfat Audit

SuperchainGaugeRegistry Static Analysis Findings

SuperchainGaugeRegistry Static Analysis Findings

SGR-01S: Inexistent Sanitization of Input Addresses

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/connectors/velodrome/SuperchainGaugeRegistry.sol
24constructor(
25 IGaugeRegistryVoter voter_,
26 IIsPool v2PoolFactory_,
27 IIsPool slipstreamPoolFactory_,
28 VelodromeGaugeConnector v2GaugeConnector_,
29 SlipstreamGaugeConnector slipstreamGaugeConnector_
30) {
31 voter = voter_;
32 v2PoolFactory = v2PoolFactory_;
33 slipstreamPoolFactory = slipstreamPoolFactory_;
34 v2GaugeConnector = v2GaugeConnector_;
35 slipstreamGaugeConnector = slipstreamGaugeConnector_;
36}

Recommendation:

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

Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):

The vfat team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.

SGR-02S: Multiple Top-Level Declarations

Description:

The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.

Example:

contracts/connectors/velodrome/SuperchainGaugeRegistry.sol
11interface IIsPool {
12 function isPool(
13 address pool
14 ) external view returns (bool);
15}
16
17contract SuperchainGaugeRegistry is ICustomConnectorRegistry {

Recommendation:

We advise all highlighted top-level declarations to be split into their respective code files, avoiding unnecessary imports as well as increasing the legibility of the codebase.

Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):

The vfat team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.