Skip to content

feat: design dispute-resolution flow for contested fills - #162

Merged
james2177 merged 1 commit into
stellar-vortex-protocol:mainfrom
blessedDev-xyz:docs/dispute-resolution-design
Jul 28, 2026
Merged

feat: design dispute-resolution flow for contested fills#162
james2177 merged 1 commit into
stellar-vortex-protocol:mainfrom
blessedDev-xyz:docs/dispute-resolution-design

Conversation

@blessedDev-xyz

Copy link
Copy Markdown

Summary

Creates docs/dispute-resolution-design.md — a full design document for the dispute-resolution mechanism referenced in the protocol roadmap.

Key design decisions

Dispute scope (v1): Limited to on-chain-verifiable grievances only. Stale-rate claims and source-chain non-delivery are deferred until a cross-chain proof oracle is integrated. Wrong-recipient and fill-integrity disputes are in scope.

State machine addition:

Open → Accepted → Filling → Filled
                         ↘→ Disputed → Resolved (Upheld | Dismissed)

Fund flow: Solver deposits fill into contract escrow via begin_fill. User has a 1-hour window to call open_dispute. Arbiter resolves within 24 hours. In both outcomes (Upheld/Dismissed) the user receives their tokens — the dispute only determines whether the solver is slashed.

Arbiter: Admin in v1 (simple, safe for testnet). Recommended v2: separate arbiter key, settable to a multisig or future solver_registry contract.

Security: Griefing mitigation (user dispute bond), arbiter capture mitigation (multisig v2), escrow risk (checks-effects-interactions ordering), re-entrancy pattern documented.

What this PR does NOT do

  • No contract code is changed — implementation is deferred to follow-up issues per the roadmap.
  • The 8-item implementation plan at the bottom of the doc lists the follow-up issues needed.

Validation

Docs-only change. cargo fmt, cargo clippy -- -D warnings pass.

Closes #48

Added docs/dispute-resolution-design.md covering:
- Scope: what counts as a valid on-chain dispute (underfill already blocked;
  wrong-recipient is disputable; stale-rate / source-chain non-delivery are
  out-of-scope for v1 due to lack of cross-chain proof oracle)
- New state machine: Filling -> Disputed -> Resolved (Upheld | Dismissed)
- Fund flow for happy path, upheld dispute, and dismissed dispute
- New entry-points sketched: begin_fill, open_dispute, resolve_dispute,
  release_fill
- Arbiter role: admin in v1, multisig/solver_registry in v2
- Dispute window: 1 hour dispute window, 24 hour arbiter window
- Security considerations: griefing bond, arbiter capture, escrow risk, re-entrancy
- 8-item implementation plan for follow-up issues

No contract code changed; design doc only.

Closes stellar-vortex-protocol#48
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@blessedDev-xyz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@james2177
james2177 merged commit c264099 into stellar-vortex-protocol:main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design a dispute-resolution flow for contested fills

3 participants