Beginner FriendlyFoundryGameFi
100 EXP
View results
Submission Details
Severity: medium
Valid

User can transfer `MartenitsaToken` using directly `safetransferFrom` and not `makePresent` function.

Summary

MartenitsaToken can be transferred with the function safetransferFrom by any user without the need to use makePresent function.

Vulnerability Details

safetransferFrom of ERC721 MartenitsaToken is not overwritten.

Impact

Users can transfer the ‘MartenitsaTokenwithout affecting theCountMartenitsaTokensOwnerby directly using thesafetransferFromfunction. Using this method may lead to wrong rewards calculationHealthTokens` for those users

Tools Used

Manual review

Recommendations

Make these changes to the codebase of MartenitsaToken contract:

+ function safeTransferFrom() override public {
+ require(msg.sender == address(_martenitsaMarketplace), "Unable to call this function");
+ }
Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

ERC721 `transferFrom` not overriden

Support

FAQs

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