Back to courses
Part 3: Additional Deep Dives (courses 4016–4169) beginner

The lightning network fundamentals

Duration0 hours
Modules7
ForGeneral public, lifelong learners
Video1-2min
Get started — free →

Course outline

Module 1 Module 1: What Is the Lightning Network

What Is the Lightning Network

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the primary purpose of the Lightning Network?
  • A. To replace the Bitcoin base layer with a new consensus mechanism
  • B. To enable fast, low-cost Bitcoin payments by processing transactions off the main blockchain ✓
  • C. To store large amounts of data on the Bitcoin blockchain
  • D. To mint new bitcoins faster than mining allows

Why: The Lightning Network is a second-layer payment protocol that handles transactions off-chain, enabling near-instant, low-fee payments while the Bitcoin blockchain serves as the final settlement layer.

Q2. What is a payment channel in the Lightning Network?
  • A. A public database listing all Lightning nodes
  • B. A two-party arrangement where funds are locked in a multisig output on-chain and balances are updated off-chain ✓
  • C. A network cable connecting two Bitcoin miners
  • D. A type of altcoin built on top of Bitcoin

Why: A payment channel is opened by funding a multisignature on-chain transaction. The parties then exchange signed commitment transactions off-chain to update balances, and only the opening and closing transactions are recorded on the blockchain.

Q3. What problem does the Lightning Network primarily aim to address?
  • A. Bitcoin's limited scalability and slow transaction confirmation times for small payments ✓
  • B. The lack of privacy features in Bitcoin wallets
  • C. The high energy consumption of Bitcoin mining
  • D. The absence of smart contract functionality in Bitcoin

Why: Bitcoin's base layer processes a limited number of transactions per block with confirmation delays, making it impractical for frequent small payments. Lightning moves these payments off-chain to improve throughput and speed.

Q4. What is routing in the Lightning Network?
  • A. Assigning IP addresses to Lightning nodes
  • B. Sending a payment across multiple connected channels so that two parties without a direct channel can transact ✓
  • C. Splitting a Bitcoin into smaller denominations
  • D. Broadcasting blocks to miners across the globe

Why: Routing allows payments to traverse a path of intermediate nodes with open channels, so two users need not have a direct channel between them. Intermediaries forward the payment in exchange for small routing fees.

Q5. Which blockchain serves as the settlement layer for the Lightning Network?
  • A. Ethereum
  • B. Litecoin
  • C. Bitcoin ✓
  • D. Dogecoin

Why: The Lightning Network is built on top of Bitcoin. Channels are opened and closed with Bitcoin transactions, which provide the security and final settlement for the off-chain activity.

Module 2 Module 2: Bitcoin Scaling and the Layer 2 Problem

Bitcoin Scaling and the Layer 2 Problem

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the primary scaling problem that Layer 2 solutions like the Lightning Network aim to address on Bitcoin?
  • A. Bitcoin's private keys are too short to be secure
  • B. Bitcoin's base layer can process only a limited number of transactions per second, causing congestion and high fees ✓
  • C. Bitcoin miners are not paid enough to secure the network
  • D. Bitcoin blocks are too small to store any transaction data

Why: Bitcoin's base layer processes roughly 3 to 7 transactions per second. When demand exceeds this capacity, users compete by raising fees, making small payments impractical. Layer 2 solutions move many transactions off the base chain while still relying on it for security and final settlement.

Q2. What does the term 'Layer 2' mean in the context of Bitcoin?
  • A. A second blockchain that replaces Bitcoin entirely
  • B. A protocol built on top of the base layer that handles transactions off-chain while inheriting its security ✓
  • C. A government-regulated version of Bitcoin
  • D. A backup copy of the Bitcoin ledger stored on a separate server

Why: Layer 2 refers to protocols built on top of the base blockchain (Layer 1). They process transactions off the main chain and only settle final results on Layer 1, allowing scalability while keeping Bitcoin's security guarantees.

Q3. What is a payment channel in the Lightning Network?
  • A. A public broadcast channel where all users can see every payment
  • B. A two-party arrangement where funds are locked in a multisignature on-chain transaction and then transacted off-chain between the parties ✓
  • C. A type of Bitcoin mining pool
  • D. A wallet app that stores private keys on a phone

Why: Two participants open a channel by funding a multisignature address on the Bitcoin blockchain. They can then send any number of payments to each other off-chain by updating balances, and only the final state is recorded on-chain when the channel closes.

