As of May 31, 2023, we have updated our Code of Conduct.
72 votes
Accepted

How does the Lightning network work in simple terms?

Say, you and I want to open a payment channel. 1) Putting funds into Lightning We both send 0.05 BTC into a shared 2-of-2 multisig address. This requires a transaction on the Bitcoin blockchain. As a ...
Murch's user avatar
  • 69.7k
63 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
  • 69.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
  • 13.9k
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
Accepted

How is a node in the middle prohibited from keeping the money in a routed Payment in Lightning network?

Lightning forwards payments using a construction called a "hashed timelock contract" (HTLC), which allows the payee to redeem the transaction if they know the preimage to a given hash, or allows the ...
Anthony Towns'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 ...
Andrew Chow's user avatar
  • 66.4k
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
  • 69.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,139
12 votes
Accepted

What are the trade-offs between transacting on Lightning Network and Bitcoin mainchain?

Below describes these points during what's planned to be normal operation. Once a channel needs to be torn down because of a problem with one of the nodes (evil or accidental) some of these answers ...
Jannes's user avatar
  • 6,286
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.7k
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,139
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
  • 13.9k
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
  • 69.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,304
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,304
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,203
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,709
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
  • 69.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,782
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
Accepted

What makes millisatoshi real?

Millisatoshis are the unit in which channel balances are accounted for. They are a necessary accounting unit, if the aim is to enable very small lightning payments amounts, which represents a protocol ...
James C.'s user avatar
  • 2,491

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