Lightning







Lightning Network (Layer 2) โ€” Bitcoin Layers





Layer 2 payments

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.

Built for clarity

Lightning is not a separate coin.
It uses Bitcoin locked in channels.

Read FAQ

Three key benefits

These benefits come with constraints.
We describe both in simple terms.

Speed

Fast user experience

Payments can complete in seconds.
Most updates stay off-chain.

Low footprint

Less mainchain usage

One channel can carry many payments.
This reduces on-chain settlement frequency.

Programmable

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.

Open

Channel opening

Opening a channel uses a mainchain transaction.
It locks funds into a shared output.

Update

Channel updates

Updates change the balance between two parties.
The newest signed state is the valid one.

Close

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.

Path

Paths and hops

A hop is one step between two connected nodes.
A path is a sequence of hops.

Fees

Forwarding fees

Nodes can charge small forwarding fees.
Fees are part of routing decisions.

Failure

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.

  1. Alice opens a channel with a node that has good connectivity.
    This uses a mainchain transaction.
  2. Bob creates an invoice.
    An invoice is a request for a Lightning payment.
  3. Aliceโ€™s wallet finds a route to Bob.
    The route is a path through multiple channels.
  4. The payment is forwarded hop by hop.
    Each hop is paid only if the next hop succeeds.
  5. Bob receives the payment and confirms it.
    Channel states are updated for each hop.
  6. 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.

Everyday

Small and fast payments

Lightning is designed for quick settlement-like experience.
It can reduce waiting for on-chain confirmation.

Many payments

Repeated activity

If you pay often, channels can be reused.
This lowers the need for frequent on-chain actions.

Limits

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.

Layer 3 Cashu (Ecash)

Tokens can move quickly on Lightning rails.

Cashu can improve privacy.
It adds trust in a mint operator.

Layer 2 Lightning

Channel network for fast payments.

Channel opens and closes touch Layer 1.
Disputes can be resolved on-chain.

Layer 1 Mainchain

Final settlement and global verification.

The base layer provides the enforcement bedrock.
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.



Nach oben scrollen