Q4. Why does the Lightning Network typically offer faster and cheaper payments than on-chain Bitcoin transactions?
  • A. Because it removes the need for any cryptographic signatures
  • B. Because payments within open channels are settled off-chain without waiting for block confirmations or paying full on-chain fees ✓
  • C. Because Lightning transactions are guaranteed to be free of any fees
  • D. Because Lightning uses a larger block size than Bitcoin

Why: Off-chain updates between channel participants do not need to be included in a block, so they settle almost instantly and avoid competing for limited block space. This is why fees and confirmation times are much lower than for typical on-chain transactions.

Q5. What is a key trade-off or risk users should understand when using Layer 2 solutions like Lightning?
  • A. Layer 2 transactions can be reversed by any miner at any time
  • B. Users must keep channels online and monitored, since failing to respond to a cheating attempt could result in lost funds ✓
  • C. Layer 2 requires users to give up ownership of their bitcoin
  • D. Layer 2 payments cannot be sent to anyone outside your country

Why: Lightning channels rely on users monitoring the state of their channels. If a counterparty broadcasts an old channel state, the other party must respond within a time window to claim the penalty. Operational responsibility and liquidity management are therefore important trade-offs compared with simple on-chain payments.

Module 3 Module 3: Payment Channels Explained

Payment Channels Explained

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the basic purpose of a payment channel in the Lightning Network?
  • A. To store Bitcoin blocks permanently on a node
  • B. To allow two parties to make many off-chain payments while only settling the final balance on the blockchain ✓
  • C. To mine new Bitcoin blocks faster
  • D. To convert Bitcoin into fiat currency automatically

Why: Payment channels let two parties transact repeatedly off-chain, recording only the opening and closing transactions on the Bitcoin blockchain. This greatly increases speed and reduces fees.

Q2. How is a payment channel typically opened?
  • A. By sending a funding transaction to a multisignature address that both parties control ✓
  • B. By registering with a central authority that issues credit
  • C. By downloading a special Lightning wallet with no Bitcoin required
  • D. By mining a block that contains only the two parties' addresses

Why: A funding transaction locks funds into a 2-of-2 multisignature address controlled jointly by both parties. Opening the channel requires this on-chain transaction, which both parties must sign to spend the funds later.

Q3. What happens to the channel state when both parties update their balances off-chain?
  • A. Each update is broadcast to the entire Bitcoin network immediately
  • B. Each update is signed by both parties and replaces the previous state, with no blockchain transaction needed ✓
  • C. The channel is closed and reopened with new balances
  • D. A miner must verify every update before it takes effect

Why: Parties exchange new commitment transactions that reflect updated balances, signing each one. Newer signed states supersede older ones, allowing many off-chain updates without touching the blockchain.

Q4. Why is it important for channel participants to always use the most recent channel state when closing?
  • A. Because older states expire after one day
  • B. Because the most recent state is the only one that can be broadcast in a valid way
  • C. Because broadcasting an old state can be a cheating attempt, and the other party can penalize it ✓
  • D. Because the blockchain only accepts the most recent transaction by timestamp

Why: Old channel states are obsolete. Lightning uses penalty mechanisms so that if someone broadcasts a revoked old state, the counterparty can claim all the channel funds as a punishment, discouraging cheating.

Q5. What is the typical way a payment channel is closed?
  • A. One party deletes their channel software
  • B. The channel expires automatically after a set number of blocks with no action
  • C. A closing transaction is broadcast to the blockchain that distributes the final balances to each party ✓
  • D. Both parties send their funds to a miner who redistributes them

Why: A cooperative close involves both parties signing a final transaction that pays out the agreed balances on-chain. Unilateral closes are also possible by broadcasting the latest commitment transaction.

Module 4 Module 4: Routing and Network Topology

Routing and Network Topology

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. In the Lightning Network, what is a payment channel?
  • A. A public ledger entry recording every transaction on the Bitcoin blockchain
  • B. A two-party arrangement where funds are locked in a multisig output and balances are updated off-chain through signed commitment transactions ✓
  • C. A centralized server operated by a Lightning service provider that holds all user funds
  • D. A separate blockchain that runs alongside Bitcoin with its own consensus rules

Why: A payment channel locks funds in a 2-of-2 multisignature output on-chain. Both parties then exchange signed commitment transactions that reflect updated balances, so payments happen off-chain and only opening and closing transactions touch the blockchain.

