AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 24 Bitcoin

walletrpc: expose configurable output leases

Public commit record

What the developer wrote

Authored by Andras Banki-Horvath

68/100 · Adequate
walletrpc: expose configurable output leases

Add optional confirmation-depth fields to LeaseOutput and FundPsbt. A
non-zero value selects a lease that ignores wall-clock expiry and
releases at the requested spend depth or by explicit owner release. Zero
preserves time-controlled leases.

Resolve wallet capability before acquiring inputs so unsupported
backends fail closed even when FundPsbt selects no new input. Echo the
accepted depth after installation, and expose persisted spend height
through ListLeases so clients can observe confirmation and reorg
progress.

Cover option forwarding, zero-depth compatibility, unsupported wallets,
partial acquisition rollback, and response marshalling.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a new optional feature to LND's wallet RPC that lets callers lock a coin (a 'UTXO lease') until the transaction spending it reaches a chosen number of confirmations, instead of relying only on a clock-time expiration. It also exposes more lease information in responses and lists. The change is defensive: it checks wallet support before locking, rejects unsupported wallets, requires a caller-chosen lock ID for the new mode, and preserves the old time-based behavior when the new option is not used. There is no direct evidence in the commit of a fixed vulnerability; it reads like a capability addition with safety checks.

Recommended action

Treat as a feature commit with embedded hardening rather than a security patch. Reviewers should verify that the new confirmation-depth lease logic in the underlying lnwallet package correctly handles reorgs, maturity resets, and explicit release semantics, since this commit only wires RPC behavior and tests around it. Operators using the new option should ensure they persist the custom lock ID and understand that abandoned unconfirmed PSBTs must be released manually.

Security signals we found

01

New RPC option changes lease lifecycle from time-based to confirmation-based

02

Fail-closed capability check before acquiring any input lease

03

Custom lock ID required and validated for confirmation-controlled FundPsbt leases

04

Unsupported wallet backends rejected instead of silently falling back to time-only leases

05

Partial lock acquisition rollback path retained and tested

06

Response fields added to expose effective depth and confirmed spend height

Risk score

Why this scored 24/100

Our methodology →
Potential impact 4/30
Exploitability 3/25
Stealth signal 2/15
Affected reach 5/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.