Skip to content

Build dispute arbitration with neutral third-party resolver #188

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

There's no mechanism for a payer and creator to escalate a disagreement to a neutral party. This issue adds an optional arbiter address per invoice who can resolve a disputed invoice by forcing release or refund.

Technical Context

Involves types.rs (arbiter: Option<Address> on InvoiceExt), lib.rsraise_dispute(env, caller, invoice_id) freezes the invoice for arbitration, resolve_dispute(env, arbiter, invoice_id, action: ResolveAction) requires arbiter auth and executes release or refund regardless of normal guards.

Acceptance Criteria

  • raise_dispute() callable by creator or any payer; sets a disputed flag, blocks pay()/release()/refund()
  • resolve_dispute() requires the configured arbiter's auth; clears disputed
  • ResolveAction::Release triggers normal release flow; Refund triggers normal refund flow
  • Panics with "no arbiter set" if resolve_dispute called with none configured
  • Test: raise dispute blocks pay, arbiter resolves with Refund, payers receive funds back
  • All existing cargo tests pass
  • cargo clippy passes with zero warnings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 pts

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions