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

No Zero Address check in constructor

Summary

SantaToken's constructor does not check for zero address before deployment.

Vulnerability Details

At construction time, SantaToken stores the contract address of SantasList as immutable. i_santasList is the only authority that interacts with mint and burn and it's value cannot be changed after deployment. There is no check to verify if the i_santaList is a valid address.

Impact

No access to mint and burn functionality in SantaToken

Tools Used

Manual Review.

Recommendations

Since this contract is deployed by SantaToken itself, set i_santasList to msg.sender.

constructor() ERC20("SantaToken", "SANTA", DECIMALS) {
i_santasList = msg.sender;
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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