Omniscia vfat Audit

MultiFarmStrategy Static Analysis Findings

MultiFarmStrategy Static Analysis Findings

MFS-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/strategies/MultiFarmStrategy.sol
61constructor(
62 SickleFactory factory,
63 ConnectorRegistry connectorRegistry,
64 Libraries memory libraries
65) StrategyModule(factory, connectorRegistry) {
66 strategyAddress = address(this);
67 transferLib = libraries.transferLib;
68 swapLib = libraries.swapLib;
69 feesLib = libraries.feesLib;
70 zapLib = libraries.zapLib;
71 nftZapLib = libraries.nftZapLib;
72}

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.

MFS-02S: Multiple Top-Level Declarations

Description:

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

Example:

contracts/strategies/MultiFarmStrategy.sol
36library MultiFarmStrategyFees {
37 bytes4 constant Harvest = bytes4(keccak256("FarmHarvestFee"));
38 bytes4 constant Compound = bytes4(keccak256("FarmCompoundFee"));
39}
40
41contract MultiFarmStrategy is

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.