Lightning Network x IoT(LoT); Potential, challenges and solutions

Kenichi Kurimoto
Nayuta Blog (English)
6 min readMay 30, 2019

Last Updated: 20 Jul 2021

20 Jul 2021:
The development of Ptarmigan is in suspension. However, the thought

Blockchain x IoT has been one of more highly anticipated fields in the crypto space for a long time. Some look to integrate smart contracts on IoT while others, including Nayuta, attempt to utilize micropayments via Lightning Network.

Although we are also very excited about the potential benefits which LN brings to IoT networks, Lightning on IoT, or what we call “Lightning of Things(LoT)”, still face some major challenges before it’s ready for more common and practical usage.

Integrating LN on smaller IoT devices such as sensors to allow thousands of micro data transactions still remains to be a challenge. Also, the entry barrier to start developing on LoT is still relatively high and this is slowing down developer adoption as well as new experiments and innovations. We hope that Ptarmigan, the 4th implementation of LN with a small footprint and Lightning shield for Arduino for better developer experience will mitigate those issues and bring LoT one step closer to its potential.

Blockchain and IoT before Lightning Network

Nayuta has been working on Bitcoin and blockchain technology and IoT since 2015. The first time I learned about Bitcoin, IoT integration was naturally the first thing that came to my mind as I had prior experience in the IoT field. Since then, we have worked on several IoTx Blockchain projects such as a electronic power socket controlled by Open Asset tokens and a Bitcoin payable vending machine. We also looked into a potential use of Ethereum smart contracts as well as the use of private blockchains.

The common issue, however, was that for blockchain IoT applications to work as intended requires real time P2P payment. This was not viable with Bitcoin at the time at the base layer. Increasingly high onchain tx fees also made it harder as thousands of small payments between many IoT devices were required for the IoT use case. On the other hand, resorting to private blockchains would lead to other tradeoffs and bring back siloed networks, which nullifies the initial appeal of integrating cryptocurrency on IoT.

As we struggle to find a viable approach for Blockchain on IoT, that’s when the Lightning Network paper came out and we immediately started investigating.

Why Lightning Network matters for IoT

The benefits of Lightning Network applied to IoT(LoT) have been laid out by BitFury’s Lightning Peach team in this post. According to them, “the innovative payment structure of the Lightning Network is well-suited to the infrastructure of the Internet of Things. The Lightning Network can provide the efficiency and security that the IoT currently lacks, as well as a better framework for our digital device ecosystem.”

In my own word, Bitcoin, a neutral, global, secure and internet native money, will be a key ingredient for the more and more interconnected and open IoT ecosystem of the future needs. While preserving its key characteristics, Lightning Network improves Bitcoin’s efficiency significantly. We anticipate that LN’s micropayment will enable new ways of interactions between IoT devices and a whole new market for LoT. This impact alone will be profound. On top of that, I believe LN technology will likely be used beyond micropayment use cases and become a basis for other technologies and solutions as a data management platform or as an alternative KPI system and beyond.

While we foresee the immense potential of LoT, however, there is still a few major challenges it needs to overcome in order to reach its full effectiveness.

Current shortcomings of LoT

As we work on Lightning Network, we have identified a few major shortcomings and challenges for LoT.

・Difficulty integrating LN on smaller IoT devices

Although some developers are already working to keep a Lighting node more lightweight, integrating LN on many smaller IoT devices such as sensors remains challenging. The true potential of LoT won’t be realized without utilizing sensors and data collected by them, which will be able to be monetized or priced thanks to LN.

・High barrier of entry for LoT development

LoT development requires knowledge of embedded software in addition to that of LN itself. In short, the barrier of entry for LoT is relatively high for most developers at the moment. This slows down the rate of developer adoption as well as new experiments or potential innovations for LoT.

・Usability and stability issue

In addition to technical challenges to integrate lightning on IoT devices, maintaining stability for practical usage will be critical. Management of channel liquidity including issues of inbound capacity,efficient routing, or channel establishment remains a problem for LoT as well. All those factors need to work in concert to realize usability and stability.

In order to mitigate issues described above, we have recently launched the 4th Lightning Network implementation on mainnet, which focuses on IoT application, and also released a Lightning Shield for Arduino for easier developer onboarding. Furthermore, we are looking to work with other projects and technologies to help bring even more features to the emerging LoT ecosystem. I will elaborate on each in the following.

Nayuta’s approach 1: Light footprint implementation in C

We have recently launched a mainnet version of Ptarmigan, 4th implementation of Lightning Network after lnd,c-lightning and acinq. Ptarmigan is a light footprint implementation of LN in C with integrations with smaller hardware specifically in mind. Currently, it is the only Lightning implementation that can function on Raspberry Pi Zero through an SPV mode. Although current Ptarmigan is still a reckless version and many bugs are still expected, we believe this is a step forward for us as well as for the LN and IoT communities.

In the future, even more effort to lower the cost of LN integration on small hardware will be required. We are actively exploring different options now to achieve the goal but the structure such as the IoT owner’s full node controls many connected IoT devices, which only hold private keys and signature programs.

Nayuta’s approach 2 Lightning shield for arduino

In addition to the mainet launch of Ptarmigan, we have also prepared a Lightning shield for Arduino in order to lower the barrier of entry for developers who are interested in LoT development.

With this, not only hardcore Lightning Network developers, but also less familiar developers in LN or IoT software will be able to quickly experiment and turn their ideas into prototypes. For example, we have quickly built some LoT prototypes such as followings.

Simple smart Lock system

Lightning vending machine

Seeing is believing; we are hoping LN integration with Arduino will lead to more interesting ideas and applications to the LoT ecosystem.

If interested in testing Lightning Arduino, you can check more specific information on this introduction page and pre-order today on Nayuta’s LN shop. We are going to sell only 100 units at cost to interested developers or companies initially.

Nayuta’s approach 3 : Integration with other services

Managing liquidity, routing, and other economics of LN to achieve decent usability is a big challenge for Lapps and the same issue applies to LoT as well.

Fortunately, there is already a number of services and projects tackling those issues. For example, Thor by Bitrefill provides a inbound capacity for users to improve LN’s bi-directionality. We are looking to integrate other LN-related tools and services to improve LoT’s practicality.

Furthermore, adding tokens or smart contracts to the equation would enhance the potential of LoT even further. For instance, we are also investigating potentially integrating Liquid/elements with our system to bring token capabilities to LoT.

Conclusion

Lightning Network on IoT, or Lightning of Things(LoT), barely started. We believe LN’s scalable Bitcoin micropayment will elabate IoT in the future but there are still many challenges we need to overcome to reach its full potential. We hope Ptarmigan, a lightweight LN implementation for IoT, and Lightning Shield for Arduino help mitigate those issues and offer the LN community more tools they can take advantage of moving forward.

--

--