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

Lack of Zero-Address Checks

Summary

Some functions do not validate against zero-address assignments. The contracts Fees, Staking and Lender are concerned.

Vulnerability Detail

Several methods and constructors in the code do not perform checks against assigning the zero address, potentially leading to funds being sent to an unrecoverable address or unintended system behaviors.

Impact

Unintended behaviors and potential loss of funds.

Tools Used

Slither

Recommendation:

Implement checks to prevent assignment of the zero address. The following lines are to include checks:

Fees.constructor(address,address)._weth (src/Fees.sol#19) lacks a zero-check on :
- WETH = _weth (src/Fees.sol#20)
Fees.constructor(address,address)._staking (src/Fees.sol#19) lacks a zero-check on :
- staking = _staking (src/Fees.sol#21)
Lender.setFeeReceiver(address)._feeReceiver (src/Lender.sol#100) lacks a zero-check on :
- feeReceiver = _feeReceiver (src/Lender.sol#101)
Staking.constructor(address _token, address _weth) Ownable(msg.sender) {
TKN = IERC20(_token);
WETH = IERC20(_weth);
}

Support

FAQs

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