Skip to content

Unvalidated Referrer identity in place_bet #190

@hman38705

Description

@hman38705

Description
The referrer parameter in place_bet is accepted as an Option<Address> (Line 19). There is zero validation that the provided address is a valid user or not the bettor themselves (redundant with Issue 21/601). Furthermore, there is no check that the referrer hasn't been banned or blacklisted by the protocol.

Requirements and context

  • Implement formal referrer verification.
  • Ensure the referrer is an active and authorized participant.

Suggested execution

  • Fork the repo and create a branch: git checkout -b fix/issue-87-referrer-validation
  • Update the betting module.

Implementation changes

  • Modify bets.rs (around line 20) to validate the referrer address against a registry.

Test and commit

  • Verify that bet attempts with invalid referrers are rejected or the referral is ignored.

Example commit message
fix: implement formal validation for referrer addresses in betting

Guidelines

  • Security against referral gaming.
  • Timeframe: 24 hours.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions