Skip to content

Fix: game_id is not validated for uniqueness — same game can be used in multiple matches #280

@yahia008

Description

@yahia008

Priority: High
Estimated Time: 1 hour

Description:
The same game_id can be used to create multiple matches. An attacker could create duplicate matches for the same game and collect payouts multiple times if the oracle submits results for the same game ID.

Tasks:

  • Track used game_id values in a DataKey::GameId(String) persistent entry
  • Reject create_match if game_id already exists, returning Error::AlreadyExists
  • Add test for duplicate game ID rejection

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbugSomething isn't workingsecuritySecurity-related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions