The RockPaperScissors contract lacks maximum bounds for both join timeout and reveal timeout parameters. This oversight allows game creators and administrators to set arbitrarily long timeouts, potentially leading to indefinite fund locks and denial of service conditions.
The vulnerability exists in two key timeout mechanisms:
Join Timeout - Set by admin:
Reveal Timeout - Set during game creation:
Proof of concept
Fund locking: Players' funds can be locked for extremely long periods
Denial of Service: Games can be rendered effectively unusable due to excessive timeouts
Resource consumption: Long-running games consume blockchain storage indefinitely
Player frustration: Legitimate players may be unable to recover their funds for extended periods
Manual review
Forge testing framework
Implement maximum timeout limits:
Consider implementing an emergency withdrawal mechanism for games with excessive timeouts
Add a function to allow mutual agreement between players to reduce timeout periods
Document recommended timeout ranges in the contract interface
These changes would prevent potential abuse while maintaining the flexibility needed for legitimate gameplay scenarios.
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.