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

No zero address checks in the `LoveToken` constructor

Summary

Missing zero checks in the constructor before assignment can cause the LoveToken contract interact with a null address

Vulnerability Details

Proof of Code:

constructor(
ISoulmate _soulmateContract,
address _airdropVault,
address _stakingVault
) ERC20("LoveToken", "<3", 18) {
soulmateContract = _soulmateContract;
airdropVault = _airdropVault;
stakingVault = _stakingVault;
}

Impact

Unexpected behaviour in contract code

Tools Used

  • Foundry

  • Manual Code Review

Recommendations

constructor(
ISoulmate _soulmateContract,
address _airdropVault,
address _stakingVault
) ERC20("LoveToken", "<3", 18) {
+ require(_airdropVault != address(0) || _stakingVault != address(0));
soulmateContract = _soulmateContract;
airdropVault = _airdropVault;
stakingVault = _stakingVault;
}
Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other
maziXYZ Submitter
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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