Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

[L-5] Handling the address(0) missing checks

Summary: Missing checks for address(0) can be found in several places in the code.

Vulnerability Details: The missing addres(0) checks can be found in several places in the code. The address(0) check is added in the below area in the code in ThePredicter function.

constructor(
address _scoreBoard,
uint256 _entranceFee,
uint256 _predictionFee
) {
organizer = msg.sender;
scoreBoard = ScoreBoard(payable(_scoreBoard));
entranceFee = _entranceFee;
predictionFee = _predictionFee;
}

Impact: The address(0) missing check could lead to loss of ownership and the ownership of the contract can be lost forever.

Tools Used: Slither and Aderyn.

Recommendations: The missing address(0) check is added in the below area in the code. constructor(
address

_scoreBoard,
uint256 _entranceFee,
uint256 _predictionFee
) {
if (_scoreBoard == address(0)) {
revert ThePredicter__InvalidAddress();
}
organizer = msg.sender;
scoreBoard = ScoreBoard(payable(_scoreBoard));
entranceFee = _entranceFee;
predictionFee = _predictionFee;
}
Updates

Lead Judging Commences

NightHawK Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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