This guide is for total noobs with limited knowledge about Bitcoin and LN. Please feel free to share it with any other normie that will ask you the same.
I was asked by many nocoiners how Lightning Network (LN) works and how to use it.
Yes, I wrote in the past many guides (about Bitcoin and LN), more or less technical but I still have this question from normies: what is Lightning Network?
So I will try to give it another explanation (apart from the famous "airport analogy" in a more friendly non-technical way.
Glossary
- satoshis (the Bitcoin unit) = water drops
- onchain UTXO = bottle / container of water (read more about what is UTXO here)
- LN channels (payment channels) = glass of water
- LN routing paths = water pipes, connecting the glasses
- LN nodes = water management centers
- HTLC policies = water valves system (read more about what is HTLC here)
- routing fees policies = water transport cost fees
- opening / closing LN channels fees = cost of adding / removing water pipes and glasses
- LN channel reserves = residual waters remained in the pipes that eventually can be recovered if the pipes are removed properly.
How a LN node operates - water flow analogy
So you start from a bottle of water (many sats from a UTXO), pouring some water into a smaller glass. That glass have connections with other LN nodes through a pipe with your next peer (another LN node).
Through that pipe you can "drink" the water (spending) or "move" it (route) to another glass (yours or others).
You can't pour more water into that glass if is full. A glass will always have the same water capacity. So in order to able to "receive" more water in a glass, you need to drink some or move it to an external bottle (UTXO).
You can have infinite glasses, with different size and connected to different other LN nodes. You can even take water from one glass (that is full) and move it to another glass that is almost empty, to balance the liquidity and have a proper flow.
More glasses result in more routes, better connected pipes.
Also bigger glasses offer a better water flow, with more debit.
Size your glasses based on your own water necessity amount.
It is recommended to keep a certain balance of your water flow for smooth water management, in and out, through the (routing) pipes.
Water Swaps
If you have all glasses full of water, and you want to receive some more water, you need to "swap out" part of it, into a bigger bottle (for holding long term). That is a special procedure, using a 3rd party service, that will take your exceeding water, through the pipes and giving you back a bottle of water with the amount of water you've send to them. Then you put that bottle into your safe (onchain wallet) to secure it for long term.
This is the case scenario for merchants, that usually are receiving more water than they spend it, in a certain period of time.
Another option, is when you do not want to put your water into a bottle, you just want a temporary solution for an excess of water, that later you will need it back into your glasses, is that you can move the water into a custodial (temporary) glass, managed by somebody else, but still giving you full access to move around that water. Is like a "rented glass of water", the glass is not yours, but you can still use it with your water.
Once you were spending more water from your own glasses and you have enough "space" you can move back your water from the "custodial glasses" into your own self-hosted glasses (your own LN node).
Water flow management - routing through pipes
Here we have the "LN liquidity" term too. Our water flow capacity.
There are some aspects here to take in consideration:
- It refers to the amount of water (sats) available for sending (outbound liquidity) and receiving (inbound liquidity)
- min / max HTLC - the amount of sats set to send/receive in one payment, that cannot be bigger than the total capacity of the glass (channel).
- total number of glasses (channels), with a total amount of water (sats) in them and the total amount of "space" available in the glasses (channels).
Read more about how LN liquidity works here: https://bitcoin.design/guide/how-it-works/liquidity/
And here you have a short video describing how water flow management works in LN liquidity.
What types of "water management centers (LN nodes) are?
We have to specify that we have some specific types of "centers" that operates with specific rules for water management.
You do not have to run a big large public center just for your regular water use. It all depends of what type of user or provider you want to be.
1. BIG Public Centers - LN public routing nodes
These are huge water management centers, with immense capacity and lots of pipes, connecting with other big centers or middle centers and even small regional centers.
These are the "routing" nodes that provide a smooth transport of water between large distances and pushing the water with pumps and bigger pipes.
These are the centers managed by professionals, with very good hardware and reliability. They are using public pipes, visible for everyone. Each one is using their own set of rules for water transport fees.
These centers must keep a very good balance in their water flow, managed with certain set of rules and fees, providing a smooth use of water for everybody.
2. Middle Public Centers - LSP (Lightning / Liquidity Service Provider)
These are the water management centers that connect private centers with big public centers and offer a proper reliable route for water management. It also offer a certain level of privacy in moving "private" water into public and back.
These centers are charging specific fees for opening new pipes to your "private" water center and agreed to keep it open for a certain time, as long you keep using that pipe.
These LSP are an important piece for LN flow management because could provide certain rules and services for inbound and outbound traffic.
These are the centers managed by professionals, with very good hardware and reliability. They are using public pipes, visible for everyone but also private pipes, to their customers, providing a flow between private and public. Each one is using their own set of rules for water transport fees.
These centers must keep a very good balance into their water flow for a smooth transport in and out of the water, to provide good services to their customers (private users).
3. Private Centers - regular private users
These are your personal water pumps centers, used for your personal use of water, spending it.
These centers are connected to LSP (middle centers) with private pipes and have the water flow that goes only through these middle centers, reaching their destination.
These centers do not require to have a lot of glasses, with large capacity. There are enough 3-5 good glasses with a sufficient amount of water in them, enough to cover your regular monthly use.
Once you have almost empty your glasses, you can refill them with more water, using the 3rd party external swap services, sending them a bottle of water (UTXO) and you receive more water straight into your glasses, or specific glass if you like. A simply spend and refill process.
More guides and resources to read:
- Submarine Swaps Guide - by @aftermath
- Managing ⚡️ Lightning Node ⚡️ Liquidity
- Private ⚡️ Lightning Network Nodes ⚡️
- ⚡️ Lightning Node ⚡️ Maintenance
- ⚡️ Lightning ⚡️ Routing Fees Experiment - how the valve system works
- What ₿itcoin LN node software can I run?
- ⚡️ Lightning Network is awesome ⚡️ - links and resources about LN
- Darth recommendations for LN nodes users
- Private banks over the ⚡ Lightning Network ⚡
- LN wallets series of guides
- More guides about LN nodes
- Series of guides for beginners