MASTERING-BITCOIN
| Formula | Name | Description |
|---|---|---|
| Receiver's balance | Rate (mBTC/sec) times seconds watched | |
| Sender's balance | Capacity minus what the receiver has earned | |
| Channel capacity | Rate times total duration — set once at funding | |
| On-chain count | Only funding + settlement ever hit the blockchain |
In the video example: mBTC/sec and mBTC (one hour of video).
Conceptual question: As Emma streams video second by second, how does the locked 36 mBTC get re-divided between her and Fabian?
Drag the slider to a number of seconds watched. The single bar always sums to the channel capacity — each commitment transaction just moves the divider further toward Fabian.
⚙ interactive visualization — coming to this page format soon
Notice: The two balances always add up to exactly 36 mBTC. The channel never holds more than what Emma locked in. At seconds (one full hour), Fabian's share reaches mBTC and Emma's share hits zero — the channel is fully drained.
Conceptual question: The funding transaction caps the channel's maximum capacity. How do the price-per-second and the planned duration determine how much Emma must lock into the multisig address?
Adjust the rate and duration to see the required capacity .
⚙ interactive visualization — coming to this page format soon
Reflect: This deposit is locked into a 2-of-2 multisig address — money moves only when both Emma and Fabian sign. Once funded, this number is the ceiling: every later commitment transaction can only re-slice this exact pot, never add to it.
Conceptual question: As the number of payments grows into the hundreds, how many transactions actually hit the blockchain?
Slide to change how many per-second payments Emma makes. Watch the off-chain commitment count grow — while the on-chain count stays pinned at 2.
⚙ interactive visualization — coming to this page format soon
Notice: No matter how high you push the off-chain payment count, the on-chain bar never moves above 2. The commitment transactions are mutually exclusive versions of the same money — they all spend the one funding output, so only the final one is ever settled on-chain.
Question 1
Over the entire life of a payment channel — opening, hundreds of payments, and closing — how many transactions are actually recorded on the blockchain?
✅ Correct! Only the funding and settlement transactions are recorded on-chain.
❌ Not quite. Remember the commitment transactions stay off-chain — they are never broadcast.
Solution:
A channel uses three transaction types, but only two ever hit the blockchain:
So exactly 2 transactions are mined: the funding transaction at the start and the settlement transaction at the end.
Question 2
Fabian charges mBTC per second of video. The channel capacity is mBTC. After Emma has watched for 1,200 seconds, what is Fabian's balance, and what is Emma's remaining balance?
✅ Correct! for Fabian, and for Emma.
❌ Not quite. Compute , then subtract from the capacity 36 to get Emma's balance.
Solution:
Use the balance formulas:
The two balances always sum to the fixed capacity:
So Fabian holds 12 mBTC and Emma keeps 24 mBTC.
Question 3
True or False: After 600 per-second payments, the channel is holding 600 separate transactions that will each settle on the blockchain, so the total settled adds up to far more than 36 mBTC.
✅ Correct! The commitments are mutually exclusive — only the latest one can settle.
❌ Not quite. All commitments spend the same funding output, so only one can ever confirm.
Solution:
This is False. The 600 commitment transactions do not add up.
Every commitment transaction spends the exact same funding output — the 36 mBTC locked in the multisig. That makes them mutually exclusive versions of the same money. Once the funding output is spent by one of them, all the others become invalid.
So the channel doesn't accumulate transactions — it rewrites the same one over and over. The latest commitment is the one true balance; the previous 599 are obsolete drafts. Only one can ever settle, and it settles at most 36 mBTC.
Question 4
Suppose Fabian's server disconnects and refuses to cooperate in closing the channel. Emma is holding the latest fully-signed commitment transaction. What can she do to get the correct balance settled on-chain?
✅ Correct! A unilateral close lets Emma settle the correct balance without Fabian's cooperation.
❌ Not quite. Emma isn't stranded — she already holds a signed transaction she can broadcast herself.
Solution:
There are two ways to close a channel:
Either path lands the same true split on-chain, so no one is ever held hostage — this is exactly why trust isn't required.
Solved: 0 / 4