What’s the Lightning Community? It’s typically spoken about in analogies, metaphors or direct explanations of goal.
- “It’s the checking account, versus on-chain because the financial savings account.”
- “It’s a sequence of tubes just like the web, with bitcoin flowing by means of them.”
- “It’s a fast, instant-settlement layer of bitcoin.”
What it truly is is a community of fee channels, the place folks lock bitcoin right into a multisignature handle, and replace the state of steadiness distributions off-chain. It’s how we’re going to scale Bitcoin — or a minimum of a part of how we’re going to scale Bitcoin.
Within the quick “Explainer” sequence on this magazine, I clarify the mechanics of how Lightning works: how the pre-signed transactions that make up a Lightning channel work, how funds are routed throughout the community, ways in which liquidity is managed, and many others. Learn these, and it’s best to have a strong understanding of the underlying mechanisms that make the Lightning Network work.
The issue is, in relation to asking what the Lightning Community is, all of these particular person items are modular and replaceable. What if we structured the pre-signed transactions in a different way? Or what if we used a distinct mechanism to route funds throughout the community? What about completely rethinking the way in which we even choose routes for funds within the first place?
What if we changed all of them over time, in order that not one of the particular person items of the protocol or community are the identical? Is that also the Lightning Community? Just like the Ship of Theseus, is the ship still Theseus’ ship after each plank and screw has been changed?
Is the Lightning Community nonetheless the Lightning Community if we modify how all the person items work?
Channel Designs
Lightning channels are units of pre-signed transactions. The aim of those transactions is to decide to, and provides customers a mechanism to implement, a steadiness distribution of a shared UTXO that neither occasion has unilateral management over.
These channels, or transactions, at present take the type of a Poon-Dryja channel. These transactions use the revocation key mechanism invented by Tadge Dryja within the original Lightning Network white paper. This can be a very particular transaction construction for a fee channel, however it’s on no account the one one.
Let’s take a look at an idea known as “timeout timber” to have a look at one thing with minimal variations from the way in which channels at present work.

