-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Currently, market resolution is entirely manual and depends on the creator's honesty. We need a robust resolution system that incorporates oracle data, allows for disputes, and has automated fallback mechanisms.
Problem Statement
- Market creators could resolve incorrectly or not at all
- No verification of resolution accuracy
- Users have no recourse if resolution is wrong
- Abandoned markets remain unresolved indefinitely
Proposed Solution
Phase 1: Oracle Integration
- Integrate Redstone Oracle for price feeds
- Support for multiple data sources (Chainlink, Pyth, etc.)
- Automatic resolution for price-based markets
- Verify data before resolution
Phase 2: Dispute Mechanism
- Allow users to dispute resolution within 24 hours
- Stake required to dispute (prevents spam)
- Community voting on disputed resolutions
- Slashing for frivolous disputes
Phase 3: Automated Fallback
- If creator doesn't resolve within 7 days after resolution-date
- Oracle auto-resolves if data available
- Community vote if no oracle data
- Refund mechanism if consensus can't be reached
Technical Requirements
Smart Contract Changes
;; New data structures
(define-map disputes
{ market-id: uint, disputer: principal }
{ stake: uint, reason: (string-utf8 256), timestamp: uint }
)
(define-map oracle-sources
{ market-id: uint }
{ oracle-type: (string-ascii 20), data-feed: (string-ascii 100) }
)
;; New functions needed
- submit-dispute(market-id, reason, stake)
- vote-on-dispute(market-id, vote)
- auto-resolve-with-oracle(market-id)
- emergency-refund(market-id)Frontend Changes
- Oracle data display in market creation
- Dispute submission form
- Voting interface for disputes
- Resolution status tracker
- Dispute history view
Implementation Steps
-
Oracle Integration
- Research Redstone integration on Stacks
- Implement oracle data reading
- Add oracle config to market creation
- Test with live price feeds
-
Dispute System
- Design dispute data structures
- Implement dispute submission
- Create voting mechanism
- Add stake/slashing logic
-
Frontend & Testing
- Build dispute UI components
- Create oracle data displays
- Integration testing
- Security audit
Success Metrics
- 90%+ markets resolved within 24 hours
- < 5% dispute rate
- 100% oracle-compatible markets auto-resolved
- Zero unresolved abandoned markets
Security Considerations
- Prevent dispute spam
- Ensure oracle data authenticity
- Protect against flash loan attacks on oracles
- Time-lock critical operations
Dependencies
- Redstone Oracle SDK
- Additional contract storage (estimate +200 variables)
- Community governance framework
Related Issues
- 2 Emergency pause functionality
- 4 Multiple stakes support
- 5 Resolution deadline
Resources
Reactions are currently unavailable