-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
ai-readyReady for AI implementationReady for AI implementationarea:uiFrontend/UI changesFrontend/UI changespriority:highHigh priorityHigh priorityrisk:mediumMedium risk - review carefullyMedium risk - review carefullytype:featureNew feature (creates feature/* branch)New feature (creates feature/* branch)
Description
Overview
Resolution modal for thread author / community admin to resolve prediction markets using TWAP.
Size: Small
Depends on: PM-7
Blocks: PM-17
Files to Create
client/scripts/views/modals/prediction_market_resolve_modal.tsx
Acceptance Criteria
- Current TWAP probability, TWAP window selector, predicted outcome
- "Resolve Market" triggers Governor.resolve() on-chain
- Only visible to thread author / community admin, only enabled after end_time
UI Wireframe
+---------------------------------------+
| Resolve: Will ETH reach $5k? |
| |
| Current TWAP Probability: |
| |
| PASS 73% █████████████░░░░░░░ FAIL |
| |
| Threshold: 55% |
| Predicted outcome: PASS |
| |
| This will resolve the market and |
| allow winners to redeem tokens. |
| |
| [Cancel] [Resolve Market] |
+---------------------------------------+
|
| Wallet TX: Governor.resolve()
v
Data Flow — RESOLVE FLOW
- User (thread author or admin) clicks "Resolve Market"
- Frontend: Prompts wallet → calls
Governor.resolve() - No immediate API call — EVM worker picks up event
- EVM Worker (120s polling) detects ProposalResolved event
- Event mapper → Outbox → RabbitMQ
- ProjectResolution command → DB update (status=resolved, winner set)
- React Query refetch → card shows winner and enables redeem tab
Permission Gating
- Modal only visible to thread author or community admin
- "Resolve Market" button only enabled after
end_timehas passed - Use
useTopicGatingfor permission checks
Related
Part of the Prediction Markets (Futarchy) Integration Plan. See common_knowledge/Prediction-Markets.md for full specification.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ai-readyReady for AI implementationReady for AI implementationarea:uiFrontend/UI changesFrontend/UI changespriority:highHigh priorityHigh priorityrisk:mediumMedium risk - review carefullyMedium risk - review carefullytype:featureNew feature (creates feature/* branch)New feature (creates feature/* branch)