You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
contracts: PaymentChannel.withdraw reverts under a paused FeeRouter (provider-only, no client funds stranded) #890
Follow-up to #849 / #889, kept out of that PR's scope per review convention.
Context
PaymentChannel.withdraw (contracts/src/PaymentChannel.sol:377) routes the provider's claimed delta through _route → FeeRouter.routeSettlement, which is whenNotPaused. While the router is paused, withdraw reverts entirely, so a provider cannot pull its earned share until the router is unpaused.
Unlike the settleChannel case fixed in #889, this strands no client funds and does not bundle a client refund — the channel stays Open, and the provider simply retries withdraw after unpause. So the impact is a temporary, provider-only delay during an emergency pause, not a fund-freeze.
Decision needed
Decide whether to (a) leave withdraw as-is (provider retries post-unpause — acceptable given pause is emergency-multisig-gated and temporary), or (b) apply the same deferred-settlement tolerance used for settleChannel so an in-progress withdraw doesn't revert under pause.
Recommendation: likely (a) — but worth an explicit call.
This is a well-scoped follow-up to #849, isolating the withdraw path of PaymentChannel as a second site where FeeRouter.routeSettlement (whenNotPaused) blocks operation during an emergency pause. Crucially, impact is materially lower than #849: no client funds are at risk, the channel stays Open, and the provider can simply retry after unpause. The issue is asking for an explicit architectural decision rather than reporting an unambiguous defect.
📊 Assessment
Dimension
Value
Reasoning
Type
Bug
Behavioral regression under pause — consistent with #849's type; lower severity but same root
Issue explicitly requests a call between two design options before any fix is warranted
Coding agent
Needs more info
The code path and both options are clearly described, but a maintainer must decide (a) vs (b) first; if (b), the fix closely mirrors #889's deferred-settlement pattern and would be well-suited for agent execution
Channel stays Open on revert; provider retries post-unpause. No reclaim path is blocked.
Decision frame:
Option (a) — leave as-is: Acceptable given (1) pause is emergency-multisig-gated and expected to be temporary, (2) the channel stays Open so the provider is not permanently locked out, (3) no client funds are entangled. The author leans here.
Option (b) — deferred-settlement tolerance: Apply the same pattern used in fix(contracts): don't let a paused FeeRouter freeze the settleChannel client refund (#849) #889: separate the fund disbursement from the routing call, allow the routing leg to be retried/settled post-pause. More complex but brings withdraw fully in line with the "exits always open" invariant and eliminates the corner case.
If (b) is chosen, the scope is narrow and well-defined:
Identify the exact _route call in withdraw and split out the provider-share routing as a retryable step
Verify no new reentrancy surface is introduced
Add a Foundry test: pause FeeRouter mid-withdraw, assert withdraw reverts (current), then test post-pause retry succeeds
Check whether any other PaymentChannel entry points call _route and need the same treatment (audit completeness)
Suggested next step: A maintainer explicitly records the decision in this issue (or closes as wontfix if (a)) so the missing-decision label can be cleared.
Activity
github-actions commentedon Jun 13, 2026
🎯 Triage report
This is a well-scoped follow-up to #849, isolating the
withdrawpath ofPaymentChannelas a second site whereFeeRouter.routeSettlement(whenNotPaused) blocks operation during an emergency pause. Crucially, impact is materially lower than #849: no client funds are at risk, the channel staysOpen, and the provider can simply retry after unpause. The issue is asking for an explicit architectural decision rather than reporting an unambiguous defect.📊 Assessment
missing-decisionadded;bug,technical,lowretained🔗 Similar issues
FeeRouter.routeSettlementiswhenNotPaused), same contract, but affectssettleChannel+ blocks client refunds (medium severity). Fixed by PR fix(contracts): don't let a paused FeeRouter freeze the settleChannel client refund (#849) #889 which is the direct predecessor of this issue.💡 Notes and suggestions
Code path (for reviewer reference):
PaymentChannel.withdraw(PaymentChannel.sol:377) →_route(...)(PaymentChannel.sol:648-655) →FeeRouter.routeSettlement(FeeRouter.sol:195-201,whenNotPaused)Openon revert; provider retries post-unpause. No reclaim path is blocked.Decision frame:
Openso the provider is not permanently locked out, (3) no client funds are entangled. The author leans here.withdrawfully in line with the "exits always open" invariant and eliminates the corner case.If (b) is chosen, the scope is narrow and well-defined:
_routecall inwithdrawand split out the provider-share routing as a retryable stepPaymentChannelentry points call_routeand need the same treatment (audit completeness)Suggested next step: A maintainer explicitly records the decision in this issue (or closes as wontfix if (a)) so the
missing-decisionlabel can be cleared.Add this agentic workflows to your repo
To install this agentic workflow, run
refactor(contracts): cooperativeClose reverts (not defers) on paused …
feat(contracts): cooperative close on PaymentChannel (fast settle, no…