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

No input validation for `Fees` constructor parameters

Summary

There is an absence of validation checks for WETH and staking parameters.

Vulnerability Details

constructor(address _weth, address _staking) {
WETH = _weth;
staking = _staking;
}

Does not contain any checks to ensure that the _weth and _staking addresses are not zero addresses. Without these checks, it is possible to initialize the contract with invalid addresses, which can lead to a variety of problems in the subsequent execution of the contract.

Impact

If _staking was initialzed to zero, funds send with IERC20(WETH).transfer(staking, IERC20(WETH).balanceOf(address(this))); will be lost.

Tools Used

Manual review

Recommendations

Implement require statements to validate that the _weth and _staking addresses are not zero addresses. Example:

require(_weth != address(0), "WETH address cannot be zero");
require(_staking != address(0), "Staking address cannot be zero");

Support

FAQs

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