The refund() function is susceptible to a reentrancy attack due an improperly defined nonReentrant modiifer as well as the non use of the CEI pattern.
The refund() function is defined with a nonReentrant modifier. However, this modiifier will not prevent a reentrancy attack as lock is never set to true before the function is invoked. This means that the function is actually not locked when called and can be reentered. Also, because the function does not follow the CEI pattern there is no additional safeguard against the attack.
This means that a attacker is able to drain the contract of it's funds by recursively calling refund().
Manual review.
Update the nonReentrant modifier as follows:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.