Skip to main content
Share Your Experience: Take the 2024 Developer Survey
75 votes
Accepted

How does the Lightning network work in simple terms?

The Lightning Network is a collection of payment channels between pairs of nodes. To create a payment channel, two users commit funds to a UTXO under shared control. The shared funds allow the users ...
Murch's user avatar
  • 75.7k
64 votes
Accepted

What are Channel Factories and how do they work?

What are Channel Factories? In short, Channel Factories are payment channels that can be used to create more payment channels. That sounds weird, but it's really pretty simple: In a regular payment ...
David A. Harding's user avatar
22 votes

How are paths found in Lightning Network?

Note: This answer was written in Spring 2016 and has since been overtaken by an actual spec and multiple implementations. I'm hoping to update this answer shortly. Summarizing mostly from r/bitcoin: ...
Murch's user avatar
  • 75.7k
18 votes
Accepted

What security weaknesses result from using off chain solutions?

TL;DR: The security assumptions of using a LN channel for payments: The blockchain is functioning well (confirming transactions quickly) Channel nodes can keep secret data safe There aren't any ...
morsecoder's user avatar
  • 14.2k
17 votes
Accepted

Is centralization in the Lightning network inevitable? Why (not)?

“Centralization” is now a word constantly repeated but is one that, generally speaking, no one tries to define accurately. ---Alexis de Tocqueville, Democracy in America, Vol.1, Part 1, ch.5. ...
David A. Harding's user avatar
15 votes
Accepted

What is a hash pre-image as it is used for the breach remedy?

In the image below from Rusty Russell's Deployable Lightning paper, you can see a visualization of the commitment transactions and their outputs: For each payment in a channel, there are two ...
David A. Harding's user avatar
15 votes

How does Lightning transaction revocation work?

When you open a lightning channel, you will receive from the other person their revocation_basepoint, and for each commitment transaction, you will send to the other person a per_commitment_point. The ...
Ava Chow's user avatar
  • 70.8k
15 votes
Accepted

"HTLCs don't work for micropayments"?

It takes about 200 vbytes to spend from a Lightning Network (LN) Hashed Time-Locked Contract (HTLC) output used for routing a payment. At the default minimum feerate of 10 nBTC/vbyte, that makes it ...
David A. Harding's user avatar
15 votes
Accepted

Do we still need SIGHASH_NOINPUT for Lightning Network?

The lightning network as is is working without SIGHASH_NOINPUT. Thus in its current form it is not needed. However Christian Decker came up with the eltoo payment channel construction. In a nutshell ...
Rene Pickhardt's user avatar
13 votes
Accepted

What is the Lightning Network proposal? What problem is it trying to solve?

Two issues with Bitcoin's design Scalability of "everyone checks everything" Bitcoin is a gossip network: P2P nodes connect mostly randomly to each other and pass-on new information to each ...
Murch's user avatar
  • 75.7k
13 votes
Accepted

Is Lightning Network a risk for Bitcoin security since it reduces miner fees?

The idea that Lightning will reduce the amount of fees going to miners is very common, and we probably won't know for sure until we actually try it. However, I'll try to provide some arguments as to ...
cdecker's user avatar
  • 9,508
12 votes
Accepted

What is a millisatoshi? I thought satoshi is the smallest unit?

It's not a mistake, it's literally a thousandth of a satoshi. A satoshi is the smallest unit for bitcoin, but lightning can transact with even smaller units while channels are open. The amount is ...
meshcollider's user avatar
  • 11.8k
12 votes
Accepted

Closing a channel in Lightning Network

The first three scenarios are indeed possible, the last one is identical to the second. This is called a collaborative close. It has the advantage of using a lower on-chain fee since the transactions ...
cdecker's user avatar
  • 9,508
12 votes
Accepted

Are lightweight LN wallets vulnerable to transaction withholding?

There is no substitute in terms of security and trust for running a full node. There are different "lightweight client" concepts. Some of them are... BIP37 (bloom filter): [minus] With current used ...
Jonas Schnelli's user avatar
11 votes

How does the Lightning network work in simple terms?

