The Internet of Things (IoT) has been around for longer than many of us may have been aware of. But it has surged into prominence over the past decade and looks set to significantly disrupt many established systems.

And where there is disruption, then there too is blockchain!

This article looks at the development of the IoT industry and at how blockchain may provide solutions that will drive it even further. It also suggests that entrepreneurs and developers may want to give attention to providing solutions to a blockchain use-case that is almost certain to become mainstream.

A quick disclaimer is that I have provided links to research papers and start-ups only to start your own thinking and research and not to endorse them.

From switching on toasters to connecting the world — the history of IoT

In 1926 Nicola Tesla described a vision of “an earth converted into a huge brain … all things being particles of a real and rhythmic whole …. (where you will) communicate instantly by simple vest-pocket equipment”. (He also predicted that there would be unmanned aircraft guided by radio, that enormous power would be transmitted great distances without wires, earthquakes would become more frequent, climatic zones would change — and women would be boss!)

Alan Turing, in 1950, was talking about teaching machines to understand and speak English. The internet was born in 1969, followed shortly afterwards by the development of the TCP/IP communication standard. RFID tags (radio frequency identification tags) were patented in 1973. They are still used today for inventory control. In 1982, students at the Carnegie-Mellon Computer Science department connected micro-switches to the Coke machine, so that they could check on their computers whether there were cold Cokes available. In 1990 the first toaster was connected to the internet — and was later upgraded to move beyond just switching on to actually putting in a slice of bread!

Some major drivers of the subsequent fast growth of IoT were IBM’s development of the first Machine-to-Machine protocol in 1999, the introduction of Bluetooth in 2010 and the upgrade of the Internet Protocol (IP) to version 6 in 2011. This last is significant as it allows for an almost unlimited number of items to have an “address” on the internet. The previous protocol had allowed for 4 billion addresses, but IPv6 extends this to 340 undecillion addresses — which is 3.4 with 38 zeros.

The rest — as they say — is history. IoT is no longer an interesting concept. It is now becoming an increasingly sophisticated network of connected devices and networks. The projection from the analyst firm Gartner is that by 2020 there will be over 20 billion connected devices.

Cisco Systems is talking about 50 billion by 2020, with 250 new “things” being connected to the internet every second, leading eventually to encompassing about 99 percent of all 1.5 trillion things that exist.

This was, perhaps, what Tesla was talking about in 1926!

What’s the problem for IoT — and can blockchain help?

The technical challenge

We can be stuck thinking about IoT as the technology to connect devices to the internet and to each other and to undertake some actions without manual input. That’s old-fashioned M2M (machine-to-machine) thinking.

The issue and the purpose for IoT is information — taking the data from these billions of devices and providing information to drive business, research and technology. IoT today combines M2M with big-data analytics and machine learning/artificial intelligence.

Gartner describes the following as “disruptive technologies” associated with IoT:

Sensing IoT endpoints (devices, sensors, gateways and twin technologies)

Communicating IoT communications (standards, protocols, technology choices,

network architecture)

Securing IoT security (attack surface from multiple devices, asset discovery and

tracking, authentication, network-based protection, secure software, visibility through monitoring, detection and response, integration with existing IT and operational practices)

Understanding IoT data and analytics (styles of analytics and integration, new data

models)

Acting IoT artificial intelligence (new algorithms, increasing computational

power and breakthroughs in deep learning to transform IoT solutions)

Most of this looks very technical and in the realm of IT and engineering of various sorts. So, where could blockchain fit in?

The role for blockchain in IoT

Two “related priorities” highlighted in the same Gartner analysis point to the role of blockchain.

1. Identity and access management capabilities: Effective IAM involves tools and best practices that manage identity, privileges, access and trust to facilitate security, risk management and business imperatives.

2. Supply chain strategy, leadership and governance: Designing strategy, optimizing networks, developing the organization and managing performance must work interdependently to execute an efficient demand-driven supply chain.

This sounds like the definition for blockchain. And when smart contracts are added, the application becomes even more compelling. Blockchain allows for an immutable record of all sensors and devices, the ownership of data, and all transactions in the saving and sharing of data. Smart contracts automate actions and processes.

Current identity registration and authentication systems that are dependent on DNS registries of the IP addresses of all devices perhaps backed up by edge computing are part of centralized organizations allowing for censorship and single points of failure. Blockchain’s decentralized system provides an immutable record and proof of the sequence of activities.

The support for blockchain in the supply chain could perhaps not be better-said than by Sam Radocchia, a Ph.D. student from Michigan State University and co-founder of a blockchain start-up:

“There isn’t a single supply chain process that could not benefit from blockchain technology. Food safety, pharmaceutical temperature monitoring, product verification to prevent counterfeiting — the list goes on and on.

The real application of blockchain technology is to track a given product in a way where every single party involved always knows where that product came from, its current status, and where it’s headed next.

A blockchain is a ledger, plain and simple. And every single year, billions of dollars are lost due to product recalls, misplaced shipments, or fraud. After all, when things are subjected to human error, chances are, errors will be made.

Blockchain technology has the ability to solve many of these pain points along a supply chain, including security, authentication, compliance, safety, social responsibility, and more.”

Problems associated with blockchain and IoT — and opportunities for developers

Unfortunately, there are some technical problems to overcome in applying blockchain to IoT.

Bad code in smart contracts

According to Bitcoin News, one of the major causes for the loss of crypto is shoddy code in smart contracts. The DAO attack in 2016 is a good example. The hack, made possible by a weakness in the code, led to the loss of 3.6 million Ether.

As smart contracts are written to support IoT and supply chain, preventing similar losses is critical. The following is a useful paper, making some suggestions about the design of error-free plugins:

· https://arxiv.org/abs/1711.09327 — Designing Secure Ethereum Smart Contracts: A Finite State Machine Based Approach, by Anastasia Mavridou & Aron Laszka. This eliminates the most common smart contract pitfalls by introducing coding patterns by way of plugins into the Solidity language.

Oracles

Smart contracts, in order to be tamper-proof, self-verifying and self-executing, also need to operate in a so-called “walled garden”. They cannot interface with external data. Yet IoT is all about interacting with external APIs and data feeds.

The solution to this problem is oracles. An oracle is a blockchain node that allows a smart contract to communicate with the outside world. This is simple in concept, but very complicated in execution if there is to be trust in the data coming via these oracles, and especially trust that malicious nodes will not feed false information into the system.

This is certainly an area for developers to consider. Some useful resources include the following (and thanks to my developer friends for finding these for me):

· https://github.com/axic/tinyoracle — a starting point project to develop an oracle that interacts with a full node

· http://truffleframework.com — this framework does a lot of the “heavy lifting” when creating Dapps or Oracles for Ethereum-based blockchains. It includes many useful packages and abstracts the low-level RPC calls.

· https://github.com/ethereum/web3.js/ — this is a Javascript API, developed by the Ethereum team. This collection of libraries allows you to connect to a local or remote node via HTTP. As web technologies are everywhere, this library allows you to connect to the ContractNet network from any web-based app.

· https://arxiv.org/pdf/1711.05938.pdf — When Mobile Blockchain Meets Edge Computing, by Zehui Xiong, Member of IEEE, et al. A proposal for an edge-computing-enabled mobile blockchain network, where IoT devices or mobile users can access and utilize resources or computing services from an edge computing service provider to support their blockchain applications.

· https://www.infoq.com/news/2018/06/Bitcoin-Lightning-Oracles. Smart contracts are usually associated with Ethereum, but MIT researchers have been investigating ways to apply smart contracts and oracles on the Bitcoin Lightning network

Some companies that have been working on technical solutions include OracliseTown Crier and Chainlink.

Storage

While Blockchains are excellent at storing short concise facts, they are a poor selection for the storage of many petabytes of IoT data. Should a blockchain attempt to store this data, the nodes would quickly run out of disk space after only a few blocks in the chain.

The solution is to somehow separate the stored data from the blockchain, without losing its trustworthiness.

Some interesting solutions are proposed in the following research papers and start-up whitepapers:

· https://ipfs.io/ — Inter Planetary File System. This addresses the problem of large amounts of data and places the immutable, permanent IPFS links into a blockchain transaction. This timestamps and secures the content, without having to put the data on the chain itself.

One start-up working on an interesting solution for storage and sharing of IoT data and for addressing the problem of oracles is Contractnet.

Data sharing

BBlockchains are the answer as a record of ownership. However, the concept of sharing an owned resource has not been implemented on a large scale. Yet this is critical for many applications, including supply chain, where information from a multitude of sources must be integrated. This may include manufacturers, shipping agents, insurers, providers of sensors and other IoT devices.

To achieve it, both ownership and permissions for access must be committed to the blockchain, with an auditable historical record.

The following solution suggests a multi-layered architecture:

· https://arxiv.org/pdf/1705.08230.pdf — “Towards Blockchain-based Auditable Storage and Sharing of IoT Data” by Shafagh, Hithnawi, Burkhalter & DuquennoyThis solution is to separate the storage from the blockchain and implement a “virtualchain” as an intermediary between it and the storage layer.

The future for blockchain and IoT

IOTA is probably the best-known company for combining IOT and blockchain, using its own Tangle solution to replace proof-of-work. It launched in 2015, as a means of facilitating machine-to-machine transactions. The MIOTA token was worth $0.00203. Today it has a market cap of $1.5 billion and the MIOTA is worth $0,58. According to Coinist, this represents an ROI of 28,000% since its launch.

Not every new idea and not every new blockchain-for-IoT start-up is going to be this successful. But some are.

Blockchain for IoT is a serious use-case!