Model 18 · Security

The Lightning Security Machine

Why the latest channel state must be protected.

Advanced≈ 12 min

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.

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

    Advanced

    Protect the latest channel state even when you cannot watch the chain yourself.

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 may do
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

    Model 20 · SecurityThe Digital Signature MachineProving authorization without revealing the key.

    Part of these learning paths