Omniscia Vector Finance Audit
poolHelper Code Style Findings
poolHelper Code Style Findings
POO-01C: Inexistent Visibility Specifier
Type | Severity | Location |
---|---|---|
Code Style | Informational | poolHelper.sol:L22 |
Description:
The linked variable has no visibility specifier explicitly set.
Example:
contracts/poolHelper.sol
22uint256 pid;
Recommendation:
We advise one 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 properly introduced for the linked variable.
POO-02C: Variable Mutability Optimization
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | poolHelper.sol:L15-L17, L19-L20, L22, L35-L40 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
contracts/poolHelper.sol
27constructor(28 uint256 _pid,29 address _stakingToken,30 address _depositToken,31 address _mainStaking,32 address _masterVtx,33 address _rewarder34) {35 pid = _pid;36 stakingToken = _stakingToken;37 depositToken = _depositToken;38 mainStaking = _mainStaking;39 masterVtx = _masterVtx;40 rewarder = _rewarder;41}
Recommendation:
We advise them to be set as immutable
greatly optimizing their gas cost.
Alleviation:
All linked variables were correctly set as immutable
.