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

transferFrom() is used in `_battle()` function

Summary

_battle() internal function uses transferFrom() function to transfer the NFT of defender to himself.

Vulnerability Details

Defender can be a contract instead of an EOA.

Impact

In that case, user may not receive the NFT back.

Tools Used

manual review

Recommendations

It's recommended either to use safetransferFrom or to check if the user is an EOA at the beginning of the function.

require(tx.origin == msg.sender, "not EOA");

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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