GivingThanks

First Flight #28
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Token Counter Incremented After Minting

Summary

In the GivingThanks::donate function, the token counter is incremented after the token has been created, not following the Checks-Effects-Interactions pattern.

Vulnerability Details

The token counter is incremented after the token has been created regardless of whether the transaction was successful or not.

Impact

It can lead to inconsistencies in the contract states.

Tools Used

Foundry, Remix

Recommendations

The counter should be incremented before creating the token, following the Checks-Effects-Interactions pattern.

Updates

Lead Judging Commences

n0kto Lead Judge about 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.