Omniscia Faculty Group Audit
LiquidityMining Code Style Findings
LiquidityMining Code Style Findings
LMG-01C: Variable Mutability Optimization
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | Informational | LiquidityMining.sol:L37, L76 |
Description:
The linked variable is assigned to only once during the contract's constructor.
Example:
contracts/LiquidityMining.sol
69constructor(70 address _tokenAddress,71 address _tokenRewardsAddress,72 uint256 _startBlock73) public {74 token = IERC20(_tokenAddress);75 tokenRewardsAddress = _tokenRewardsAddress;76 START_BLOCK = _startBlock;77}Recommendation:
We advise the immutable mutability specifier to be introduced to its declaration to ensure it benefits from the gas optimizations it brings.
Alleviation:
The immutable mutability specifier was properly added to the START_BLOCK variable.