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

Inconsistency in Martenitsa tokens count when making a present to the null address

Summary

There will be an inconsistency in Martenitsa tokens count when making a present to the null address.

Vulnerability Details

In MartenitsaMarketplace.sol, a malicious actor can call makePresent() with the null address as presentReceiver:

// increments `countMartenitsaTokensOwner[address(0)]`
martenitsaToken.updateCountMartenitsaTokensOwner(presentReceiver, "add");
// decrements `countMartenitsaTokensOwner[msg.sender]`
martenitsaToken.updateCountMartenitsaTokensOwner(msg.sender, "sub");
// reverts with `ERC721InvalidReceiver(address(0))`
martertnitsaToken.safeTransferFrom(msg.sender, presentReceiver, tokenId);

Impact

Inconsistency in Martenitsa tokens count.

Tools Used

Manual review.

Recommendations

Consider adding logic to prevent making a present to the null address.

Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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