ACINQ / phoenix

Phoenix is a self-custodial Bitcoin wallet using Lightning to send/receive payments.
https://phoenix.acinq.co
Apache License 2.0
632 stars 95 forks source link

Phoenix wallet fails to reach one of two main Lightning Network objectives? #380

Closed jbrepogmailcom closed 1 year ago

jbrepogmailcom commented 1 year ago

Hello. One of two LN objectives is (beside scalability) lower cost of transactions. Consider these two scenarios:

1) No Lightning network, ordinary wallet: If you send 1000 USD, the cost of transaction is now around 10sat/byte, which is around 0.5 USD.

2) You use Phoenix wallet. Your read documentation which says that creating LN channel costs 1%. Ok, so you send 5USD by blockchain transaction to fund LN channel and you are charged 0.05 USD. That is fine. Now you think you have created a channel, funded it and paid the fee. So you decide to fund channel even more and you send 1000 USD. However, that fund is not added to already existing channel, but a new channel is created and you are charged fee again! It may be a bit less than 1%, in my experience it was about 0.5% - 5 USD. So now if you want to pay LN transaction, you are already charged 0.5%. Any other transaction cost is added to that 0.5%.

So in case 2, when using Phoenix wallet, in this example the cost of transaction is at least 10x higher than cost of transaction on BTC blockchain.

Can you please explain me where I am wrong? Or does use of Phoenix wallet really makes costs of transaction much more expensive than transaction on blockchain and not 0.0029%, which is median of LN fee? Thanks.

robbiehanson commented 1 year ago

A lot of people have questions about lightning fees, so thanks for reaching out.

Lightning channels (L2) are created via a blockchain transaction (L1). So in general, the benefits you receive are related to batching.

Let's continue with your example from above. You have approximately 1,000 USD in your Phoenix wallet. Now imagine that you spend all that money over the course of the next month. The average transaction is about 10 USD, which means you performed 100 transactions. And let's say you paid a fee of 0.4% for each LN transaction.

If you had performed all those transactions via L1, you would have paid: 102 tx's 0.50 USD (per L1 tx) = 51 USD. But on L2 you paid: 1 USD (to open 2 channels) + (1,000 USD 0.004) = 5 USD

This is "batching" your payments onto lightning. It's similar to the common metaphor of payments at a bar. Rather than paying for each individual drink, the bartender keeps a tab, and you pay when you're done. This actually saves the bar money - because generally a credit card payment has both a fixed & percentage cost (e.g. $0.30 + amount * 2.9%). [1] So the bar is incentived to reduce the number of credit card transactions. In a similar manner, you're incentivized to reduce the number of L1 transactions. You can do that by moving a sizable amount of money into L2, and then spending it down over time.

The next month, let's imagine that somebody sends you a 1,000 USD payment over lightning. Since you already have the liquidity, you pay nothing to receive the payment.

That is, you had an existing payment channel with 0 on your side, and 1,000 USD on the other side. The incoming payment "recycles" the liquidity by moving it back to your side of the channel.

And now you spend that 1,000 USD over the next month. So instead of another 100 tx's on L1, you have another 100 tx's on L2, with all the cost savings again.

We recognize that Phoenix isn't perfect, and we're working hard to make improvements. Have you heard about the new version of Phoenix that's coming soon ?

https://acinq.co/blog/phoenix-splicing-update

jbrepogmailcom commented 1 year ago

Thanks very much for the explanation, I understand. I recommend to put this to FAQ, I may not be the only one asking about this.