Problem Statement
quest-engine::review_submission allows approve-or-reject by the employer with no appeal. A learner who believes they were rebuffed unfairly has no on-chain recourse. There's no timeline or window for escalation.
Why It Matters
- Without a dispute path, off-chain governance or DAO has no way to override unfair reviews.
- Reputation dynamics: a fair protocol needs conflict resolution.
Expected Outcome
- New
dispute_submission(env, learner, quest_id, reason) callable by the learner within DISPUTE_WINDOW_SECONDS (e.g., 7 days) of SubmissionReviewed event.
resolve_dispute(env, admin, dispute_id, override_approve: bool) admin-only.
- Storage for
DataKey::Dispute(dispute_id) -> Dispute { quest_id, learner, reason, opened_at, resolved }.
- Integrates with the governance contract: optional
resolve_dispute_via_governance(env, dispute_id) if votes_for > votes_against.
Acceptance Criteria
- Cannot dispute past the window.
- Resolution emits
DisputeResolved event.
- Tests for happy path, late dispute, governance escalation.
Implementation Notes
- Tight coupling with the dispute_id counter.
- Reference Compound/Aave dispute patterns.
Files / Modules Affected
contracts/quest-engine/src/lib.rs
contracts/quest-engine/src/types.rs
contracts/quest-engine/src/test.rs
Dependencies
None.
Difficulty
Hard.
Estimated Effort
1 week.
Suggested Labels
feature, governance, P2, quest-engine
Problem Statement
quest-engine::review_submissionallows approve-or-reject by the employer with no appeal. A learner who believes they were rebuffed unfairly has no on-chain recourse. There's no timeline or window for escalation.Why It Matters
Expected Outcome
dispute_submission(env, learner, quest_id, reason)callable by the learner withinDISPUTE_WINDOW_SECONDS(e.g., 7 days) ofSubmissionReviewedevent.resolve_dispute(env, admin, dispute_id, override_approve: bool)admin-only.DataKey::Dispute(dispute_id) -> Dispute { quest_id, learner, reason, opened_at, resolved }.resolve_dispute_via_governance(env, dispute_id)ifvotes_for > votes_against.Acceptance Criteria
DisputeResolvedevent.Implementation Notes
Files / Modules Affected
contracts/quest-engine/src/lib.rscontracts/quest-engine/src/types.rscontracts/quest-engine/src/test.rsDependencies
None.
Difficulty
Hard.
Estimated Effort
1 week.
Suggested Labels
feature,governance,P2,quest-engine