First Flight #12: Kitty Connect

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

Shop partner can manipulate cat age leading to possible unfair advantages

Summary

Shop partner can manipulate cat age leading to possible unfair advantages

Vulnerability Details

When a new cat NFT is minted, shop partner has to set the date of birth (dob) of the cat in seconds. Then in getCatAge function, the age of the cat is calculated based on the date of birth. This lets the shop partner to manipulate the age of the cat and give it an unfair advantage to the cat owner and possibly make the nft rarer due its age.

Impact

Influence the rarity of the cat and can lead to unfair advantages.

Tools Used

Manual Review

Recommendations

Consider using block.timestamp instead of the dob parameter in the getCatAge function.

- dob: dob
+ dob: block.timestamp
Updates

Lead Judging Commences

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

Inputed cat dob can be in the future, making a function revert due to underflow.

Support

FAQs

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