Explore: Auto-forward DCA distributions to external wallet #8

Open
opened 2026-01-11 15:04:31 +00:00 by padreug · 0 comments
Owner

Overview

Explore options for automatically forwarding DCA distributions from a user's LNbits wallet to their external wallet (e.g., Phoenix, Zeus, hardware wallet via LN address).

Context

Currently, DCA distributions land in the user's LNbits wallet. Some users may prefer automatic forwarding to:

  • A self-custody mobile wallet (Phoenix, Breez, Zeus)
  • A hardware wallet via Lightning address
  • A different LNbits instance
  • Any LN address or LNURL

Questions to Explore

  1. Where should this be configured?

    • In satmachineclient (per-user DCA setting)?
    • In LNbits itself (applies to all incoming payments)?
    • Combination (satmachineclient enables, LNbits handles execution)?
  2. Implementation approaches:

    • Adapt splitpayments extension pattern (100% to 1 target)
    • Use LNbits webhooks/tasks to trigger on incoming payment
    • Build into satmachineclient as optional forwarding destination
  3. Failure handling (CRITICAL):

    • On any failure to forward, sats MUST remain in user's LNbits wallet
    • Never lose funds - forwarding is best-effort
    • Log failures for user visibility

Reference: splitpayments Extension

The splitpayments extension splits incoming payments across multiple targets. We'd adapt this pattern for:

  • Single target (100% forwarding)
  • User-specified destination (LN address, LNURL, or bolt11)
  • Per-wallet or per-user configuration

Potential Scope Options

Option A: LNbits-level (outside satmachine)

Configure forwarding at the LNbits wallet level - applies to ALL incoming payments, not just DCA.

Pros: Simple, reusable, not DCA-specific
Cons: User might not want all payments forwarded

Option B: satmachineclient setting

User configures forwarding destination in their DCA client settings.

Pros: DCA-specific, user controls per-extension
Cons: More complexity in satmachineclient

Option C: Hybrid

satmachineclient has "enable auto-forward" toggle, actual forwarding handled by LNbits mechanism (webhook, extension, or core feature).

Acceptance Criteria (for eventual implementation)

  • User can specify external destination (LN address preferred)
  • Successful forwards are logged/visible to user
  • Failed forwards leave sats in LNbits wallet (safe fallback)
  • User can disable forwarding at any time
  • Works with standard LN addresses and LNURL

Notes

This is an exploratory issue. Implementation may span multiple repos (satmachineclient, LNbits core, or new extension).

## Overview Explore options for automatically forwarding DCA distributions from a user's LNbits wallet to their external wallet (e.g., Phoenix, Zeus, hardware wallet via LN address). ## Context Currently, DCA distributions land in the user's LNbits wallet. Some users may prefer automatic forwarding to: - A self-custody mobile wallet (Phoenix, Breez, Zeus) - A hardware wallet via Lightning address - A different LNbits instance - Any LN address or LNURL ## Questions to Explore 1. **Where should this be configured?** - In satmachineclient (per-user DCA setting)? - In LNbits itself (applies to all incoming payments)? - Combination (satmachineclient enables, LNbits handles execution)? 2. **Implementation approaches:** - Adapt `splitpayments` extension pattern (100% to 1 target) - Use LNbits webhooks/tasks to trigger on incoming payment - Build into satmachineclient as optional forwarding destination 3. **Failure handling (CRITICAL):** - On any failure to forward, sats MUST remain in user's LNbits wallet - Never lose funds - forwarding is best-effort - Log failures for user visibility ## Reference: splitpayments Extension The `splitpayments` extension splits incoming payments across multiple targets. We'd adapt this pattern for: - Single target (100% forwarding) - User-specified destination (LN address, LNURL, or bolt11) - Per-wallet or per-user configuration ## Potential Scope Options ### Option A: LNbits-level (outside satmachine) Configure forwarding at the LNbits wallet level - applies to ALL incoming payments, not just DCA. **Pros:** Simple, reusable, not DCA-specific **Cons:** User might not want all payments forwarded ### Option B: satmachineclient setting User configures forwarding destination in their DCA client settings. **Pros:** DCA-specific, user controls per-extension **Cons:** More complexity in satmachineclient ### Option C: Hybrid satmachineclient has "enable auto-forward" toggle, actual forwarding handled by LNbits mechanism (webhook, extension, or core feature). ## Acceptance Criteria (for eventual implementation) - [ ] User can specify external destination (LN address preferred) - [ ] Successful forwards are logged/visible to user - [ ] Failed forwards leave sats in LNbits wallet (safe fallback) - [ ] User can disable forwarding at any time - [ ] Works with standard LN addresses and LNURL ## Notes This is an exploratory issue. Implementation may span multiple repos (satmachineclient, LNbits core, or new extension).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aiolabs/satmachineadmin#8
No description provided.