Model 18 · Security
The Lightning Security Machine
Why the latest channel state must be protected.
Explanation level
How to use this model
How to use this modelWhat you see, what you can touch, what changes, what to take away
What am I looking at?
A security laboratory: a rack of commitment plates (old ones carrying revocation keys), a time-lock dial counting blocks, a watchtower, a chain rail and two payout trays.
What can I touch?
- Advance through channel states
- Compare old and current commitments
- Simulate a cooperative close
- Simulate an outdated-state broadcast
What happens when I change something?
Publish an old state and the dial starts counting: if the other side or a running watchtower reacts before the delay ends, the other side takes the cheater's balance too, so the cheater loses everything it had in the channel; if nobody does, the cheater can sweep its output once the delay has passed, and then the old balances are final.
What should I understand afterwards?
Explain why publishing an old channel state is risky for the cheater.
Understand why participants must protect the latest valid channel state.
Old agreements are torn up with a key.
After this you can
- Explain why publishing an old channel state is risky for the cheater.
Experiment with channel updates and closing scenarios.
Pay, then close fairly, alone, or with an old state.
After this you can
- Predict whether a cheat succeeds from the delay, the victim's absence and the watchtower.
Explore commitment transactions, revocation, time locks and security assumptions.
LN-penalty, to_self_delay, justice transactions, watchtowers.
After this you can
- Describe how revocation keys and the relative time lock make penalties possible.
Open the model in its own window · works offline once loaded
Missions operate the model to complete them
-
Stop the cheat while you are away
AdvancedCompletedProtect the latest channel state even when you cannot watch the chain yourself.
Your task: Make at least one payment. Keep the 144-block delay, set Bob offline for 2,000 blocks or more, then make sure Alice's old-state broadcast is punished.
Use: Advance through channel states · Simulate an outdated-state broadcast · Explore monitoring requirements · Demonstrate the role of a watchtower
Under LN-penalty, an old state can be punished only before the time lock runs out. If you cannot be online that often, a running watchtower can act for you; it is optional and only helps if it is up and reacts in time.
Missions are checked from the model's own simulation state, not from clicks. No time limit. Completion is stored only in this browser. The quiz questions in the learning paths remain available.
Tutor Ask a question, or let the tutor show you around
The tutor answers by explaining and, within the permissions below, by operating this model. Every change it makes is shown and listed, and you can undo it. It cannot run code, read your browser data or see anything secret. The page works the same without it.
What the tutor did
Common mix-ups
- Myth: A watchtower makes Lightning channels completely safe.
- In fact: It helps only if it is running and acts in time; it is optional and has its own assumptions.
- Myth: All Lightning channels punish cheaters the same way.
- In fact: This is the LN-penalty construction; other designs use different mechanisms.
Concepts in this model
Helpful to know first
Next recommended
Part of these learning paths