Omniscia Echidna Finance Audit

RewardFactory Code Style Findings

RewardFactory Code Style Findings

RFY-01C: Inexistent Error Messages

TypeSeverityLocation
Code StyleInformationalRewardFactory.sol:L54, L79

Description:

The linked require checks have no error messages explicitly defined.

Example:

contracts/rewards/RewardFactory.sol
79require(virtualBalanceRewardPoolimpl != address(0x0));

Recommendation:

We advise them to be set so to aid in the validation of the require's condition as well as the legibility of the codebase.

Alleviation:

Error messages were explicitly defined in both linked instances.

RFY-02C: Inexistent Visibility Specifier

TypeSeverityLocation
Code StyleInformationalRewardFactory.sol:L24

Description:

The linked variable has no visibility specifier explicitly set.

Example:

contracts/rewards/RewardFactory.sol
23address public booster;
24address _proxyFactory; // immutable
25address public RewardPoolImpl;
26address public virtualBalanceRewardPoolimpl;

Recommendation:

We advise it to be set so to avoid potential compilation discrepancies in the future as the default behaviour is for the compiler to assign one automatically which may change in future pragma versions.

Alleviation:

The public visibility specifier was introduced for the linked variable.

RFY-03C: Variable Mutability Specifiers

TypeSeverityLocation
Gas OptimizationInformationalRewardFactory.sol:L23, L24, L29, L30

Description:

The linked variables are assigned to only once during the contract's constructor.

Example:

contracts/rewards/RewardFactory.sol
23address public booster;
24address _proxyFactory; // immutable
25address public RewardPoolImpl;
26address public virtualBalanceRewardPoolimpl;
27
28constructor(address _booster, address proxyFactory) {
29 booster = _booster;
30 _proxyFactory = proxyFactory;
31}

Recommendation:

We advise them to be set as immutable greatly optimizing the codebase.

Alleviation:

The immutable specifier was only introduced for the second of the two linked variables partially alleviating this exhibit.