Skip to content

Instantly share code, notes, and snippets.

@Swader
Last active March 21, 2018 14:24
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Swader/880c8eb27c38326290c842a543ec3913 to your computer and use it in GitHub Desktop.
Save Swader/880c8eb27c38326290c842a543ec3913 to your computer and use it in GitHub Desktop.

In November, I realized some Core BTC devs don't understand the LN. Other influencers agreed with me, some in private, some publicly. These questions arose from that confusion, in an attempt to clear things up once and for all.


  1. If Alice and Bob want to transact, they need to open a channel, and they need to agree on max amount to transfer through that channel. This requires a transaction. To finalize the transaction so they can spend the BTC outside of their channel, they need to close it so their on-chain balance updates and so they can send BTC onward into other channels. Closing also needs a tx. How, then, is it sensible for Alice and Bob to transact this way, instead of what they can do now - use one single transaction?

  2. A common argument against the above is "you'll have middlemen through which many channels will go and form a mesh". My question is twofold:

  • a) how is it that this does not scare you? If LN becomes super popular and all of BTC is routed through like 5 major hubs (like currently 60% of all BTC transactions are routed through only 3 ISPs) and then govt tells the hub "OK do KYC now and tell us everything" or the hub becomes so monopolistically corrupt it starts charging absurd middleman fees (because they can), how do you solve this hypercentralized network's problem then?
  • b) even a channel with a middleman has to be closed once. If you have one big mesh of LN payments, and another unconnected one, you need to close the first one fully before being able to participate with the other one. But you cannot close just one tentacle of a hub - ALL must close because everyone's balances need to be consolidated because everyone chipped into the channel's max transfer volume. So it's impossible to close and release just one node out of the system. The bank can therefore say "No, we're not ready to close yet - we close once per week and consolidate then, wait until Friday to get your BTC and have it sendable elsewhere". - turns out this is wrong, my bad, channels can now be closed individually, a hub doesn't have to close all channels. It's still expensive to close them. There is still no way to top-up a channel without a transaction.
  1. A common argument is the "I don't need coffee logged". This, too, is DOA. If I open a channel with Starbucks for 0.5 BTC, that means we both chipped in 0.25 BTC, presumably, because the transfer capacity of the channel (unless topped up, which again needs an on-chain transaction) is "fed" by both (all) parties involved. This begs the question - how many of such channels will you open? If I want to buy coffee that one time I'm in NY, do I open a channel? And for how long? Who closes it, and why would I pay the enormous closing fee? And most of all, how many of such channels can you afford to keep open? Will you open a new 0.1BTC channel with every starbucks you visit thereby locking up your money in every new city until the channel is closed? Do you keep it open forever just on the off chance you once end up there again? People say that StarBucks will be a hub and connect to all its customers, but again, no, it won't, because it can't add new ones into an existing channel without a tx, and cannot remove old ones without closing the channel. So it has to either open new channels, or close the old one completely, all the time. Every single SB has to do this separately. This is unscalable, unsustainable, and economically insane with current TX fees.

  2. How do you deal with the "offline problem"? If a node goes offline for a while, a consolidation mechanism kicks into place. How do you deal with the fact that, for example, Turkey can block all BTC protocol traffic, or USA can, under new Net-Non-Neutrality laws block p2p money traffic, and the chains across the globe can lose connection? Who pays for those enormous damages, especially when it's huge entities that lose connection, each of which is handling 100k users?

  3. How does it not worry the people who love Bitcoin that the only currently proposed scaling solution to their favorite "decentralized" currency is being implemented by a private company (Lightning labs) who have it in their best interest to never see another solution work?


Addendum:

  • I use the term "bank" loosely. It can be an actual bank which embraces crypto, it can be a popular exchange, it can be a powerful solo player, doesn't matter.
  • I am open to having my mind changed by objective reasoning. I'm open to the possibility of having gotten the whitepaper wrong, but in that case I would like you to point me to the exact line in the WP which refutes my theory.
  • When thinking about Bitcoin, if your answer to the hypothetical question "what proof would it take to convince you it's hopeless" is "none", then you're a maximalist and aren't interested in discussing, but want to push an agenda. These questions are objective curiosities I'm seeking answers to, so that I too can start believing in the much advertised LN, or so that others can see the problems in it and fix it before it's too late.
  • I am not anti crypto. I run a crypto company for smart contract development, enterprise consulting, and crime investigation. I also run an altcoin brokerage. I have several dozen cryptos in my folio, and that includes both BTC and BCH. I think both are terribly, terribly flawed. What I'm trying to find out here is why people don't think the LN, in its current iteration, doesn't agument these flaws even further, given what I outlined in the questions.
@Swader
Copy link
Author