Q2. Why does the Lightning Network need routing across multiple channels?
  • A. Because every user must open a channel directly with every other user
  • B. Because payments between two parties who do not share a direct channel can be forwarded through intermediate nodes ✓
  • C. Because routing is required to mine new Bitcoin blocks
  • D. Because all payments must pass through a single central hub node

Why: Not every pair of users can have a direct channel. Lightning uses a network of channels so a payment can hop through intermediate nodes, each forwarding it along a path to the recipient.

Q3. What does a node's channel capacity refer to?
  • A. The maximum number of transactions a node can process per second
  • B. The total amount of bitcoin locked in the channel's funding output ✓
  • C. The number of blocks a channel can remain open before expiring
  • D. The number of peers a node is allowed to connect to

Why: Channel capacity is the total bitcoin committed to the channel's 2-of-2 funding output. It sets the upper bound on how much can flow through that channel, though the split between the two sides shifts with each payment.

Q4. What is the purpose of a Lightning node's routing table or graph?
  • A. To store the private keys used to sign commitment transactions
  • B. To record the public channels and their parameters so the node can compute paths for payments ✓
  • C. To verify the proof-of-work of each Bitcoin block
  • D. To track the personal transaction history of every user on the network

Why: Nodes gossip information about public channels, including their endpoints, capacity, and fee policies. This builds a network graph that the node uses to find viable routes for a payment.

Q5. Which topology best describes the Lightning Network as it has tended to evolve?
  • A. A fully connected mesh where every node links to every other node
  • B. A strictly linear chain with each node connected only to its predecessor and successor
  • C. A scale-free structure where a relatively small number of well-connected hub nodes carry much of the routing traffic ✓
  • D. A star topology where all nodes connect exclusively to one central server

Why: Lightning tends toward a scale-free network in which a few highly connected hubs handle a large share of paths. This makes routing efficient but also creates concentration points that can affect centralization and resilience.

Module 5 Module 5: HTLCs and Secure Payments

HTLCs and Secure Payments

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What does HTLC stand for in the context of the Lightning Network?
  • A. Hashed Timelock Contract ✓
  • B. Hashed Transaction Lock Channel
  • C. High-Throughput Ledger Contract
  • D. Hybrid Timed Lightning Commitment

Why: HTLC stands for Hashed Timelock Contract. It combines a hash lock, which requires a secret preimage to claim funds, with a time lock, which allows the sender to reclaim funds if the payment is not completed in time.

Q2. What is the purpose of the hash lock in an HTLC?
  • A. To encrypt the payment amount so intermediaries cannot see it
  • B. To ensure the payment can only be claimed by someone who knows the preimage of a hash ✓
  • C. To limit the number of hops a payment can take
  • D. To set the channel's fee rate automatically

Why: The hash lock locks funds to a hash value. Only a party that knows the secret preimage whose hash matches can claim the funds, which is how proof of payment is produced and passed back along the route.

Q3. What is the role of the timelock in an HTLC?
  • A. It speeds up the confirmation of the payment on the blockchain
  • B. It allows the sender to recover funds if the payment is not completed before a deadline ✓
  • C. It sets a maximum payment amount for each channel
  • D. It hides the identity of the recipient

Why: The timelock sets an expiry block height. If the recipient does not reveal the preimage before that height, the HTLC times out and the funds return to the sender, preventing funds from being locked indefinitely.

Q4. Why do the timelocks decrease along a payment route in Lightning?
  • A. To reduce the total fees charged by each node
  • B. To give each intermediate node time to claim its incoming HTLC after learning the preimage from the next hop ✓
  • C. Because the blockchain requires shorter locks for smaller payments
  • D. To ensure the sender pays the highest fees first

Why: Each node must be able to claim its incoming HTLC after the outgoing HTLC is settled. A decreasing timelock ensures the downstream hop's deadline expires before the upstream one, so an intermediary always has enough time to pull the preimage back along the route.

Q5. What is a preimage in the context of HTLCs?
  • A. The transaction fee paid to miners
  • B. A secret value whose hash is used in the hash lock, revealed to claim payment ✓
  • C. The signature that authorizes a channel close
  • D. The first block after a channel is opened

Why: A preimage is a secret random value. Its hash is included in the HTLC. When the recipient reveals the preimage to claim funds, that revelation serves as cryptographic proof of payment and lets upstream nodes claim their own HTLCs.