A timeout tree is without doubt one of the most simple attainable types of multiparty channels (a channel with greater than two members in it). A Lightning service provider (LSP) creates a tree of transactions branching out from a single on-chain UTXO, and ending alongside every department with a Lightning channel between the LSP and a few consumer. Every tree has an expiry time, after which the on-chain UTXO (or any of the middleman ones between it and the Lightning channels) might be spent unilaterally by the LSP. The concept is that customers can merely swap their funds from channels within the expiring tree to a brand new one earlier than that time, and let the LSP reclaim the liquidity it locked up with its customers after expiry.
This was proposed as a use case for CHECKTEMPLATEVERIFY (CTV), an opcode that stops a UTXO from being spent any means apart from the transaction that matches a predefined hash; in precept, it could possibly be finished with out it utilizing pre-signed transactions with the trade-off of introducing extra coordination complexity and threat of failure to initialize a tree.
The Lightning channels would basically work simply the identical as Poon-Dryja channels, but in addition want to incorporate all the additional pre-signed transactions concerned in unfurling the tree, and topic to the expiry time of the tree as a complete.
Is that this Lightning? Or is that this one thing else?
What about LN-Symmetry? That could be a proposal utilizing CTV and CHECKSIGFROMSTACK (CSFS), an opcode that permits you to test a signature towards arbitrary information in a transaction to fully substitute the revocation key and revocation mechanism.
As a substitute of the revocation system, LN-Symmetry creates the idea of a floating signature or floating transaction. The LN-Symmetry script has two methods to spend it, both a CTV department locking the spend to the transaction representing the steadiness distribution for that channel state, or a CTV + CSFS department that lets any transaction matching a CTV template signed by a particular key set within the script spend it. This, together with using completely different timelock values, permits any dedication transaction to spend the output of any prior dedication transaction, i.e., to exchange older states with newer ones.
Fairly than penalizing a celebration who used an previous transaction, LN-Symmetry “corrects” the previous transaction to distribute balances primarily based on the present state as an alternative. Is that this nonetheless Lightning? Or is that this too completely different?
Cost Forwarding Protocols
Hash-time lock contracts (HTLCs) are used to route funds throughout the Lightning Community. Every HTLC both finalizes the fee transferring ahead with the revealing of a preimage to a hash, or permits it to be refunded backward if that preimage isn’t revealed in time. That is the mechanism safely implementing that each hop of a fee both strikes ahead to the receiver, or backward to the sender (if it couldn’t be accomplished).
This isn’t the one solution to accomplish that purpose.
Level timelock contracts (PTLCs) are one other mechanism that could possibly be used rather than HTLCs. PTLCs make use of adapter signatures versus preimages and hashes to supply atomic ensures between all of the hops in a fee. Adapter signatures are cryptographic signatures which have had an information worth added to them — or faraway from them — so as to render them invalid. The signature can now solely be made legitimate once more by including (or eradicating) the “adapter worth” that was used within the first place.
Funds alongside a route are signed with adapter signatures, with the recipient of the fee releasing the knowledge wanted to render them legitimate once more. However this isn’t that radically completely different from an HTLC; it simply makes use of a distinct mechanism for facilitation.
Let’s take a look at one thing wildly completely different: packetized funds. That is an previous proposal to fully eliminate HTLCs so as to ahead funds. The concept is to interrupt up a single fee into quite a few funds of very small worth, say 100 satoshis, after which simply blindly ahead them to a peer with routing directions.
The recipient can inform the sender each time a “fee packet” arrives efficiently, and if one doesn’t arrive, the sender is aware of that one hop alongside the route isn’t actually forwarding the cash. They will cease utilizing that route and take a look at one other one, solely dropping 100 satoshis within the course of.
Is that this nonetheless Lightning, or one thing fully completely different? The channel transactions would work the identical means and the routing protocol could be similar, however is it nonetheless Lightning?
Routing Protocols
What if we fully substitute the routing protocol? Lightning at present makes use of the gossip protocol so as to be sure that all Lightning nodes on the community have a comparatively good map of the completely different channels throughout the community, how a lot bitcoin is in them, and the charges they cost — all the knowledge mandatory for every node to totally choose the routing path for its funds by itself.
Ant Routing is a proposal to eliminate all of that totally: to route funds throughout the community with none gossip protocol, with none map of the community, and with out the sender selecting the trail that their fee takes.
The design to perform that’s constructed round “pheromone trails” and “pheromone seeds,” particular messages which can be broadcast out throughout the whole community so as to facilitate funds. Collectively, the sender and receiver generate a big random quantity, and create a partial hash of that (the pheromone seed). Each events then broadcast the seed to all of their instant friends with a counter that will increase by +1 each time the seed is handed alongside.
Ultimately, one node within the community will obtain each seeds, and know that they’re the connecting level for an entire path between sender and receiver. At this level, that node will ship a response message again in each instructions, and when the sender and receiver each verify the response they will coordinate the fee.
It will likely be handed again alongside the path to the connection level, and from there to the receiver, all with out anybody alongside the trail, together with the sender and receiver, having to assemble the route themselves or having any concept what the entire route is.
Is that this nonetheless the Lightning Community? Or is that this too radically completely different?
What Is It?!
The Lightning Community is a sequence of pre-signed transactions to implement a steadiness distribution between customers, plus the opposite mechanisms concerned in updating that distribution and synchronizing these updates between customers all throughout the community.
However doesn’t that additionally describe Ark? Or statechains? Sure. That’s my level.
The core concept of Lightning is simply updating agreements about methods to distribute funds off-chain, whereas making certain that the newest model of that settlement might be enforced on-chain if wanted, with out room for an concerned occasion to “cheat the system” and implement a extra favorable previous settlement.
There are numerous other ways to realize that purpose. The best way used at present is just the primary concrete means that was specified. There are, and might be, extra and other ways to do this. Over time the strategies and instruments for undertaking that purpose will change.
Perhaps some new means will fully out of date an older means. Perhaps some new means works higher in a sure situation or state of affairs. However new methods will certainly come, and that’s okay.
Some issues will fully change, others will solely be slight variations of what got here earlier than, however Lightning will shapeshift over time. It must so as to proceed scaling in the long run, to resolve its personal issues, to assist bitcoin function as a money.
Lightning will evolve.

Don’t miss your chance to own The Lightning Issue — that includes an unique interview with Lightning co-creator Tadge Dryja. It dives deep into Bitcoin’s strongest scaling layer. Restricted run. Solely obtainable whereas provides final.
This piece is an article featured within the newest Print version of Bitcoin Journal, The Lightning Challenge. We’re sharing it right here to point out the concepts explored all through the complete problem.
