The contract's token-based game functions (createGameWithToken
/joinGameWithToken
) attempt token transfers without verifying pre-approved allowances or handling ERC20 compliance variations. This implementation assumes:
Players have granted unlimited approval to the contract
All ERC20 tokens used will revert on failed transfers
These assumptions conflict with real-world ERC20 implementations where:
Some tokens return false
instead of reverting on transfer failures
Users might approve exact amounts rather than unlimited allowances
High Severity:
Transactions may unexpectedly revert due to insufficient allowances
Partial approvals could lock game creation/joining
Non-compliant ERC20 tokens might allow transfers without proper checks
Add explicit checks before transfers:
Replace raw transferFrom
calls with OpenZeppelin's SafeERC20:
Implement a dual-step flow in the UI:
Check allowance status
Trigger MetaMask approval if needed before game interaction
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.