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
Implement a configurable per-channel settlement trigger so nodes can automatically submit on-chain settlement when a channel's outstanding voucher value crosses a governance-set threshold #742
design:economicsToken economics, pricing, fee split, bond sizingkind:featureNew capability or a change to current behaviorrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Currently nodes accumulate vouchers indefinitely until an operator manually triggers settlement; a large unsubmitted voucher balance is at risk if a client goes dark before the dispute window. An auto-settle threshold (in USDC or voucher count) configurable in node.toml would reduce operator exposure and align with the ADR 003 payment-channel lifecycle.
Running a partial withdraw is also okay, as that solves the problem from a node's perspective.
Client counterpart of this should be calling settle if the node is offline, potentially using on-chain proof via a log filter that the node is still active and/or bonded
This feature request asks for an auto-settlement trigger in the incentive crate: when a payment channel's outstanding voucher value (in USDC or by count) crosses a configurable threshold, the node should automatically submit the on-chain settlement rather than waiting for operator intervention. The motivation is to bound operator risk when a client goes dark before the dispute window closes. The config surface proposed is node.toml, aligning with ADR 003's payment-channel lifecycle.
📊 Assessment
Dimension
Value
Reasoning
Type
Feature
New automated behaviour in the incentive subsystem
Labels
enhancement, technical, economics, rust
Rust implementation in crates/incentive; touches payment-channel economics; no ADR conflict detected
Coding agent
Suitable
Requirements are well-scoped: add a threshold config key, wire it into the voucher-accumulation loop in crates/incentive, and trigger settlement when the threshold is crossed
💡 Notes and suggestions
Scope & implementation pointers
The relevant code is in crates/incentive — the voucher accumulation path and channel state machine are the primary touch points.
ADR 003 describes the payment-channel lifecycle; any settlement trigger must fit within its dispute-window and finality model. No ADR change appears needed for a purely operational trigger.
The config key should be added to the common/config-types schema (e.g., [incentive] auto_settle_threshold_usdc = ... and/or auto_settle_voucher_count = ...) so both the node config and any future CLI exposure pick it up cleanly.
Consider a sensible default (e.g., threshold = 0 / disabled) so existing deployments are unaffected.
The threshold check can be performed after each voucher is appended; a background task polling at a fixed interval is an alternative but adds latency.
Anti-panic policy: no .unwrap()/.expect() — use Result combinators throughout.
Sub-tasks checklist
Add auto_settle_threshold_usdc (and optionally auto_settle_voucher_count) to the config schema in config-types or common
Load and expose the threshold in the incentive crate's channel manager
After each voucher accumulation, compare outstanding value against the threshold and trigger on-chain settlement if exceeded
design:economicsToken economics, pricing, fee split, bond sizingkind:featureNew capability or a change to current behaviorrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity
alpergundogdu commentedon May 31, 2026
Running a partial withdraw is also okay, as that solves the problem from a node's perspective.
Client counterpart of this should be calling settle if the node is offline, potentially using on-chain proof via a log filter that the node is still active and/or bonded
github-actions commentedon May 31, 2026
🎯 Triage report
This feature request asks for an auto-settlement trigger in the
incentivecrate: when a payment channel's outstanding voucher value (in USDC or by count) crosses a configurable threshold, the node should automatically submit the on-chain settlement rather than waiting for operator intervention. The motivation is to bound operator risk when a client goes dark before the dispute window closes. The config surface proposed isnode.toml, aligning with ADR 003's payment-channel lifecycle.📊 Assessment
enhancement,technical,economics,rustcrates/incentive; touches payment-channel economics; no ADR conflict detectedcrates/incentive, and trigger settlement when the threshold is crossed💡 Notes and suggestions
Scope & implementation pointers
crates/incentive— the voucher accumulation path and channel state machine are the primary touch points.common/config-typesschema (e.g.,[incentive] auto_settle_threshold_usdc = ...and/orauto_settle_voucher_count = ...) so both the node config and any future CLI exposure pick it up cleanly..unwrap()/.expect()— useResultcombinators throughout.Sub-tasks checklist
auto_settle_threshold_usdc(and optionallyauto_settle_voucher_count) to the config schema inconfig-typesorcommonincentivecrate's channel managernode.tomlexample / docs with the new keysunwrap/expectintroduced (cargo clippy)Add this agentic workflows to your repo
To install this agentic workflow, run
fix(node): retire channel on auto-settle close + instrument failures …
feat(node): configurable per-channel auto-settlement trigger (#742) (#…
refactor(node): remove dead pairwise-channel dispute/close/settle met…
refactor(node): drop PaymentPool close monitor; lean on the redeem sw…