First Flight #12: Kitty Connect

First Flight #12: Kitty Connect
Beginner FriendlyFoundryNFTGameFi
100 EXP
View results
Submission Details
Severity: medium
Valid

In KittyConnect::bridgeNFTToAnotherChain, idx of last item token is never updated

Summary

Fails to update the idx of CatInfo for the tokenId - lastItem that is used to replace the NFT that is bridged.

Vulnerability Details

Fails to update the idx of CatInfo for the tokenId - lastItem that is used to replace the NFT that is bridged.

Impact

Incorrect data of idx for NFT resulting in difficulty to bridge NFT in any future case

Tools Used

  • Foundry

  • Manual review

Recommendations

...
+ s_catInfo[lastItem].idx = idx;
Updates

Lead Judging Commences

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

Consider updating index of an NFT when making a transfer to another user or chain

Support

FAQs

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