Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Reentrancy Attack on refund

Summary

refund function sendValue and remove player calls are on wrong order. Malicious user can use reentrancy attack to deplete the funds on the contract.

Recommendations

Use a reentrancy guard library or change the order of sendValue and players[playerIndex] = address(0)

Updates

Lead Judging Commences

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

reentrancy-in-refund

reentrancy in refund() function

Support

FAQs

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