Christmas Dinner

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

The value of the variable `ChristmasDinner::locked` is always `false`. It will never be assigned as `true`, which could lead to re-entrancy exploitation in the future.

Description: The value of the variable locked is always false. Therefore, the nonReentrant modifier will not be effective.

Recommended Mitigation: Set the value of locked to true when function refund start.

function refund() external nonReentrant beforeDeadline {
+ locked = true;
address payable _to = payable(msg.sender);
_refundERC20(_to);
_refundETH(_to); // @audit-high Re-entrantcy
emit Refunded(msg.sender);
}
Updates

Lead Judging Commences

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

deadline is never set to true

Support

FAQs

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

Give us feedback!