Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open channels with unconfirmed UTXOs #13

Open
mayankchhabra opened this issue Nov 5, 2020 · 3 comments · May be fixed by getumbrel/umbrel-middleware#72
Open

Open channels with unconfirmed UTXOs #13

mayankchhabra opened this issue Nov 5, 2020 · 3 comments · May be fixed by getumbrel/umbrel-middleware#72
Labels
enhancement New feature or request

Comments

@mayankchhabra
Copy link
Member

Currently, we don't allow opening channels with unconfirmed UTXOs, which results in poor UX. The user has to wait for funds to confirm after every deposit or channel open/close transaction to open a new channel. This can easily be fixed by setting spend_unconfirmed to true in the channel open gRPC.

@mayankchhabra mayankchhabra added the enhancement New feature or request label Nov 5, 2020
@nolim1t
Copy link

nolim1t commented Nov 7, 2020

This might not be good practice.. especially if RBF is enabled. can easily exploit things.

We should always wait for confirmations.

@lukechilds
Copy link
Member

lukechilds commented Nov 10, 2020

This might not be good practice.. especially if RBF is enabled. can easily exploit things.

@nolimit How do you think this could be easily exploited?

Normally a merchant shouldn't accept a zero conf transaction for goods because if the customer has the goods and then double spends the transactions back to themselves then the merchant has lost the goods and doesn't have the payment.

That isn't relevant in the scenario of Umbrel. Users shouldn't be receiving transactions from third parties in the on-chain wallet on Umbrel, only depositing themselves for opening channels. They also aren't giving out goods. And transaction double spends also aren't very easy to pull off without RBF.

So the worse case scenario would be if an Umbrel user:

  • was accepting transactions from other people on their on-chain dashboard wallet (not intended use case)
  • the sender then double spent the transaction (not that easy to pull off)
  • Umbrel user then immediately opens a channel with this exact UTXO (unlikely)
  • now the channel will just not be opened (not that bad)

That's not a very likely scenario and the downsides are minor.

Compared with the current situation for all users in the common scenario of depositing some funds and opening some channels:

  • Deposit funds on Umbrel
  • Go to open channel (error due to no confirmations)
  • Wait
  • Go to open channel (works)
  • Go to open another channel (error due to no confirmations)
  • Wait
  • Go to open channel (works)

This is a pretty poor user experience and it would be solved by allowing channels to be opened with unconfirmed UTXOs.

We should always wait for confirmations.

There are times when it's not that important to wait for confirmation. e.g when the transaction comes from yourself so you know it won't be double spent or if there are no downsides to the UTXO being double spent (both applicable here).

@lukechilds
Copy link
Member

I don't see a non trivial way to implement fee calculations with this since all our current logic requires on LNDs estimateFee RPC which only takes confirmed inputs into account.

Relevant issue here: lightningnetwork/lnd#4764

@nmfretz nmfretz transferred this issue from getumbrel/umbrel May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants