The createGameWithToken()
function fails to verify whether the contract has spending allowance for the player's tokens before attempting to transfer them. This violates the ERC20 standard security pattern and could lead to failed transactions or inconsistent game states.
1) Current Implementation:
Skips the critical approve() verification step
Assumes unlimited allowance by default
2) Failure Modes:
Silent transaction failures when allowance = 0
Partial allowance exploitation (e.g., 0.9 tokens approved)
Game IDs created without token transfers
Manual code review
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.