loop/loopd
Slyghtning 6582aa0807
staticaddr/loopin: check deposits before htlc signing
Before we send HTLC signatures to the server, the server cannot publish
the HTLC transaction. After those signatures are handed over, the server
can publish an HTLC that spends the selected deposits even if it never
pays the swap invoice.

Defend against stale local deposit state by checking the wallet's current
txout view immediately before signing. A deposit can have been spent by a
known withdrawal, channel open, timeout sweep, replacement, or another
wallet transaction while the loop-in FSM is recovering or while earlier
state still marked it as selected.

Failing before signing leaves the server without spend authority over an
unavailable input. Include mempool spends in the check so wallet-known
unconfirmed spends are treated as unavailable too.
2026-07-08 09:02:06 +02:00
..
config.go liquidity: gate static autoloop 2026-05-22 02:32:15 -05:00
daemon.go staticaddr/loopin: check deposits before htlc signing 2026-07-08 09:02:06 +02:00
daemon_test.go loopd: test error reporting logic 2025-12-20 06:31:02 +01:00
htlc_confirmed_recovery.go loopd: recover confirmed htlcs with direct sweep 2026-05-29 23:00:29 -05:00
htlc_confirmed_recovery_test.go loopd: recover confirmed htlcs with direct sweep 2026-05-29 23:00:29 -05:00
log.go loopd: add missing debugf logging helper 2026-05-29 23:00:29 -05:00
macaroons.go loopd: move RequiredPermissions to dedicated dir 2022-06-14 15:13:34 +02:00
migration.go loopd: fix data races of logger 2025-03-19 15:00:30 +01:00
register_default.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
run.go loopd: raise minimum lnd version to v0.18.4-beta 2026-06-16 01:12:03 -05:00
swapclient_server.go staticaddr/deposit: guard confirmation height access 2026-07-08 09:01:01 +02:00
swapclient_server_debug.go make fmt 2022-05-20 10:16:47 +02:00
swapclient_server_test.go loopd: test static address swap rpc fields 2026-06-03 13:15:01 -05:00
sweep_htlc.go loopd: prefer stored destination in sweephtlc 2026-05-29 23:00:29 -05:00
sweep_htlc_test.go loopd: prefer stored destination in sweephtlc 2026-05-29 23:00:29 -05:00
utils.go liquidity: gate static autoloop 2026-05-22 02:32:15 -05:00
view.go multi: update linter, fix issues 2025-03-10 22:59:50 +01:00