20,000 USDC
View results
Submission Details
Severity: low
Valid

Missing check for address(0) in constructor of Staking contract

Summary

Consider adding an address(0) check for immutable variables:

File: Lender.sol

/// @notice the staking token
IERC20 public immutable TKN;
/// @notice the reward token
IERC20 public immutable WETH;
constructor(address _token, address _weth) Ownable(msg.sender) {
+ require(_token != address(0) && _weth != address(0), "Staking::ZeroAddress");
TKN = IERC20(_token);
WETH = IERC20(_weth);
}

Tools Used

manual code analysis

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.