Skip to content

Implement Swap Arbitration with Timelock #409

@fejilaup-cloud

Description

@fejilaup-cloud

Description

If a swap is disputed, the admin can resolve it, but there is no timelock. A malicious admin could freeze funds indefinitely. Arbitration with timelock would auto-refund if not resolved in time.

Tasks

  • Add arbitration_timeout_seconds: u64 to ProtocolConfig (default 14 days)
  • Implement request_arbitration(env, swap_id, reason) -> u64 — buyer or seller
  • Implement auto_refund_on_arbitration_timeout(env, swap_id) — anyone can call
  • Track arbitration request timestamp and auto-refund after timeout
  • Add tests for arbitration timeout and auto-refund

Priority: High | Estimated Time: 3 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions