Skip to content
Lightning Network (Layer 2)
Lightning is a network for fast Bitcoin payments.
It reduces the need to put every payment on the mainchain.
Education only. No financial advice.
Lightning is not a separate coin.
It uses Bitcoin locked in channels.
Three key benefits
These benefits come with constraints.
We describe both in simple terms.
Fast user experience
Payments can complete in seconds.
Most updates stay off-chain.
Less mainchain usage
One channel can carry many payments.
This reduces on-chain settlement frequency.
Conditional payments
Payments can be linked to conditions.
Conditions are enforced by the protocol rules.
What is Lightning?
Lightning is a payment network on top of Bitcoin.
It uses channels and a routing graph.
Lightning uses bitcoin locked in a channel.
A channel is an on-chain contract between two parties.
Channel updates happen off-chain.
Off-chain means updates are not written to the mainchain.
Many channels form a network.
A network lets you pay people without a direct channel.
Routing finds a path through this network.
The path can include several intermediate nodes.
Payment channels
A payment channel is a shared balance sheet.
It is updated by both parties signing new states.
Channel opening
Opening a channel uses a mainchain transaction.
It locks funds into a shared output.
Channel updates
Updates change the balance between two parties.
The newest signed state is the valid one.
Channel closing
Closing settles back to the mainchain.
It records the final balances on Layer 1.
Off-chain payments
Off-chain payments are channel state updates.
They are enforced by signatures and protocol rules.
A state is the current channel balance.
Both parties sign each new state.
If a dispute happens, the mainchain is the judge.
The on-chain contract can enforce the latest valid state.
Lightning also supports multi-hop payments.
Multi-hop means your payment crosses multiple channels.
Each hop only knows what it must know.
This limits what each intermediate node can learn.
Routing
Routing finds a payment path through channels.
Each hop forwards the payment under conditions.
Paths and hops
A hop is one step between two connected nodes.
A path is a sequence of hops.
Forwarding fees
Nodes can charge small forwarding fees.
Fees are part of routing decisions.
Why payments can fail
Failure often means no path has enough liquidity.
It can also be due to timeouts or policy limits.
Liquidity
Liquidity is spendable channel balance.
It must be in the right direction for your payment.
A channel has capacity, but not all capacity is spendable by you.
Your spendable part is called outbound liquidity.
Inbound liquidity is the amount others can send to you.
It grows when your balance moves away from your side.
Liquidity is directional.
You can have plenty of inbound but little outbound.
Good routing often needs balanced channels.
This is why channel management matters.
Step-by-step example
This example is simplified.
It shows the main steps and terms.
-
Alice opens a channel with a node that has good connectivity.
This uses a mainchain transaction. -
Bob creates an invoice.
An invoice is a request for a Lightning payment. -
Aliceโs wallet finds a route to Bob.
The route is a path through multiple channels. -
The payment is forwarded hop by hop.
Each hop is paid only if the next hop succeeds. -
Bob receives the payment and confirms it.
Channel states are updated for each hop. -
Alice can keep using the channel for more payments.
She can close the channel later to settle on-chain.
When to use Lightning
Lightning is best for frequent payments.
It works well when you can keep channels open.
Small and fast payments
Lightning is designed for quick settlement-like experience.
It can reduce waiting for on-chain confirmation.
Repeated activity
If you pay often, channels can be reused.
This lowers the need for frequent on-chain actions.
Know the constraints
Liquidity can limit payment size.
Offline wallets can face risks if disputes occur.
How the layers fit together
Lightning sits between the mainchain and higher layers.
It can also support Cashu ecash systems.
Lightning uses Layer 1 for anchor points.
Higher layers can use Lightning for fast transfer.
It adds trust in a mint operator.
Disputes can be resolved on-chain.
It is slower to keep verification broad.
FAQ
These answers focus on mechanics.
They avoid overpromises.
Is Lightning โoff-chainโ the same as โnot secureโ?
Off-chain means not recorded in each mainchain block.
Security comes from signed states and on-chain enforcement.
Why does a Lightning payment sometimes fail?
Common reasons are missing liquidity or missing routes.
Some nodes also apply policy limits.
Do I need to run a node to use Lightning?
Some wallets run a node for you.
Others connect to a service that manages channels.
Ready to learn Cashu ecash?
Cashu uses Lightning to move tokens.
It can improve privacy with clear trust trade-offs.