Module 6 Module 6: Wallets, Nodes, and Liquidity

Wallets, Nodes, and Liquidity

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is the primary role of a Lightning Network wallet?
  • A. To mine new blocks on the Bitcoin blockchain
  • B. To hold keys and create, send, and receive Lightning payments ✓
  • C. To store the entire Bitcoin blockchain history
  • D. To validate transactions for other nodes in the network

Why: A Lightning wallet manages the keys and channel state needed to construct and sign payments, including invoices and HTLCs. It does not mine blocks, and it does not need to store the full blockchain or validate transactions for others.

Q2. What does a Lightning node primarily do for the network?
  • A. It stores all payment preimages permanently for every user
  • B. It routes payments across channels and maintains channel state ✓
  • C. It issues new bitcoin to participants who run it
  • D. It replaces the need for on-chain transactions entirely

Why: Lightning nodes forward payments along routes, maintain channel balances and commitment states, and enforce channel rules. They do not issue bitcoin, and on-chain transactions are still needed to open and close channels.

Q3. What is inbound liquidity in a Lightning channel?
  • A. The amount of funds you can send out through a channel
  • B. The amount of funds your channel peer can send to you ✓
  • C. The total on-chain Bitcoin held in your wallet
  • D. The fee paid to open a channel

Why: Inbound liquidity is the portion of channel capacity on the remote side that can be sent to you. Without enough inbound liquidity, you cannot receive payments of that size even if you have funds on your side.

Q4. Why might a node operator choose to open channels with well-connected peers?
  • A. Well-connected peers charge no routing fees ever
  • B. It improves the chance that payments can find efficient routes through the network ✓
  • C. It guarantees that channels will never need to close
  • D. It allows the operator to bypass all channel reserves

Why: Channels with well-connected peers increase routing options and the likelihood of finding paths for payments. Fees may still apply, channels can still close, and channel reserves remain required.

Q5. What is a channel reserve in the Lightning Network?
  • A. A backup of the wallet seed phrase stored on-chain
  • B. A minimum balance each side must keep in the channel to discourage cheating ✓
  • C. A pool of funds shared by all nodes on the network
  • D. A fee charged when a channel is closed cooperatively

Why: Channel reserves are minimum amounts each party must keep on their side of the channel. This ensures that a party attempting to publish an old state has something at stake, which discourages cheating.

Module 7 Module 7: Risks, Limits, and the Road Ahead

Risks, Limits, and the Road Ahead

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What is a primary risk associated with Lightning Network channels that are left unattended for long periods?
  • A. Channel balances automatically convert to fiat currency
  • B. Counterparties may attempt to broadcast old channel states, requiring watchtower or monitoring protection
  • C. The channel closes itself after exactly 24 hours
  • D. Funds are permanently transferred to the Lightning Network operators
Q2. Why do Lightning Network nodes typically need to remain online to protect their funds?
  • A. Nodes must continuously mine blocks to keep channels valid
  • B. A node must be able to respond to a breach attempt within a time window set by the channel's timelock
  • C. Offline nodes lose their private keys
  • D. The network requires every node to relay transactions at all times to remain secure
Q3. What is a 'channel jamming' attack on the Lightning Network?
  • A. Flooding the Bitcoin base layer with oversized blocks
  • B. Tying up a channel's liquidity with payments that are never completed, blocking legitimate routing
  • C. Forging signatures to steal funds from a channel
  • D. Duplicating a payment hash to double-spend an invoice
Q4. Which limitation affects the usability of Lightning Network for very small payments?
  • A. Lightning payments cannot be sent in amounts above one whole bitcoin
  • B. Routing and channel opening fees can exceed the value of very small payments, making them uneconomical
  • C. Lightning payments always take several days to confirm
  • D. Small payments are blocked by the Bitcoin consensus rules
Q5. What does the road ahead for the Lightning Network commonly involve to improve liquidity and usability?
  • A. Eliminating all payment channels in favor of on-chain transactions
  • B. Developing features like splicing, multi-path payments, and liquidity management tools
  • C. Replacing Bitcoin with a different cryptocurrency
  • D. Requiring all users to run full archival nodes

Stay in the loop on this course.

We’ll email you when new modules or related material drops. No spam.

Built with Fragment Language. Sovereign architecture — no third-party trackers.
FragRun.mfgAFImemoryFGOwnership: B-Systems.ee