— —
Follow on X
LESSONS

Channel state and the penalty

Each channel state is a pre-signed commitment transaction. Updating means signing a new one and revoking the old by sharing a secret that lets the partner punish any attempt to use it.

7 MIN READ
A channel updates from one commitment transaction to the next, with old states revoked.
LEVEL · Advanced
IN THIS LESSON · 1 OF 6
BY THE END YOU WILL BE ABLE TO ANSWER
  • What happens if a party broadcasts an old channel state?
  • Why does each party's commitment pay itself only after a delay?
  • How is a Lightning channel opened?
  • A channel holds 1,000,000 sats, split 600,000 to Alice and 400,000 to Bob. Bob broadcasts an old state where he had 700,000. Alice uses the penalty. How many sats does Alice end up with?

Then prove it: a 3-question quiz · a challenge. The lesson marks itself complete at 100%.

After this lesson you can: explain commitment transactions and the penalty.

The funding transaction

Alice and Bob open a channel by creating a 2-of-2 multisig output on-chain. Before it is broadcast, each holds a signed commitment transaction spending that output back to the two of them in the initial balances, so neither can trap the other's funds.

Commitment transactions

Every channel state is a pair of commitment transactions (one held by each party, asymmetric) that could be broadcast to close the channel at the current balances. Updating the state means exchanging signatures on a new pair. Each party's version pays the other party immediately and pays itself only after a delay (a relative timelock), which creates the window for punishment.

Two asymmetric commitment transactions: each pays the other party at once and its holder only after a delay.
Asymmetric commitments: your own payout is the delayed one. That delay is the punishment window.

Revocation

When a new state is signed, each party reveals a revocation secret for the previous state. With that secret, the other party can spend the delayed output of the old commitment, taking all channel funds. So if Alice later broadcasts an old state where she had more, Bob has the delay period to notice and claim everything. Broadcasting an old state is never profitable, which is what keeps both honest.

Closing

Three steps: an old state is broadcast, the revocation secret is used during the delay, the cheater loses everything.
Why broadcasting an old state is never profitable.

  • Cooperative close: both sign a transaction paying the final balances with no delays. Cheap and immediate.
  • Force close: one party broadcasts their latest commitment. Their funds wait out the delay; the other's are available at once. Used when the partner is offline or uncooperative.
  • Breach: an old state is broadcast and punished.

What you are trusting

Table of the three ways a channel closes: cooperative, force, breach.
Three ways out.

Nothing about honesty. You are trusting that you (or a watchtower) will be online during the delay to catch a breach, and that the chain is not so congested that your penalty transaction cannot confirm in time. Those are the real risks, and they are engineering problems, not counterparty ones.

MINI CHALLENGEPenalty math

A channel holds 1,000,000 sats, split 600,000 to Alice and 400,000 to Bob. Bob broadcasts an old state where he had 700,000. Alice uses the penalty. How many sats does Alice end up with?

sats
CHECK YOURSELF
1/3 What happens if a party broadcasts an old channel state?
2/3 Why does each party's commitment pay itself only after a delay?
3/3 How is a Lightning channel opened?
pick an answer for each question

SOURCES

  1. The Bitcoin Lightning Network (Poon and Dryja, 2016)
  2. Lightning Network specifications (BOLTs)
Progress is saved in this browser only.