Skip to content

feat: add configurable routing fee leeway for Loop Out off-chain payments - #53

Merged
TrezorHannes merged 1 commit into
mainfrom
feat/loop-fee-leeway-headroom
Sep 21, 2026
Merged

TrezorHannes merged 1 commit into
mainfrom
feat/loop-fee-leeway-headroom

Conversation

@TrezorHannes

Copy link
Copy Markdown
Owner

Summary of Changes

  • Root Cause Resolution: Addressed rigid fee limit capping in loop out that previously passed --max_swap_routing_fee with only a tight 1.5x buffer, causing LND/loopd pathfinding to fail with FAILURE_REASON_NO_ROUTE when attempting multi-path (MPP) shards or alternative intermediate hops.
  • Configurable Routing Fee Leeway:
    • Implemented calculate_max_routing_fee_budget() with default 100% leeway (2.0x headroom) and 500 sat base buffer.
    • Added --fee-leeway-pct CLI flag and fee_leeway_pct / fee_leeway_base_sats options in config.ini.
    • Allowed passing --max-routing-fee 0 to explicitly omit fee limits and let Loop daemon use its native default.
  • Enhanced Operator UX:
    • Displays both estimated probed fee and maximum routing fee budget (with satoshi leeway) on CLI before dispatching.
    • Updated simulated command in --dry-run to accurately print fee budget parameters.
  • Testing & Documentation:
    • Added 5 new unit tests in tests/Other/test_swap_out_loop.py (96/96 tests pass).
    • Updated Other/swap_out-loop.md and config.ini.example.

@TrezorHannes
TrezorHannes merged commit aedb1ff into main Sep 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant