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

Add some checks on provided payment details

Public commit record

What the developer wrote

Authored by Elias Rohrer

68/100 · Adequate
Add some checks on provided payment details

As per spec, we check that the user provides at least one payment detail
*and* that they don't provide onchain payment details if
`refund_onchain_address` is unset.

Signed-off-by: Elias Rohrer <dev@tnull.de>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds validation checks in the LSPS1 (liquidity service) code to make sure a service provider cannot accidentally offer on-chain Bitcoin refunds when the customer never gave a refund address. It also requires at least one payment method and ensures each payment method starts in the correct initial state. The change is defensive: it prevents protocol non-compliance and reduces the risk of funds being sent to an unknown address if a channel opening fails.

Recommended action

Review is sufficient; this is a hardening/spec-compliance change. Ensure downstream service implementations handle the new APIMisuseError variants gracefully and that documentation reflects the requirement to provide a refund_onchain_address before offering on-chain payments.

Security signals we found

01

Prevents on-chain refund offers when no refund_onchain_address was supplied, avoiding potential loss of refund funds

02

Adds input validation (at least one payment detail) to avoid empty payment option responses

03

Adds state validation to ensure payment methods start in ExpectPayment

04

Validates request before removing it from peer state, improving retry behavior on operator error

Risk score

Why this scored 36/100

Our methodology →
Potential impact 8/30
Exploitability 6/25
Stealth signal 4/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/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.