Swader commented Dec 15, 2017

A discussion is developing in an interesting direction here.

I also got this reply on reddit:

To answer those questions:
1: You wouldn't use LN unless you plan on making three or more transactions over the channel. It's also possible (expected, really) for a channel to reach more than the people at the ends. Closing a channel is only necessary if the user wants to access the Bitcoin on the mainnet.
2a: LN can function as a mesh network and is designed to route around blockages. Nodes that charge excessive fees will be avoided in favor of nodes that are cheaper. With respect to KYC, I don't think it's enforceable on LN, in the same way that it's not enforceable on Bitcoin proper.
2b: The nature of this question suggests a serious misunderstanding of how LN works. LN channels are independent, and can close at any time without any consideration to any other channel. Nothing in this question is relevant.
3: In order:
Channels can be funded by either or both of the participants.
LN channels can't be "topped up" in the usual sense. Interconnected node channels can be re-balanced, but the total amount in the channel is fixed.
Some people will only need one channel. Others will have many to maximize their fee collection. I'd expect casual users will have one to three channels. No data behind that, mind, just my opinion.
Due to the way LN routes payments, you won't need a channel to everyone you transact with. As long as one of your channels can find a route with sufficient funds, you're golden.
Channels stay open until they are closed.
A channel can be closed by either party whenever they want.
You'd pay the closing fee when you need to use the Bitcoins outside LN, or when you don't want the channel open anymore for whatever reason.
No, you won't need a 0.1 BTC channel for every Starbucks. Again, this part demonstrates a serious misunderstanding of how LN works.
4a: AFAIK channels won't close automatically, but you do have to be online to update the channel and monitor for fraud. So, practically speaking, being online is pretty much mandatory; I don't think there's much that can be done to change that.
4b: All traffic should be encrypted, so blocking specifically LN traffic wouldn't really work. Plus, there's always Tor and/or VPN services to obfuscate traffic. Even if a node goes down permanently, no money is lost. Either party can close the channel and unlock the coins by broadcasting the last transaction to the Bitcoin network.

My answers.

  1. This solves nothing then, because most transactions are between two people (p2p) - I run a crypto brokerage and am very active in the community so have testimonials of this. Sure, the mass-sending will work better, but other than that? Still pay super-expensive transactions and wait for an hour?

2a. If you read this series it's obvious that some nodes can monopolize the system and become "main". These nodes would be easy to track for the authorities, and thus easy to KYC-enforce or to shut down. This is a form of centralization that even further augments the already troubling ISP issue.

2b. I've been told this twice now, so am rethinking my understanding of channels and will look into the WP again to find and interpret more data.

  1. You are assuming that everyone will be connected. You forget that there will be serious LN islands formed. A Starbucks in EU won't be connected to a Starbucks in USA, per se, not even via many hops, or perhaps so many that the TX fee for hopping will become insanely more expensive than the coffee. In such a case, you need 0.1 BTC for one Starbucks, and 0.1 for the other. It's locked into place until closing. What am I misunderstanding?

4a. That's a non-starter then, because most of the users of the interconnected world have periodic downtimes. There is no way to guarantee reliable connection. If you're hoping to "bank the unbanked" and give India and the like a way to make cheap payments through the LN, that's DOA.

4b. DPI will detect types of even encrypted connections, so blocking just crypto won't be hard - especially with Net Neutrality broken in the USA now. So who pays for the TX fee of closing the account in case one node goes offline? The initiator? What if the one who's left online doesn't initiate a closing and the timeout happens?

@drouillard
Copy link

drouillard commented Jan 8, 2018

