Thursday, August 2, 2018

Shitcoin And The Lightning Network

The Lightning Network is an overlay on the Bitcoin network, intended to remedy the fact that Bitcoin is unusable for actual transactions. Andreas Brekken, of, tried installing, running and using a node. He describes his experience in four blog posts:
  1. Can I compile and run a node?
  2. We must first become the Lightning Network
  3. Paying for goods and services
  4. What happens when you close half of the Lightning Network?
Brekken's final TL;DR was “Operating the largest node on the Bitcoin Lightning Network has been educational, frustrating, fun, and at times terrifying. I look forward to trying it again once the technology matures.” Below the fold I look into some of the details.

Brekken brought up a node running on AWS
Compiling, installing, and running Lightning Network Daemon, lnd, was straight forward. I look forward to using payment channels for sending and receiving bitcoin.
That's "straight forward" for a tech-savvy person. The Lightning Network white paper was published only 30 months ago, so it is good to see that the code is already in reasonable shape. He used a c5.large AWS instance with 500GB of disk, which would cost $61.20/month plus $22.50/month for the storage plus data transfer charges. So more than $83.70/month.

Now Brekken's node was up, it needed to contain Bitcoin and create links to other Lightning Network nodes. How many Bitcoin and how many links?
When I started writing the review the total capacity of the Lightning Network was slightly over 20 BTC (around $130,000). I decide to shake things up.
By shaking things up Brekken means becoming the biggest node in the network by assigning to it enough Bitcoin to form over 15% of the total capacity.

Source had almost 4 times the capacity of the next biggest node although, as a newcomer, it had fewer direct connections to other nodes. He had an interesting time tweaking the configuration parameters of his node, and trying to figure out what it was doing, but it did start routing payments.
The node has routed 260 payments for other users, averaging a profit of $0.0012 USD per transaction. I doubt that this will cover the costs of running the node, but leave the node running for now.
So would need to route more than 70K transactions/month to cover its costs, or about 1.6 transactions/minute. Brekken concludes that:
Maintaining a Lightning Network payment hub is stressful and makes very little profit. Hopefully the risk will decrease and profit increase as the Lightning Network gains traffic.
Lightning Spin100,000Yes
Satoshi's Place800,000No
Blockstream Store1,021,201No
Now he controlled by far the largest node on the Lightning Network, Brekken should have been in a good position to transact on his own behalf. He recounts five transaction attempts, three of which failed as shown in the table. Both the wallets he tried while attempting to pay the Blockstream Store failed.

Brekken concludes that:
Sending payments using the Lightning Network is cheaper than the regular Bitcoin network, but suffers from routing errors and wallet bugs that make it impractical even for highly technical users.
Brekken leaves the node running for a week, then asks:
Are the funds still there? ... The funds are still there. My Lightning Node has routed 389 payments, making a profit of $0.34. I suspect the increase is mostly from the recent increase in bitcoin’s price. ... Running a large Lightning Network node has been quite stressful. An exploit such as we saw with heartbleed could allow an attacker to drain all funds from the node while I’m sleeping. It’s time to end the experiment.
I think Brekken means "income" not "profit". If so, the income of the largest node in the Lightning Network is $0.34/week against costs of at least $21. He tries to gracefully close all the node's channels to recover the funds they are using, but some don't close, trapping the funds:
The remaining channels cannot close gracefully because the Lightning Node on the other side of the channel is offline. I force close these channels using lncli closechannel --force.

Closing a channel using --force results in a unilateral close which makes the funds unavailable to me. The amount of time the funds are locked up depends on the channel policy. This policy is negotiated when the channel opens. Most channels will release the funds to me in between 1440 and 20180 minutes.
That is between 1 and 14 days. It is hard to disagree with Brekken's conclusion that the technology isn't ready for prime time.


David. said...

"Bitcoiner wins a Lightning Network gambling game! They can’t receive their winnings via Lightning, because their channel is too full. /r/bitcoin has many helpful suggestions — including that you shouldn’t expect the LN to actually work, and anyway OP is a filthy Bcasher." reports David Gerard.

David. said...

David Dayen's Inside the Wild West World of Gift Card Bitcoin Brokering reports on how lax policies at retailers allow their gift cards to be used as a work-around for the difficulties of buying and selling cryptocurrencies for "fiat currency". The spreads involved, typically 25-30%, show how unlikely it is that these transactions are on the straight and narrow. The retailers have little incentive to police this market:

"Eric says, Walmart views gift cards as cash, and it doesn’t go around wondering whether purchases at their stores are made with stolen dollars. This is true of most retailers. “To them, revenue is revenue,” Eric said. “They very specifically don’t give a fuck about crimes involving their store if they’re not directly liable or directly hurt.” It can also be difficult to solve those crimes, putting a Walmart employee in the position of adjudicating which owner of the $1,000 gift card has the legal right to use it."