Omniscia Faculty Group Audit
LiquidityMining Static Analysis Findings
LiquidityMining Static Analysis Findings
LMG-01S: Inexistance of Zero-Address Check
Type | Severity | Location |
---|---|---|
Input Sanitization | Minor | LiquidityMining.sol:L69-L77 |
Description:
The constructor
of the LiquidityMining
contract does not evaluate the validity of its address arguments.
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 proper require
checks to be introduced ensuring the addresses' validity.
Alleviation:
Proper require
checks were introduced in the codebase ensuring that the address
arguments are not equal to the zero-address.