'especially with Net Neutrality broken in the USA now'. Bitcoin did fine before Net Neutrality. If Gov wants to take it down crypto, the net neutrality laws are moot. It is asking the lion that is going to attack for protection. Agreed ISPs could be an issue, but your other issues around things like KYC are far more impactful. (meaning if they nodes aren't complying, they will just go get the people, not limit their traffic)

@boorac
Copy link

boorac commented Jan 24, 2018

Not really answering the questions, but would like to contribute to the discussion with a great read:
https://medium.com/@jonaldfyookball/mathematical-proof-that-the-lightning-network-cannot-be-a-decentralized-bitcoin-scaling-solution-1b8147650800

@Swader
Copy link
Author

Swader commented Jan 25, 2018

Potentially useful? Needs a look, way too long: https://www.youtube.com/watch?v=dHwfMYJ35Mk&feature=youtu.be - 1:25:00

@Swader
Copy link
Author

Swader commented Jan 25, 2018

Another very interesting discussion. Gets trolly sometimes. https://twitter.com/bitfalls/status/956563806666350593

@MeniRosenfeld
Copy link

MeniRosenfeld commented Jan 26, 2018

  1. This represents a fundamental misunderstanding of how LN is supposed to work. Alice and Bob create a channel not just for direct transactions between Alice and Bob. Once they create a channel, Alice can route payments to other recipients (including those she has never met, transacted with only once, and never created a channel to) through the channel to Bob and the channels he has created. And also receive payments.

  2. LN can work either as a mesh or in a hub model.

In the mesh model, ever user opens channels to, say, 20 peers among the entire world population. The graph will be connected and there is no way for government to shut it down.

In the hub model, there will be, say, 10000 hubs connected between themselves, and each user will open a channel to 10 of them. Government will still find it difficult to shut them all down, and in case of problems the user can simply close the channels and reclaim the money. That's a huge difference from traditional banks and hosted wallets.

What you're also missing is that "Govt says you must do KYC" problem applies to raw Bitcoin too! They can go to nodes and tell them "you're broadcasting financial transactions, do KYC or shut down". The solution is to have too many Bitcoin nodes and too many Lightning hubs for this to be practical. Since starting a hub is so easy, no reason it shouldn't be this way.

  1. Again, you're not opening a channel with a coffee shop just to buy coffee from that shop. You're opening a channel to be able to route through it many, many different payments to different people.

  2. Raw Bitcoin also doesn't work if there's no internet connection, not sure how that is an argument against LN. If you are still connected but a channel peer is disconnected from the network (both Bitcoin & LN) you don't lose money, you just close the channel. Also, by taking payments off-chain, Bitcoin nodes become smaller and harder to detect and shut down.

  3. There are several independent teams working on LN implementations. It's all open source. And it uses raw Bitcoin transactions as a foundation - it's not like the implementation can somehow steal my money, force me to do things I don't want, or affect people who do not use LN. I don't see how it is in any way relevant what these teams' best interest is.

@Swader
Copy link
Author

Swader commented Jan 26, 2018

Thank you for the answers.

In most counter-arguments to the questions, the overarching idea seems to be that LN will be so ubiquitous and widespread that every user will be able to route to every other user, regardless of there being hubs or mesh or a hybrid. If this happens, then yes, there will be some utility in all this. I do not think this will happen. I believe there will be isolated islands of LN connections that will find it impossible to maintain a connection due to government or natural interference.

However,

(new ordinal numbers, they don't refer to old questions)

  1. Why would I open channels to 20 peers? This requires me to lock up my funds (of differing amounts) with 20 channels. People won't be willing to open such a tab in so many directions when they can just not lock up their funds and actually use them. This seems incredibly impractical - opening 20 channels means 20 transactions on the main chain, and another whenever I need to top a channel up. And then there's the locked change which becomes a big problem when you want to connect to another LN island.

  2. You're assuming people will want to run nodes on their computers. Even if the nodes become super light, very few people will run them. You can see this with torrents - very little is required to give back, and yet barely anyone does it. All it takes is 10kb/s upload, not even much disk space, and yet most people kill the torrent when they're done with it. Same with BTC. People will not leave their computers or nodes or RaspPis running and their electricity bill pumping and their internet connection clogged with upload just to keep the network afloat. The casual user just doesn't do that - they rely on third part apps to manage their keys for them (often mobile wallets) and don't want anything to do with the network's architecture. In fact, 95% of the future users of BTC won't even ever know about LN or care about it. All they want is an easy "pay" and "get paid" option. I posit that no one will run nodes, just like the node count for BTC has been stalled at around 10k for months now.

  3. Raw bitcoin doesn't work without internet, technically. But it also doesn't cause irreparable damage, chargebacks, or week-long funds lockups if the connection breaks. The LN does. Making an incredible amount of financial damage to large BTC LN users across two continents is as simple as severing that connection for a short time. The LN is much more susceptible to infrastructure based attacks which are proven to be easy (see Turkey's censorship of social media).

  4. The teams argument is that any team which exists solely to solve a problem has a direct incentive to NOT solve that problem, else it disbands. Both Blockstream and Lightning are private companies with investors, and they need to turn a profit because of that. Their business model is selling workarounds of BTC's technical failings. They have a direct incentive to work against improving the core software, and for selling their workaround and creating hubs which can collect fees.

@Swader
Copy link
Author

Swader commented Mar 21, 2018

  • Interesting (successful) attack on this already flawed concept: https://www.trustnodes.com/2018/03/21/lightning-network-ddos-sends-20-nodes
  • Additional unanswered question. If current LN routing is provided lists of IPs and not auto-searching (because it's impossible to solve the traveling salesman problem at scale), how is that not even more centralized and susceptible to abuse if nodes can dictate which route to take? This will lead to privatized pay-to-join routes on the LN where IPs/nodes will collaborate and collude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment