No Internet? You Could Still Use Bitcoin on the Lightning Network

No access to the internet? In addition to not being able to browse tweets or the latest heart-melting cat eating corn on the cob video, lack of a connection means users can’t make Bitcoin payments.

Researchers have long been exploring how to get around this problem in the case of natural disasters or in areas of the world where internet access is spottier. Wireless computer researcher Ahmet Kurt pointed to the 2017 hurricane in Florida as an example. “There was a huge power outage. People were desperate. Unless you have cash, how are you going to pay for stuff? That was very troubling,” he told Decrypt.

In the research report LNMesh: Who Said You need Internet to send Bitcoin? Offline Lightning Network Payments using Community Wireless Mesh Networks, researchers from Florida International University (who specialize in “post-disaster” research) explored sending payments over Bitcoin’s Lightning Network without Internet access. Bitcoin’s Lightning Network is faster and cheaper than Bitcoin proper, and is often touted as the future of the digital currency.

Instead of the Internet, they used local “mesh networks,” where nodes are connected directly via Bluetooth and WiFi, building a local Lightning Network they call LNMesh.

Their results? They say, under the right circumstances, offline Lightning Payments should be feasible.

“Our proposed approaches work well and can achieve success rates up to 95 [percent] on large mobile wireless mesh networks”—at least when Lightning channels have sufficient liquidity, the paper explains.

The experiment

Diving into the details of their research, their first finding was that no changes need to be made to the existing Lightning protocol or code in order to get offline payments working.

Then they began their experiments. First they needed to set up a network of Bitcoin and Lightning nodes, which are the foundation of the digital currency. Nodes make up the foundations of Bitcoin and Lightning. Any time a user sends a Bitcoin transaction, they need to be connected to a node.

The researchers set these nodes up on eight Raspberry Pis—small, standalone computers that cost less than $100 a pop.

They then spread these nodes across their university. But instead of connecting these nodes to each other via the internet, as they usually would, they connected them in a local mesh network using WiFi and Bluetooth.

Luckily, even under these humble circumstances, they were successfully able to send Lightning payments back and forth between the nodes.

“The Lightning Network protocol allows such offline payments to settle since the payments are off-chain and not recorded to the Bitcoin blockchain. Thus, as long as nodes can communicate with each other through wireless technologies such as WiFi or Bluetooth, they can perform offline LN payments,” the research paper explains.

The researchers have open sourced their code and results for hyper-curious users who would like to try out the experiment for themselves.

Async payments?

Kurt et al’s research differs from past research on asynchronous payments, which also offers a form of offline payments, but in a different set of circumstances.

Asynchronous payments allow for a node that’s online to send payments to a node that’s temporarily offline. This offers a UX improvement for the Lightning Network. As async payments click into place, users will be able to send payments to users even if they’re offline, instead of getting a dreaded “failed payment” error.

LNMesh, on the other hand, goes a step further. It shows how Lightning can work when all nodes are offline, showing that it’s possible to set up channels and send payments only with WiFi and Bluetooth.

But, as Kurt explained, the tricky part is coordinating these channels from the outset. The paper explains: “Our problem boils down to the following: Given a community of people moving around in a neighborhood during a day, how to decide who opens a channel to who so that the overall success rate of the payments in the network will be satisfactory when people do not have access to the Internet?”

Users need to find a way to coordinate an efficient way of opening channels with other users. In the paper, they look at different ways of analyzing users’ “mobility patterns,” or where users are during the day in relation to other Lightning nodes or merchants or markets, in order to make better decisions about where they should open channels to increase chances of connection. In the future this sort of coordination could be automated.

So while Kurt and co. have helped to show that Lightning payments are indeed possible, it’s still going to take a lot of work to make them smooth and practical.