Label: complexity: high
Points: 200
Description
Manual dispute resolution requires human arbiters and delays. This issue adds auto_resolve_rules: Vec<ResolveRule> — pre-agreed conditions (e.g. "if funded > 50% release to recipients, else refund payers") evaluated automatically when a dispute is filed, resolving without human intervention.
Technical Context
Involves types.rs — define ResolveRule { min_funded_bps: u32, action: ResolveAction } where ResolveAction is Release or Refund. In lib.rs, add auto_resolve(env, invoice_id) that evaluates rules in order against invoice.funded / total, executing the first matching action.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Manual dispute resolution requires human arbiters and delays. This issue adds
auto_resolve_rules: Vec<ResolveRule>— pre-agreed conditions (e.g. "if funded > 50% release to recipients, else refund payers") evaluated automatically when a dispute is filed, resolving without human intervention.Technical Context
Involves
types.rs— defineResolveRule { min_funded_bps: u32, action: ResolveAction }whereResolveActionisReleaseorRefund. Inlib.rs, addauto_resolve(env, invoice_id)that evaluates rules in order againstinvoice.funded / total, executing the first matching action.Acceptance Criteria
create_invoice()acceptsauto_resolve_rulesVecauto_resolve()evaluates rules in order and executes first matchReleaseaction calls_release(),Refundaction calls refund logic"no matching resolution rule"cargo clippypasses with zero warnings