Closed code423n4 closed 3 years ago
GalloDaSballo
LendingPair Initializer: https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/LendingPair.sol#L85
Correctly checks for tokens not being address 0
However it doesn't check for _uniV3Helper nor _lendingController being different from address 0
_uniV3Helper
_lendingController
Since the initializer can be called only one, it's best to ensure these are set sensibly
Add checks to the initializer require(_uniV3Helper != address(0)); require(_feeRecipient != address(0));
require(_uniV3Helper != address(0));
require(_feeRecipient != address(0));
Duplicate #110
per #110 invalid
Handle
GalloDaSballo
Vulnerability details
Impact
LendingPair Initializer: https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/LendingPair.sol#L85
Correctly checks for tokens not being address 0
However it doesn't check for
_uniV3Helper
nor_lendingController
being different from address 0Since the initializer can be called only one, it's best to ensure these are set sensibly
Recommended Mitigation Steps
Add checks to the initializer
require(_uniV3Helper != address(0));
require(_feeRecipient != address(0));