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

feedHorse() can feed horse NFT that does not exist and isHappyHorse() can show non-existent horses as happy

Summary

feedHorse() can feed horse NFT that does not exist and isHappyHorse() can show non-existent horses as happy

Vulnerability Details

It just uses a mapping of uint256 id to uint256 lastFedTimeStamp, and there are no check that the id exist as a horse NFT. So feedHorse() can feed a horse NFT that does not exist and isHappyHorse() will show the non-existent horse as happy

Impact

Feed horse NFT that does not exist and wrongly show non-existent horses as happy

Tools Used

Manual review

Recommendations

Check that the id exist as a horse NFT

Updates

Lead Judging Commences

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

Nonexistent horses can be fed

Support

FAQs

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