Will Blockchain will change the IoT world!?

Some time ago I was asked to think of creating a Blockchain + IoT software prototype, not as a first step towards a commercial product, but just to gather such expertise. Of course I answered, that it was not a problem and I would come up with something rather quickly. “My speciality is analysis of complex systems, I’m working on commercial IoT projects for 4 years. And I understand main blockchain principles.. in general” – these were my cheering thoughts.

After about 1-1.5 hours of googling I realised that my last thought was actually a key moment for the subject: everyone heard about cryptocurrencies, majority read about blockchain, part of these people roughly understands main principles of this technology. And then a typical hype begins: blockchain has numerous fields of application, it will change the world, remove all mediators, long live blockchain! Actually it turned out that it was rather hard to find quality technical papers about blockchain in the Internet. But the one who searches will always find, so finally I was able to refresh and upgrade my knowledge on Bitcoin, blockchain, Ethereum and smart contracts.

Ok, let’s move on to the main theme of the article. Often even a scientific work can be a compilation and rethink of the early works on the subject, the same relates increasingly to the software product – of course, I decided to first collect as much information as possible about existing projects, combining Blockchain and IoT, and then formulate something on this base. I got acquainted with Ambrosus, Chronicled and its MediLedgerContextLabs, HdacFilament, TronProvenanceSkuchain and a pair of other projects.

My findings.

In the most cases it is proposed to use Blockchain & IoT bundle for Supply Chain modernisation in order to make it smart, secure and open. Technically in the very essence it is suggested to use a distributed ledger for storing IoT sensors measurements. Generally idea is quite clear – absolute traceability of goods on the whole way from suppliers of components and materials to the consumers at the end of the chain. Discussion of expediency of such approach is out of scope of this article, instead I’d like to highlight a pair of technical moments:

  1. I was not able to find clear description of the mechanism of functioning of proposed solutions in production. All descriptions were either on the marketing level, or on the level of PoC.

  2. I was also not able to find a detailed description of how main Blockchain activities (blocks generation, transactions approval etc.) are carried out in proposed solutions.

I agree that I could just not find this information behind all this marketing wrappers, but I did my best and probability of this should be low.

My questions.

  • Security and reliability of information stored in blockchain for cryptocurrencies is guaranteed because of the extremely large number of participants in the network. How should this be accomplished for networks of much smaller scale? How many companies-participants of the “Supply Chain network” can be? Several hundreds? Thousand?

  • Whether it’s realistic to execute smart contracts on IoT devices based on events? Example: goods arrive to the warehouse, QR-code is scanned automatically -> transaction confirming goods arrival is executed against smart contract -> money is transferred from the smart contract to supplier. How IoT devices will interact with Blockchain backbone in this way? Their resources are typically limited.

  • How to implement storing of IoT sensors data to blockchain via transactions? First, as in the previous point we have a question about resources. If interaction with blockchain will be carried out not by IoT devices themselves but by some special gateways, then question about securing the path to the gateway should be risen. Second, IoT sensors generate much data – should we store all of it in the ledger? If not, then we’re back with the question of data security.

  • Again, I suppose IoT devices are not able to participate in the blockchain network as full nodes, they’re not able to verify transactions, calculate nonce. It’s evident that this will be performed by some gateways instead. So, it seems that businesses – users of such Blockchain + IoT solution will need to deploy such gateways and manage them. Isn’t it a step backwards compared to the cloud IoT platforms?

  • In case such IoT + Blockchain solution is based on some public blockchain (say, Ethereum), this means that its users will need to pay for everything: transactions, execution of smart contracts. Why this should be profitable? If we’re talking about some private blockchain for enterprise use, then what will be the motivation for network participants to verify transactions?

  • And the main question: do we really need Blockchain here? Whether problems in IoT are so serious, that they can be solved only with the help of a distributed ledger?

As an illustration for the last question I will “disassemble” the Ambrosus project – just because it has a good blog filled with articles and some of them even move away from the typical “marketing style” contents towards a more or less technical one. They state their mission like this: “Combining high-tech sensors, blockchain protocol and smart contracts, we are building a universally verifiable, community-driven ecosystem to assure the quality, safety & origins of products.” As a base for discussion let’s take an article https://blog.ambrosus.com/ambrosus-engineering-progress-report-22-january-2018-6a735ac17aec”.

Let me explain in my own words. We have a supply chain: Suppliers -> Manufacturers -> Distributors -> Retailers -> Customers. Nowadays it is common that infrastructures of the supply chain participants are completely disconnected. Each of the companies can use its own IoT solutions for equipment control automation, monitoring of the parts in the warehouse, monitoring of the assembly process and the process of goods transportation and so on. Ambrosus suggests to partly merge IoT processes within the whole supply chain. Ambrosus will provide a platform based on the distributed ledger for all participants of the chain, so that they could store information about all the assets going through the chain there. How this should work: each participating company has its own “masternode” – a server with Ambrosus software. This server exposes APIs for interacting with other network nodes, it should be analogous to a Full Node in Bitcoin. Each asset appearing in the supply chain is registered in the platform by the corresponding company via Ambrosus API and this information is made available to all the nodes in the network. Moreover each further interaction with this asset is automatically logged in the system (saved to the distributed ledger) and any party in the supply chain can retrieve the full history for the goods (of course, this requires to integrate, say, QR-code readers and other equipment with the “masternode”). Of course, based on all this it will be possible to create domain-specific applications with pretty charts and tables. 

How do you like the idea? I like it. Just one question – for what reason blockchain is here? Let’s think what we get using this technology: 

  1. Immutability of data

  2. Decentralised storage of data

  3. Fraud protection

I’ll begin from the end. In application to cryptocurrencies blockchain guarantees protection against dishonest participants to some degree, for example, eliminating the “Double Spending” problem. In the discussed application such protection seems unreliable due to the relatively small network size and even not needed: each recording to the distributed ledger is tied to the fact of IoT sensor activation. Besides, Distributor, for example, will not be physically able to send the same bottle of milk to two Retailers. Even if he is able to create two such records in the ledger, just one of retailers will determine arriving of the goods with this QR-code to the warehouse.

As a consequence I can’t treat the second point as an advantage because it requires each participant of the chain to deploy his own server or pay for this to the cloud provider. And with all said above there is no any practical benefits from having several hundreds of gigabytes of information about assets stored on the disk of your physical or virtual server.

What remains? Information immutability. Ok, good point. But actually it’s a desired practice for example, for Big Data solutions to have an immutable storage for the raw data as one of the layers to be able to recover from errors and re-calculate all needed data views. And you don’t need a blockchain to achieve this. So, we’re ending up with a “normal” cloud-based IoT platform design solving the stated problem, which I’d, for example, implement in several months with my team.

As a conclusion I want to say that surprisingly blockchain technology turned out to be rather controversial. I’m sure it will strengthen its position in financial area, but I’m not sure I can say the same about IoT. And if it will, the reasons will be more likely administrative, legal, but not technical.

You shouldn’t treat this as an anti blockchain manifest – I understand that even if I don’t currently see advantages of the IoT and Blockchain symbiosis, this doesn’t mean they don’t exist. Maybe I’m looking at this technology from the wrong angle. So, I would highly appreciate if you could give your opinion on the subject in comments and help me cross out the wrong words in the article header.