Omniscia Echidna Finance Audit
RewardFactory Code Style Findings
RewardFactory Code Style Findings
RFY-01C: Inexistent Error Messages
| Type | Severity | Location |
|---|---|---|
| Code Style | Informational | RewardFactory.sol:L54, L79 |
Description:
The linked require checks have no error messages explicitly defined.
Example:
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
| Type | Severity | Location |
|---|---|---|
| Code Style | Informational | RewardFactory.sol:L24 |
Description:
The linked variable has no visibility specifier explicitly set.
Example:
23address public booster;24address _proxyFactory; // immutable25address 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
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | Informational | RewardFactory.sol:L23, L24, L29, L30 |
Description:
The linked variables are assigned to only once during the contract's constructor.
Example:
23address public booster;24address _proxyFactory; // immutable25address 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.