-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
The count_bets_for_outcome analytics function (Line 166) is a stub that checks for a Bet record associated with the contract address (e.current_contract_address()). This is logically impossible as the contract itself never places bets. It returns 1 if a random key exists and 0 otherwise, providing zero analytical value to the protocol.
Requirements and context
- Replace the stub with a real outcome-based counter (synchronized with Issue 24).
- Ensure analytics accurately reflect per-outcome participation.
Suggested execution
- Fork the repo and create a branch:
git checkout -b fix/issue-80-analytics-fix - Implement real-time bet counters.
Implementation changes
- Refactor
markets.rs(around line 169) to fetch the actual counter fromDataKey::OutcomeBetCount(market_id, outcome).
Test and commit
- Verify that the function returns the correct count for multiple distinct outcomes in the same market.
Example commit message
fix: replace broken analytics stub with precise outcome bet counter
Guidelines
- Data accuracy.
- Timeframe: 24 hours.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program