Lightning allows you to lock coins between two wallets, and then send special transactions between each wallet which only become "real" when they are added to the blockchain. But you don't do that, ...
Wouter Schut's user avatar
11 votes
Accepted

When closing the channel for LN - how to calculate the fee for the blockchain transaction?

If worried about the original closing transaction having too high of fees: The signed closing transaction that you're worried about (with too high of fees) has not yet been broadcast to the network, ...
Ryan McGeary's user avatar
11 votes
Accepted

What criteria should be taken into account when selecting nodes to create new lightning channels with?

I agree with Alex Bosworth and I have pointed this out about one year ago when I have filed an issue about the strategy used by the LND autopilot which basically looks for nodes with a high channel ...
Rene Pickhardt's user avatar
10 votes
Accepted

Lightning network and lightweight clients

How will the lightning network handle lightweight clients? Most steps during the payment process in an LN channel don't actually require full knowledge of the blockchain or even the unconfirmed (...
morsecoder's user avatar
  • 14.2k
10 votes
Accepted

Does a segwit based side chain like the lightning network allow for fractional reserve?

A sidechain has its own blockchain which is coupled to the Bitcoin blockchain via a two-way peg. This allows tokens on the Bitcoin blockchain to be frozen in order to make new tokens available on the ...
Murch's user avatar
  • 75.7k
10 votes
Accepted

Why is the length of the transport messages on the lightning network encrypted?

TCP and other stream based protocols do not have a 1-to-1 correlation of application level messages and IP packets. If you call send() 3 times, it might result in sending a single IP packet over the ...
Mark H's user avatar
  • 3,334
9 votes
Accepted

Routing in Bitcoin Lightning Network

There's no document explaining step-by-step, because the routing decisions are not part of the protocol (the BOLTs). It is purely client-side decision making about how to find a route through the ...
Mark H's user avatar
  • 3,334
9 votes

Some questions about Lightning and Tor

Generally if you read BOLT 07 you will see that lightning nodes and channels can either be private or public. This is independent of the fact if they run on tor or not. The node announcment message ...
Rene Pickhardt's user avatar
9 votes

What are the downsides of Hodl Invoices?

I didn't attend the conference but here is my take on Hodl invoices. In a normal Lightning payment, the sender pays an invoice which contains the payment hash and the payee releases the pre-image to ...
Ugam Kamat's user avatar
  • 7,407
9 votes

What does TLV stand for?

TLV stands for type-length-value. It's an encoding scheme used when protocols allow for optional elements in their messages. The type is a label telling you what field you're looking at, the length ...
Murch's user avatar
  • 75.7k
8 votes
Accepted

Lightning Network scaling alternatives?

The obvious one would be side chains, the idea being that the transactions on the side chain would be off the main chain. Most other scaling solutions are either on-chain or centralized. For example, ...
Jimmy Song's user avatar
  • 7,759
8 votes
Accepted

Is the Lightning network a proof-of-stake system?

Calling the Lightning Network (LN) a Proof-of-Stake (PoS) system is orthogonal to the concept usually labeled as PoS. What we usually describe as PoS is a mechanism to achieve distributed consensus ...
Murch's user avatar
  • 75.7k
8 votes
Accepted

Do parties in a Lightning Network channel need to be online?

The lightning network is comprised of bi-directional payment channels between two nodes. This means that either one of those nodes should be able to initialize a transaction at any time. These ...
Jestin's user avatar
  • 8,812
8 votes
Accepted

How are fees determined in the Lightning Network?

Fees are determined by the node operators. It's a free market, you can set whatever fee you want. Of course there's lots of competition, so if you want people to route payments through you, you should ...
Ava Chow's user avatar
  • 70.8k
8 votes
Accepted

What is Bitcoin's "genesis hash"?

They're exactly the same number; one is written in little endian notation and the other is big endian. Notice that the bytes (two-hex-digit pairs) are exactly reversed from one to the other. Block ...
Nate Eldredge's user avatar
8 votes

How to convert channel id from c-lightning to lnd?

The specification of the short_channel_id describes the format as follows: The short_channel_id is the unique description of the funding transaction. It is constructed as follows: the most ...
cdecker's user avatar
  • 9,508

Only top scored, non community-wiki answers of a minimum length are eligible