Menu
Lightning Beginner 8 min read

Lightning FAQ

Frequently asked questions about Lightning Network for AI agents. Payments, channels, security, and common issues.

faq questions troubleshooting help

Lightning FAQ

Answers to common questions about Lightning Network for AI agents.


General

What is the Lightning Network?

Lightning is a Layer 2 payment protocol built on Bitcoin. It enables instant, low-cost payments by creating payment channels between participants. Payments route through these channels without touching the blockchain.

How is Lightning different from on-chain Bitcoin?

AspectBitcoin (On-Chain)Lightning
Speed10-60 minutesMilliseconds
FeesVariable, can be highFraction of a cent
Minimum~546 sats (dust)1 satoshi
FinalityProbabilisticInstant
PrivacyPseudonymousBetter (onion routing)

Is Lightning Bitcoin?

Yes. Lightning uses real Bitcoin locked in payment channels. Moving funds on Lightning is moving Bitcoin—just off-chain. You can always settle to the blockchain.

What’s the smallest Lightning payment?

1 millisatoshi (0.001 satoshi) internally. Most implementations round to 1 satoshi minimum for practical payments.


Channels

What is a payment channel?

A channel is a Bitcoin multisig address that two parties use to transact privately. They exchange signed transactions off-chain, only settling to the blockchain when they’re done.

How much does it cost to open a channel?

One on-chain transaction (~140 vbytes). At 10 sat/vB, that’s ~1,400 sats. Fees vary with Bitcoin network congestion.

How do I get inbound liquidity?

  • Send payments first: Converts outbound to inbound
  • Use an LSP: They open channels to you
  • Dual-funded channels: Peer contributes funds
  • Loop Out: Submarine swap creates inbound

What happens if my channel partner goes offline?

Your funds are safe. You can force close the channel (unilateral close), but there’s a timelock delay before you can spend the funds on-chain.

Can I lose funds in a channel?

Funds are safe if you:

  • Keep channel backups (SCB for LND)
  • Use watchtowers
  • Don’t broadcast old channel states

You CAN lose funds if:

  • You broadcast a revoked state (all funds lost to peer)
  • You lose your keys without backup

Payments

Why did my payment fail?

Common reasons:

  • No route: No path with sufficient liquidity
  • Invoice expired: Past expiry time
  • Insufficient balance: Not enough in your channels
  • Offline node: Recipient or intermediary offline

Can I pay any amount?

Practical limits:

  • Minimum: ~1 satoshi
  • Maximum: Limited by channel capacity and liquidity
  • Large payments: Use MPP (Multi-Path Payments) to split

Are Lightning payments instant?

Yes, typically settling in under a second. Occasional retries may take a few seconds. Much faster than on-chain confirmation.

What’s a payment hash?

The SHA256 hash of the preimage. The recipient knows the preimage (secret) and creates the hash. The sender locks payment using this hash—only someone knowing the preimage can claim it.

What’s a preimage?

The secret that unlocks an HTLC. The recipient generates it, creates the hash for the invoice, then reveals it when claiming payment. It serves as proof of payment.

Can I reverse a Lightning payment?

No. Once the preimage is revealed and the payment settles, it’s final. This is a feature for merchants (no chargebacks) but requires care for users.


Invoices

What does a Lightning invoice look like?

A bech32-encoded string starting with lnbc (mainnet):

lnbc10u1pj9nrfzpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqf...

Why do invoices expire?

HTLCs lock liquidity. Expired invoices prevent old HTLCs from clogging the network. Default expiry: 1 hour.

Can I reuse an invoice?

No. Each invoice has a unique payment hash. Once paid, it can’t be paid again. For reusable payment endpoints, use LNURL-pay or Lightning Address.

What’s a Lightning Address?

An email-like format for receiving: you@domain.com. Resolves to an LNURL-pay endpoint. Creates fresh invoice for each payment.


Security

Can my channel partner steal my funds?

No, if you maintain channel state. They can try to broadcast an old state, but:

  • You (or your watchtower) can broadcast a justice transaction
  • Justice transaction claims ALL their funds as penalty

What’s a watchtower?

A service that monitors the blockchain for you. If your peer broadcasts a revoked state while you’re offline, the watchtower broadcasts the justice transaction.

Should I run my own node?

For agents handling significant value: yes. Benefits:

  • Full custody of funds
  • No third-party risk
  • Maximum privacy
  • Full API access

For small amounts/testing: managed services like LNbits are acceptable.

Are Lightning payments private?

More private than on-chain:

  • Onion routing hides payment path
  • Intermediaries don’t see sender/recipient
  • Amounts not broadcast publicly

But not perfectly private:

  • Channel opens/closes are on-chain
  • Timing analysis possible
  • Your node is visible to direct peers

Operations

How do I choose channel partners?

Look for:

  • Uptime: High availability
  • Connectivity: Well-connected to network
  • Liquidity: Sufficient capacity
  • Fees: Reasonable routing fees
  • Reputation: Established nodes

What’s a good channel size?

Depends on use case:

  • Minimum: 20,000 sats
  • Typical: 500,000-2,000,000 sats
  • Routing: 5,000,000+ sats

Balance between on-chain cost and utility.

How do I rebalance channels?

  1. Circular payment: Pay yourself through different channels
  2. Submarine swap: Loop Out/In
  3. Channel close/reopen: Expensive, last resort

Why are my channels unbalanced?

If you primarily send: outbound depletes If you primarily receive: inbound depletes

Natural result of payment flow. Rebalance periodically.


Troubleshooting

”Invoice expired” error

Request a new invoice. Invoices have expiry times (default 1 hour).

”No route found” error

Possible causes:

  • Recipient has no inbound liquidity
  • Your node disconnected from network
  • Amount too large for available paths

Solutions:

  • Request route hints from recipient
  • Try smaller amount
  • Open channel to well-connected node

”Insufficient balance” error

You don’t have enough outbound liquidity. Options:

  • Receive some payments first
  • Open a new channel
  • Use a different channel

Payment stuck as “pending”

HTLCs have timeouts. If stuck:

  • Wait for timeout (could be hours)
  • Check if channel is still active
  • Force close as last resort (loses channel)

Channel shows “inactive”

Peer might be offline. Check:

  • Peer’s node status
  • Your network connectivity
  • Recent gossip updates

APIs

Which API should agents use?

Recommended order:

  1. LNbits: Simple REST API, multi-wallet
  2. Alby: Good for Lightning Address integration
  3. LND gRPC: Full control, complex

Do I need a full node?

Not necessarily. Options:

  • LNbits account (easy, some trust)
  • Hosted node (Voltage, etc.)
  • Full node (maximum control)

Can I run Lightning without Bitcoin Core?

Some implementations require Bitcoin Core (LND with neutrino excepted). Hosted solutions abstract this away.


Economics

Are Lightning fees predictable?

More predictable than on-chain. Fees are:

  • Known before payment (quoted in route)
  • Per-hop, not per-byte
  • Typically 0.01-0.1% for most payments

Can I earn fees by routing?

Yes, if you:

  • Run a routing node
  • Have balanced channels
  • Connect to active payment paths

Revenue varies widely. Don’t expect significant profit without scale.

Is Lightning profitable for small payments?

Yes, that’s where it shines. Example:

  • 100 sat payment, 1 sat fee = 1% (acceptable)
  • 100 sat on-chain, 500 sat fee = 500% (uneconomical)

Machine-Readable Summary

{
  "faq": "lightning",
  "question_count": 35,
  "categories": [
    "general",
    "channels",
    "payments",
    "invoices",
    "security",
    "operations",
    "troubleshooting",
    "apis",
    "economics"
  ]
}