Description:
Most state-mutating functions check is_paused() before proceeding, but two critical functions do not:
-
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.
-
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:
Relevant Files: contracts/invoice_liquidity/src/lib.rs:1451-1486, contracts/invoice_liquidity/src/lib.rs:1811-1878
Description:
Most state-mutating functions check
is_paused()before proceeding, but two critical functions do not:expire_invoice(lib.rs:1451-1486) — transitions expired invoices without checking pause state. During an emergency pause, expired invoices can still be moved toDefaulted, potentially triggering unwanted fund movements.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:
if is_paused(&env) { return Err(ContractError::ContractPaused); }toexpire_invoiceif is_paused(&env) { return Err(ContractError::ContractPaused); }toappeal_defaultexpire_invoicefails when pausedappeal_defaultfails when pausedRelevant Files:
contracts/invoice_liquidity/src/lib.rs:1451-1486,contracts/invoice_liquidity/src/lib.rs:1811-1878