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

Missing checks for address(0x0) or zero value

Summary

Vulnerability Details

Missing checks for address(0x0) or zero value when assigning values to state variables:

File: src/Fees.sol

  • Line 20: WETH = _weth;

  • Line 21: staking = _staking;

File: src/Staking.sol

  • Line 32: TKN = IERC20(_token);

  • Line 33: WETH = IERC20(_weth);

  • Line 39: TKN.transferFrom(msg.sender, address(this), _amount);

  • Line 48: TKN.transferFrom(msg.sender, address(this), _amount);

File: src/Lender.sol

  • Line 86: lenderFee = _fee;

  • Line 94: borrowerFee = _fee;

  • Line 101: feeReceiver = _feeReceiver;

  • Line 224: pools[poolId].interestRate = interestRate;

Impact

Seting address(0x0) or zero value checks is important to prevent contracts from unintended behaviors while interacting with uninitialized or invalid addresses. Zero value input can also disrupt some protocol functionalities.

Tools Used

Manual Analysis, VScode

Recommendations

Implement checks for unwanted values before seting a state variable.

Support

FAQs

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