TwentyPool:endGame, we are reseting the arrays and decks, after that , if the player won, we transfer the prize to him but after the transfer, it is emiting the eventImpact: If an external contract, like an Oracle or another type of contract, depends on this event, and a malicious user reentrant this contract, the event Will never be emitted.
Proof of Concept:
Paste this code into TwentyOneTest.t.sol
Here is the test:
And here the attacker contract:
Recommended Mitigation:
Execute the transfer, after emiting the event.
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.