Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Modifier nonReentrant() is incorrect

Summary

The modifier nonReentrant() is incorrect.

Vulnerability Details

The modifier nonReentrant() never sets locked to true.

Impact

All functions with the nonReentrant() modifier are reentrant.

Tools Used

Text editor.

Recommendations

Correct the nonReentrant() modifier by setting locked to true.

modifier nonReentrant() {
require(!locked, "No re-entrancy");
locked = true;
_;
locked = false;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 8 months ago
Submission Judgement Published
Validated
Assigned finding tags:

mutex lock incomplete

Support

FAQs

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