This thread is now self-moderated. The previous one got derailed. Please, don't discuss here whether or not the Lightning Network is a good scaling solution.
If you don't know anything about the Lightning Network, consider reading "Basics of The Lightning Network" first.
Table of contents
1. Lightning basics
2. Wallets
3. Running a node
4. Concerns
5. Other questions
Lightning basics
How are coins on the Lightning Network different from the on-chain ones?
They are exactly the same coins. They are stored in a multi-signature address and transactions are settled between two parties without broadcasting anything to the blockchain (except when opening and closing the channel). Every time a payment is settled, a new commitment transaction is signed. Such a transaction reflects the current state of the channel and can be broadcast if one of the participant disappears.
How many times can a payment channel be used?
Payment channels can be used as long as both parties continue to cooperate with each other. Channels do not have any use or time limit.
How large is the Lightning Network?
The total number of nodes, channels and network capacity has been constantly increasing for quite some time now. You can use 1ml.com to see up-to-date statistics. Keep in mind that some channels are private; they are not advertised across the network so they are not included in those stats.
How fast are Lightning Network payments?
They are usually instantaneous. Although, some payments might take a few seconds if a wallet needs to try multiple different paths.
How often do payments fail?
A payment fails if there is no route to the destination or if there is no enough liquidity in the channels in the selected routing path. The latter problem can be mitigated by splitting the payment into few small chunks and sending them through different paths.
How high are transaction fees?
Most channels charge a base fee and a fee proportional to the amount sent, so the larger the payment, the more you are going to pay. You should pay less than 3 satoshi for transactions <= $10 for most of the time.
Are Lightning Network payments more anonymous than on-chain transactions?
Yes, Lightning Network payments are more anonymous. They use onion routing. In short, when a payment is being routed, an intermediary node knows only the previous and the next node in the path. It is impossible to tell who initiated the payment and what the final destination is.
Wallets
Which wallet would be the best for me?
There are quite a few interesting options for different kinds of users.
No-coiners: Strike
Bitcoin newbies: BlueWallet
Regular users: Phoenix Wallet, Breez Wallet, Blixt Wallet
Advanced users: run your own node Smiley
Electrum also has a built-in support for the Lightning Network. Make sure to read Electrum Lightning Network walkthrough if you decide to give it a try.
Should I run my own node instead of using some wallet?
You could benefit from running your own node in a few ways. Assuming that you would run your node 24/7, you would be able to receive payments at all times. Nodes can also help the network by forwarding payments. You would also be able to take advantage of advanced features like: opening multiple channels in a single transaction, dual-funding and keysend payments.
Do I have to generate an invoice every time I want to receive coins over the Lightning Network?
No, invoiceless (keysend/spontaneous) payments are supported by LND and c-lightning. Most wallets do not support this feature, though.
Why can't I receive coins?
Quote from: https://lightning-wallet.com/using-lightning-wallet#using-lightning-wallet
In order to receive Lightning payments, some conditions must be met:
Nothing can be received immediately after creating a new payment channel, as ‘room’ for incoming funds has to be made by spending some funds first. A payment channel can be thought of as a full bottle of water: in order to pour something in one first has to pour something out.
Each channel implicitly contains a reserve which is unspendable and typically takes about 2% of the channel’s capacity. You must spend an amount matching that reserve to make receiving possible. Unspendable channel reserve is the reason you see a negative receive limit when a new channel is full. It indicates how much you need to spend before anything can be received through the channel.
Every payment request is disposable, they can’t be fulfilled twice. So you will need to issue a new individual payment request for every incoming payment you wish to receive.
Wallet needs to be online in order to receive off-chain funds.
Can I receive a payment when I am offline?
You need to use a third-party service or a custodial wallet (ex. BlueWallet) for that.
Running a node
Which implementation should I choose?
The most popular implementations are: c-lightning, LND and eclair. Each of them offers slightly different features and third-party plugin/software support. You should research it carefully before making a decision. It is impossible to move existing channels between implementations; you would have to reopen them if you changed your mind.
How much money can you make on running a Lightning Network node?
Unless you have a lot of coins, your earnings won't be enough to cover both hardware and maintenance costs. If you are already running a full node to support the network then a small Lightning node won't put much stress on your hardware.
I have been running a small node (6 channels; ~0.10 BTC capacity) for about 3 months now. I earned over 500 satoshi in the first month during which I was experimenting a lot with my fee settings for each channel. In the second and the third month I earned ~110 and ~160 satoshi respectively without paying much attention to my node. If you want to see up-to-date stats, check out The Lightning Network node experience thread.
Does opening new channels help to increase the earnings?
Maybe. There are also a few other things that you should take into account: your fee policy, liquidity and the average capacity of your channels. It doesn't make much sense to open channels only to large nodes. They very likely already have large channels between themselves. It might be a good idea to open channels to medium sized nodes which are at the opposite ends of the network.
Does my node have to route payments?
You can either create private channels which are not advertised across the network or you can set extremely large routing fees for your channels to discourage other people from using them.
How do channel owners get paid for routing payments?
The routing fee is added to the balance of the person who routes the payment. The total fee charged is calculated as follows: basefee + (amount * feerate / 1000000), where amount is the forwarded amount. Both basefee and feerate can be adjusted individually for every channel. Note that the fee is charged based on the settings of the outgoing channel.
Is running a Lightning Network node demanding?
Even a Raspberry Pi 3 B+ is capable of running a Lightning Network node. Check out RaspiBlitz, RaspiBolt or Umbrel for fast setup. I used to run a full Bitcoin node and LND on a 2 GB Raspberry Pi 4 and everything was working fine. It might be also a good idea to get a cheap used laptop instead. If you still want to buy a Raspberry Pi then consider paying extra for the latest model which is far more superior in terms of CPU performance.
Is there any risk in running a Lightning Network node?
Yes, due to many factors. Lightning Network implementations might contain critical bugs which could be exploited to steal funds locked up in channels. A Lightning node is basically a hot wallet. You should not keep any significant amount of coins on it unless you know what you are doing.
If you don't keep your node online 24/7, someone can attempt to cheat by broadcasting an old state of your channel. An online node would normally broadcast a penalty transaction. This can be mitigated by the use of watchtowers.
Do I have to run a full Bitcoin node?
No, LND supports neutrino; c-lightning allows using a pruned node. It might be a bumpy experience, though. Keep in mind that you might encounter some problems if your Lightning software crashes. Your Bitcoin node could delete a block which still hasn't been processed by your Lightning node.
How do I backup my channels?
You cannot restore your channels from your seed. The backup process varies on the implementation.
LND: you should back up your channel.backup file whenever you open a new channel. You can use it to reconnect to your peers and ask them to close the channel forcefully. Note that if the other node is offline or refuses to cooperate, you won't be able to recover your coins.
c-lightning: read this; you will probably end up using a backup plugin which maintains a full copy of your channel database. You can keep using your channels after restoring such backup.
Can I refill my channel?
Currently, it is impossible to refill a channel without the use of third-party services. Splicing is supposed to address this problem. It will allow to increase/decrease the total capacity of the channel without closing it.
You can use Boltz, Lightning Conductor, ZigZag to exchange on-chain coins to off-chain ones and vice-versa.
How do I balance my channel?
You can balance your channel by spending coins from it. See the answer above. You can also use those services to convert your off-chain balance to an on-chain transaction.
You can open a dual-funded channel. This feature is currently available only in c-lightning and requires both users to enable it manually.
You can also try setting both your base fee and PPM temporarily to zero or some low value to encourage other people to use your channel. Although, you will have no control over the amount of coins that gets moved to the other side in the process.
What happens to milisatoshis when the channel is being closed?
Example: let's assume that after deducting the fee of the closing transaction, node A is supposed to get 6049.4 sat and node B 10300.6 satoshis. Since Bitcoin blockchain supports only up to 8 decimals, we have to do something about milisatoshis. All such values are rounded down and the remaining 1 satoshi is added to the transaction fee.
It is also worth mentioning that if one of the parties' balance is under the dust limit, it is added to the fee instead.
Who pays the channel opening and closing transaction fee?
The channel opening transaction fee is always paid by the founder of the channel. If the channel is closed cooperatively then the founder also covers the transaction fee. An uncooperative channel close involves two on-chain transactions. If the channel is closed by the other participant then they cover the fee of the second transaction.
How does uncooperative channel close work?
Quote from: Rath_ on July 06, 2021, 01:00:54 PM
First of all, the timelock is decided before the channel is established. By default, most nodes force the other peer to wait 144 blocks (~1 day). The maximum acceptable value by default is 2016 blocks (~2 weeks). I configured my node to create channels with their_to_self_delay = 432 blocks (~3 days), so if someone decides to close the channel opened to my node uncooperatively, they will have to wait 432 blocks (after the commitment transaction has been included in a block) before they can spend the output belonging to them. Those timelocks are relative which means that you do not have to sign a new commitment transaction whenever a new block is mined. New commitment transactions are signed periodically because their fees need to match the current state of the mempool. There is no point in paying 60 sat/vbyte when 1 sat/vbyte transactions are getting confirmed in just a few minutes. It also applies the other way around.
The first transaction is the commitment transaction. Let's say there's node A(lice) and node B(ob), and node A broadcasts the commitment transaction. That commitment transaction includes two outputs:
- output #0: 3 BTC (spendable by node B's private key) - reflecting node B balance
- output #1: 6 BTC (RSMC) - reflecting node A balance
There is one more important detail before we go any further. Whenever a new commitment transaction is signed, both parties exchange revocation keys for the previous commitment transaction so that they can both be sure that the other party is very unlikely to broadcast an old state of the channel.
RSMC is short for Revocable Sequence Maturing Contract. Such an output contains a relative timelock. This means that you can't spend this output until a certain amount of blocks have been mined since the transaction which includes that output was mined.
Let's say node B didn't change the default value of 144 blocks and the commitment transaction has been confirmed. There are two possible scenarios.
Node A attempts to cheat and broadcast an old commitment transaction. Node B has 144 blocks to spend the RSMC output using his and node A's revocation key which he got while they were working on a new commitment transaction.
Node A broadcasts the latest commitment transaction. In such a case, node B never got node A's revocation key for that commitment transaction, so he cannot spend that RSMC. Node A can broadcast another transaction spending that output after 144 blocks have been mined.
Concerns
Is the Lightning Network centralized?
The common argument is that users are more likely to open channels to large nodes rather than small/medium ones. While that's true, as the networks continues to grow, we can expect hundreds or even thousands of nodes to concentrate end users. This post speculates on possible types of nodes; you should read it if you are still concerned.
Can it have a negative impact on the first layer?
If many channels are closed at once, the transaction fees could immediately spike and remain high for an extended period of time.
Does the Lightning Network solve Bitcoin's scalability problem?
Not completely. The Lightning Network was designed mostly for micro-transactions which would not be cost-effective on the first layer. Large payments are also feasible thanks to multi-path payments. Opening a channel involves an on-chain transaction so if we expect every user to open at least one channel, the blockchain would quickly become congested for a long time. Thus, other scaling solutions are needed. Alternatively, more layers can be built on top of the Lightning Network.
What would happen if some nodes went temporarily offline?
Should many large nodes go offline at the same time, payment failures might become more common. If you have only one channel and your peer goes offline then you obviously won't be able to send and receive any payments.
Other questions
What shops accept Lightning Network payments?
Here you can find a list of merchants who accept LN payments.
Do any exchanges support the Lightning Network?
Yes, the biggest exchange which supports Lightning deposits and withdrawals is Bitfinex. Here you can find an up-to-date list of exchanges which support the LN.
What are the upcoming features?
Dual funded channels - both parties will be able to fund a channel. This feature is available in c-lightning (experimentally).
Splicing-In & Out - it will be possible to add and remove funds from existing Lightning Network channels without having to close them.
Channel factories - existing Lightning Network channels could be used for creating new channels without broadcasting anything to the Bitcoin network. Normally, a channel is opened to only one person. In channel factories, there is a group of people. Group members maintain channels between themselves. More involved users = more savings. If one of the participants is uncooperative, existing channels are not affected - new channels can't be created, though.