_commissionTransfer()
is vulnerable to reentrancy attacks.
_commissionTransfer()
calls an external token contract. If the token is malicious, it could call back into _commissionTransfer()
and withdraw the commission again before the state is updated.
This could allow the token.safeTransfer(STADIUM_ADDRESS, token.balanceOf(address(this)));
line to be executed multiple times.
Manual
An attacker could drain the contract balance by recursively calling _commissionTransfer
.
Use the checks-effects-interactions pattern:
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.