-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
ETA - less than 12 hrsStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededsmart-contract
Description
Description:
Extend event/market support to allow 3 or more outcomes (e.g., Team A / Team B / Draw) with correct pool and payout logic.
Requirements and Context:
- Must be secure, tested, and documented
- Should allow admin to create events with 2 to N outcomes
- Should validate outcome selection in
place_betis one of event outcomes - Should compute pool and payouts for multi-outcome resolution (single winning outcome)
- Should handle ties or multi-winner cases per spec (e.g., split pool)
- Should emit events and update storage consistently
- Must not break existing binary (yes/no) markets
Suggested Execution:
-
Fork the repo and create a branch
git checkout -b feature/multi-outcome-markets
-
Implement changes
- Write contract:
src/lib.rs(create_event outcomes, place_bet, resolve, payouts) - Update types:
src/types.rs(outcomes as list, resolution) - Update storage, validation, events
- Add documentation and NatSpec-style comments
- Write contract:
-
Test and commit
- Run tests; cover 2, 3, and N outcomes; edge cases (tie, invalid outcome)
- Include test output and security notes
Example Commit Message:
feat: implement multi-outcome markets with 3 or more outcomes
Guidelines:
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 72 hours
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ETA - less than 12 hrsStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededsmart-contract