Skip to content

Add missing pause checks in expire_invoice and appeal_default #605

Description

@Levi-Ojukwu

Description:

Most state-mutating functions check is_paused() before proceeding, but two critical functions do not:

  1. expire_invoice (lib.rs:1451-1486) — transitions expired invoices without checking pause state. During an emergency pause, expired invoices can still be moved to Defaulted, potentially triggering unwanted fund movements.

  2. appeal_default (lib.rs:1811-1878) — allows filing appeals during emergency pauses. An attacker could file appeals while the contract is paused to manipulate the dispute resolution timeline.

Why it matters: State changes during emergency pauses can interfere with incident response. If the contract is paused due to a discovered vulnerability, allowing expire/appeal operations could worsen the exploit.

Acceptance Criteria:

  • Add if is_paused(&env) { return Err(ContractError::ContractPaused); } to expire_invoice
  • Add if is_paused(&env) { return Err(ContractError::ContractPaused); } to appeal_default
  • Add test: expire_invoice fails when paused
  • Add test: appeal_default fails when paused
  • Audit all remaining functions for missing pause checks

Relevant Files: contracts/invoice_liquidity/src/lib.rs:1451-1486, contracts/invoice_liquidity/src/lib.rs:1811-1878


Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions