-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
Description: Reveal phase. Users present outcome, amount, salt; contract verifies the commitment and updates pools/odds.
Acceptance Criteria:
- Auth required; user must have prior commit
- Recompute
hash(outcome + amount + salt)matches stored commit_hash - Update YES/NO pool, odds, total_volume
- Move from pending commits to predictions map; clear pending entry
- Emit
PredictionRevealed(user, market_id, outcome, amount) - Unit + integration tests implemented and passing
Tests (minimum):
- Happy path reveal updates pools and odds
- Wrong salt/hash rejected
- Reveal without commit rejected
- YES and NO paths both verified
- Event payload correct
Files: contracts/contracts/boxmeout/src/market.rs
Dependencies: commit_prediction implemented; USDC token
Reactions are currently unavailable