freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #23 of 90

bitcoin · lightning network

BlockyVSDouble-Spend Dan
Blocky saysThe Lightning Network is Bitcoin’s Layer 2 for instant, cheap, high-volume payments.

Bitcoin's base layer is slow and limited (~7 tx/sec) by design. Lightning opens payment channels between parties: they transact off-chain instantly and nearly free, settling the net result on-chain only when the channel closes. A network of channels routes payments between users who lack a direct channel. It's how Bitcoin scales to coffee-sized payments without bloating the chain.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleExplain how Lightning settles many payments with few on-chain transactions.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>open channel (on-chain) → 100s of off-chain payments
close channel (on-chain) → settle net balance
2 on-chain txs for many payments</pre></body></html>
▶ Open the interactive comic issue
‹ Bitcoin · Halving · Supply ScheduleEthereum · The Programmable Chain ›