lightninglabs / lightninglabs/pool

Feature request: enable funding of accounts from an external wallet

Open
#183 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

advanced feature request
Dominant language
Go
Stars
259
Forks
51
PR merge metrics
No merged PRs in 30d

Description

Whether creating new accounts or depositing into existing ones, there should be an option to fund accounts via an external deposit mechanism -- read: not directly from the connected LND node. This is useful for a few reasons:

1. It eliminates a source of double-fee deposits; if I want to deposit more BTC into my pool account but my LND node doesn't have enough free balance, I have to first deposit BTC into my LND wallet (and thus, pay a fee for that transaction) and then run DepositAccount() to transfer that BTC from LND to pool (thus, paying a second transaction fee).
2. This would enable rapid, "on-the-go" deposits; as above, instead of needing to wait for two transactions to confirm, I could simply deposit BTC straight into my Pool account and be ready to go within the allotted confirmation target.
3. It eliminates a source of headaches with regard to using LND; currently, LND will tie up its **entire** wallet balance as unusable for every single withdrawal until said withdrawal transaction confirms. Allowing for external deposits will remove this factor, allowing for simultaneous use of LND as well as Pool.

Pool already has a mechanism for creating a deposit address and for awaiting the confirmation of a transaction before fully opening the account. Given this, it should be possible for poold to be funded via an external wallet.

My thought process is to have the account creation function create an address which can be deposited to, and then watch for deposits to that address, rather than expecting a specific Outpoint from LND.

I can spend a little time implementing some of this via a PR, as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing account creation, DepositAccount(), and Pool's existing deposit-address and confirmation flow in poold. Done means new and existing accounts can be funded from an external wallet, with deposits watched until the required confirmation target is reached without requiring a transfer from the connected LND node.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.