Open mayankchhabra opened 3 years ago
This might not be good practice.. especially if RBF is enabled. can easily exploit things.
We should always wait for confirmations.
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:
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:
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).
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: https://github.com/lightningnetwork/lnd/issues/4764
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
totrue
in the channel open gRPC.