Severity: Low
Impact: Low
Recommendation Type: UX / DevEx Improvement
The functions createGameWithToken()
and joinGameWithToken()
Both call:
This assumes the user has previously approved the contract to spend their tokens using:
While this is standard ERC20 behavior, there is no indication or check in the contract that approval has occurred. If approval hasn't been made, the call will revert, which may confuse users.
Alternatively, consider using ERC20 Permit (EIP-2612) to remove the need for a separate approval step.
createGameWithToken and joinGameWithToken functions will revert because they attempt transferFrom without requiring the user to first approve
createGameWithToken and joinGameWithToken functions will revert because they attempt transferFrom without requiring the user to first approve
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.