Lightning loop is a great non-custodial way to do submarine swaps in both directions. However I would like to clarify some questions about how it actually works.

There is a closed source server side of the loop, controlled by lightning labs. Which lightning nodes is the server side running on? Does that mean that I will only ever be able to rebalance the channels that are a part of the path from my node to theirs?

Second question is more about the software architecture. Why do I need a daemon loopd to always be running in the background? Seems like the server side should be of course always online, but why ask the clients to do that?


I wasn't aware until now that their server is closed source. But it appears to be like that indeed. Interesting and understandable choice, I guess they do want to earn money after all. Let's hope it'll be open sourced/reconstructed eventually.

With regards to your more technical questions, I don't know what nodes their servers run on, but the idea of the lightning network is that as a user you shouldn't have to know. As long as you are connected to the LN, there should always be a path from your node to theirs. The question could only be if there is a path with enough capacity from/to their nodes. However, the advantage of this seeming to be their business is that they have an incentive to maintain good in- and outgoing capacity to everywhere in the network, so it should just work.

As to why there needs to be a loopd running, that makes sense while a swap is running, since it needs to watch and act both upon LN and the bitcoin blockchain, because loops are really just submarine swaps. I'm pretty sure you can kill that loopd once your swap is done.

  • That is essentially the question: there will be all sorts of routing/inbound capacity issues if they only have one node, so I would like to analyze it. But maybe they have multiple nodes, which would improve the situation, but still the issues will remain... Also of course you can kill loopd, but that is clearly not their intended design decision, and I wonder why? – Dmitry Laptev Jul 12 at 15:38
  1. Lightning Labs manages the lnd node(s) running on the private (closed source) server you are correct. Your node receiving Loop payments on LN will need a route to their node, however part of the service Loop is providing (and charges for) requires them to keep channels balanced to pay your invoices or accept payments on demand.

The closed source functionality could include proprietary channel balancing techniques that give Loop's node(s) an edge in their service over competitors.

In any case to find their node you can take an invoice from Loop and parse out the destination pubkey.

  1. The loopd implementation itself is a daemon that is tightly coupled with lnd and the private server discussed above. It is responsible for facilitating all parts of the submarine swap functionality Loop offers. It is intended for loopd to be running alongside lnd for automated submarine swap workflows (ie. rebalancing).
New contributor
crt is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.