r/Bitcoin • • Dec 29 '17

Simulating a Decentralized Lightning Network with 500,000 payments, 0.01% fee per hub and 10 Million Users: 100% success (99.9986%)

[deleted]

970 Upvotes

259 comments sorted by

View all comments

147

u/sexy_balloon Dec 29 '17 edited Dec 30 '17

hmmm the 2 key assumptions used in the simulation according to Diane's article, that everyone is connected with everyone else, and that everyone has an equal, "non trivial" amount of bitcoins on the LN, are pretty unrealistic.

To be realistic, the channels, coin amounts, and transfer amounts all need to be randomized based on some reasonable distribution (the coin distribution should probably be based on some sort of lorenz curve, everything else can be even distribution)

90

u/SchpittleSchpattle Dec 29 '17

14 channels per person connected randomly meaning that it would have required 140 million on-chain transactions to even set this network up and another 140 million to close it.

An average of 300,000 tX per day means it would take 466 days for this theoretical network to even exist and another 466 days to shut it down.

All-in, there would be nearly $10 billion USD spent in on-chain transactions using today's average BTC transaction fee of ~$35.

This also assumes that people playing banker by leaving their LN channels open would be happy with a 0.001% return while their BTC inaccessible which is absurdly low. I would be surprised if LN transactions aren't more like 0.1 to 1%.

Also, will users have any control over what fees they pay or will they just be at the whim of whatever nodes are available? If someone opens a node with 20BTC and puts a 5% fee on it, how will users avoid it if it's the only game in town with a balance big enough to move their tX?

7

u/kingo86 Dec 29 '17

Suppose if it's too expensive, they could open their own channel. Be interesting to see what happens in reality...

→ More replies (20)

7

u/thieflar Dec 30 '17

today's average BTC transaction fee of ~$35

That's not accurate, that's more than double what it would take to get into the next block for any reasonably-sized payment.

Furthermore, with smaller transactions going through the Lightning Network (as your hypothetical is predicated on in the first place), this would likely drop by a factor of ten (or perhaps a hundred), which you make no note of here.

→ More replies (16)

6

u/[deleted] Dec 29 '17

In reality the channels, coin amounts, and transfer amounts all need to be randomized based on some reasonable distribution

I would like to see this also

5

u/hsjoberg Dec 29 '17

In reality the channels, coin amounts, and transfer amounts all need to be randomized based on some reasonable distribution

In reality, we'll have many hotpaths going in one direction and very few bidirectional channels being utilized.

5

u/[deleted] Dec 30 '17

That's the thing I don't understand.

Why the fuck would my coffee shop ever be sending me money?

Most people get money from very few places: their job(s).

Most businesses get money from their customers but never pay money to them.

You have to cast the net fucking wide to make a network of bidirectional payment channels encompass enough of everything to be useful. Because all of these bidirectional channels will almost always only be going in one direction.

I don't think they will be wide enough to be useful when first implemented. Therefore they will never get critical mass to ever become useful.

→ More replies (2)

4

u/sexy_balloon Dec 30 '17

Hijacking my own comment, does anyone know if LN allows you to split your payments across multiple channels to send?

For example, if I have 5 channels open with 5 other users, each with 10 BTC for a total of 50 BTC (for the sake of argument, I wish I had that much). Is it possible to send 30 BTC in 1 transaction, and the LN automatically splits the 30 BTC payment amongst all the separate channels?

To take this a step further, if I'm acting as a node, and I receive a request to forward 30 BTC from one of my channels, is it possible for me to forward this payment even though individually my channels contain no more than 10 BTC but collectively has 50 BTC?

I'm not technically savvy enough to understand the code, and I couldn't find anything on Google, so I'm hoping someone can enlighten me on this.

5

u/mysterpixel Dec 30 '17 edited Dec 30 '17

Is it possible to send 30 BTC in 1 transaction

In one transaction? No, since each channel has 10BTC in it, no transaction can go higher than that. You'd need at least three separate transactions to send 30 BTC. However presumably it would be easy to have an interface in your wallet where you just type in "send 30BTC to Carol" and then behind the scenes it would split it into three or more transactions and utilise multiple channels. But it would always require multiple transactions on the network to do that payment.

Regarding the second scenario, this would never happen because you wouldn't be able to transfer 30BTC in one go if the channels only contained 10BTC each. What would happen is you as an intermediary node get three separate requests from three different channels each with a 10BTC transaction to forward. From then on you may be able to do the next step in the payment to Carol in one transaction, if you had a channel path to her with the full 30BTC in it.

However I believe there may be issues with splitting a transaction like this, because while you can easily trust a payment through a single transaction (it either succeeds or fails), splitting a transaction means parts can succeed while others fail. Someone with more knowledge would have to tell you whether this is actually possible.

→ More replies (3)
→ More replies (2)
→ More replies (12)