What is The Internet of Things or IoT, and how can Blockchain benefit IoT? (Part 21)

Welcome to the 21st part of the 100 part series on Blockchain.

Previous parts: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 and 20.

There is a huge impact of IoT, or the Internet of things, on everything, from how we travel and do our shopping to the way manufacturers keep track of their inventory. But what is IoT, and how does it work?

What is IoT, and how does it work?

IoT refers to the concept of connecting any physical device to the internet and other devices. Similar to the way in which Internet has changed how we work & communicate by connecting us globally, IoT aims to take this connectivity to the next level by connecting various devices to the internet, generating a giant network of connected things– all of which collect and share data about the way they are used and about the environment around them. Thus, allowing the devices to communicate with people and other IoT-enabled devices.

Five main components of IoT

How does the Internet of things or IoT work?

(i) IoT Sensors or smart sensors: Any device is called an IoT device or smart device when it is equipped with a smart sensor that helps in collecting very minute data from the surrounding environment. An IoT device may also have multiple sensors. For instance, simple watches can be used to see the time and date only, but smart IoT watches with different sensors like optical heart rate sensor, oximetry sensor, calorie counter, pedometer sensor, etc. allow a user to monitor heartbeat rate, oxygen level, calorie count and steps walked. There are also many other types of sensors used by different smart devices like temperature sensors or thermostats, pressure sensors, humidity sensors, CO2 sensors, light sensors, motion sensors, RFID tags, etc.

(ii) IoT gateway: IoT gateways, as the name suggests, are the gateways to the internet for IoT devices. The data collected from various IoT sensors embedded into a variety of devices is sent to the cloud via IoT gateways. In other words, the IoT gateway acts as a bridge that connects multiple IoT devices to the cloud. The devices are connected to the IoT gateway through low-power wireless networks like ZigBee, Bluetooth, Z-wave, LoRaWAN, etc. IoT gateway collects data from different smart sensors, pre-processes it locally, and sends it to the IoT cloud via the internet. Pre-processing of data means aggregating, summarizing, filtering, and synchronizing traffic from different IoT devices so that the volume of data that needs to be forwarded to the cloud is significantly minimized. This reduces power usage, response time, and network transmission costs.

The wearable devices connected with Bluetooth often use a mobile phone as their gateway. This works well as long as the phone and the devices are nearby. On the other hand, other smart devices like home automation smart devices can’t use mobile phones as the gateway as the phones don’t stay in a fixed location. These require a gateway box plugged into the wall. They receive information from IoT devices using Zigbee, LoRaWAN, etc. and then forward the information to the cloud via the Internet. Also, the devices don’t receive the information from the cloud directly; it is received through the IoT gateway. Thus, gateways have a role in both sending data to the cloud and then receiving information from it.

(iii) IoT Cloud: The IoT devices collect massive amounts of data that must be managed efficiently. The IoT cloud offers tools to collect, process, manage and store a huge amount of data in real-time. Some examples of IoT cloud platforms are Google cloud IoT, Azure IoT, Amazon Web Services (AWS) IoT, etc. Basically, the cloud is a sophisticated, high-performance network of servers optimized to perform high-speed data processing of billions of IoT devices, traffic management, and deliver accurate analytics. Industries and businesses can easily access these data remotely to improve products and services and make critical decisions when necessary.

(iv) Data processing: Once the data is collected and gets to the cloud, the machine learning and artificial intelligence tools process the acquired data. The data processing means converting data from billions of IoT devices and sensors into valuable insights which can be interpreted and used to perform intelligent actions that make all our devices ‘Smart Devices.’

(iv) User interface: Lastly, there needs to be an interface to make the processed information available to the end-user. The user interface is either in a mobile application or a web-based application. It helps the user to monitor their smart devices remotely and interact with them. For example, in the case of home automation, the user interface provided will help the user to switch on or off the lights or fan in a specific room. The alert notifications can be sent either by triggering alarms on their phones, and the app also offers you options to make changes to the conditions. For example, if the temperature of the AC is too high, the app can suggest you adjust it to something more suitable.

A user interface for a smart home app

Few examples of the Internet of Things

IoT can transform traditional objects and devices into smart devices by exploiting technologies such as sensors and the internet. Internet of Things (IoT) has many applications in various areas such as healthcare, agriculture, home automation, wearables, augmented reality, transportation, and many more. A few examples of IoT or smart devices are as follows:

(i) Smart wearable health devices: These devices are IoT-enabled and analyze all of our data, like real-time patient monitoring, pulse, heart rate, blood pressure, etc., to improve our lifestyle and health. The data can also be passed to the clinicians directly on their remote devices.

(ii) Smart home devices: IoT enables home users to create a network of smart home appliances such as smart thermostats, smart locks, smart doorbells, smart light switches, smart speakers, etc.

(iii) Smart Farming: Smart farming devices monitor weather conditions, cattle monitoring and management, drone management, crop watering and monitoring, etc.

(iv) Connected Cars: IoT sensors in connected cars allow vehicle-to-vehicle communication, smart parking and can signal users about damaged roads, damaged bridges, breakdown of the vehicle, etc.

Advantages of IoT

IoT technology can offer numerous benefits in various sectors:

(i) Automation: By automating tasks and requiring little to no human intervention, organizations may save time and money. IoT provides an automated approach to devices communicating with each other. This enables devices to automatically identify or even predict a fault and inform the maintenance team. Thus, allowing you to reduce downtime and unexpected or unnecessary maintenance costs.

(ii) Save time and resources: By reducing human effort, IoT devices allow you to accomplish cumbersome tasks faster and with optimum energy utilization. For example, if your home has smart lights that turn on only at times when people are moving through areas, this saves the unnecessary use of electricity.

(iii) Better customer experience: With so much data and information collected by IoT devices, organizations now have greater access to data related to their customers and products than ever before. With real-time operational insights, they can monitor customer behavior, understand their requirements, and deliver better-personalized experiences that engage the customers at a deeper level and increase customer loyalty.

(iv) Better business insights: IoT devices can help organizations gather data to identify insights about their business, both internally and externally. They can be beneficial in asset tracking, monitoring, inventory management, energy optimization, etc. For instance, logistics firms can use IoT devices to align the delivery locations and schedules that make the most efficient use of their vehicles and employees. Businesses can also use IoT to reduce their time to market for new products or services and amplify their ROI.

Challenges with IoT

Although IoT provides enormous benefits, it comes with its own share of problems too:

(i) Single point of failure: Most IoT devices depend on centralized architecture by connecting them to cloud servers to store and collect information. This centralized architecture can introduce a single point of failure, which means that a component of a system can interrupt the running of the entire network if it crashes. This is undesirable in any system as it can compromise the availability of the entire data.

(ii) Security: Secondly, the largely unregulated and centralized IoT market makes the IoT devices vulnerable to being hacked. In case a hacker is able to access control of an IoT device, there would be two main risks associated with it:

· The hacker would be able to access and steal sensitive data of the IoT device users.

· The hacker could be able to take remote control of the device itself. For instance, a hacker could take control over a self-driving car with someone in it or make purchases based on access levels given to an IoT system.

Therefore, robust cybersecurity is a must.

(iii) Additionally, IoT devices lack the ability to identify compromised IoT devices, data leaks, and hackers. According to a report, less than half of IoT businesses can detect if any of their devices have been breached.

Blockchain- The Solution

Blockchain technology aims to solve the challenges associated with IoT:

(i) Security: Because of the decentralized nature, Blockchain technology offers various potential benefits and allows a smart device to function autonomously without the need for a centralized authority. The transactions are timestamped and then inserted into blocks; each block is cryptographically protected by a hash. The transactions refer to the IoT data exchanges that occur in the network. The blocks are linked together to form a chain, referred to as a Blockchain. No centralized entity is commissioned to monitor or process the transaction; instead, a block containing transactions is added to the Blockchain only after achieving the consensus among the nodes. It empowers all the network nodes with validation rights to check the correctness of IoT data. This prevents the hackers from attacking or manipulating data once the data is added to the Blockchain. Hacking Blockchain is difficult because if one block is hacked, the attacker must hack every subsequent block because every block contains the previous block’s hash. This piece of information is what links one block to another. Tampering with a block changes its hash and hashes of the subsequent blocks, making the whole Blockchain invalid. Therefore, it is nearly impossible to tamper with the data, thus making the whole network safe and secure.

(ii) No single point of failure: Adopting a decentralized peer-to-peer network to process the transactions reduces the costs associated with maintaining large centralized data centers by distributing computation and storage needs across the nodes of the Blockchain network. This will prevent failure in any single node in a network (either because of a power outage or the node goes offline) from bringing the entire network to crash and compromise data. Thus, the adoption of Blockchain in IoT can overcome the single point of failure problem and serve as an adequate means to efficiently and securely store and process IoT data.

Challenges in implementing Blockchain in IoT

There is no doubt that integrating Blockchain with IoT would have many advantages that may improve many of the IoT issues, but at the same time, Blockchain technology has its own flaws and challenges that need to be addressed:

(i) Processing Power and Time: Due to the block size constraints, many Blockchains have lengthy processing periods for transactions to be written into the chain of confirmed blocks. For instance, in the case of Bitcoin Blockchain, the block size limitation is 1MB, and the average transaction size is 500 bytes; therefore, around 2000 transactions can be stored per block. And the block time is set to be 10 minutes, which leads to a maximum throughput of 7 transactions per second.

In IoT systems, the IoT devices continuously stream data. Therefore, the number of transactions in the IoT ecosystem would far exceed the Blockchain limits. Thus, the challenge is to boost Blockchain’s throughput to meet the need for frequent transactions in IoT systems.

(ii) Scalability issues: Current Blockchain platforms have scalability issues because of restricted transactional throughput (transactions/second), efficiency, and high computational cost. If all transactions are to be saved on the main Blockchain, the ledger over time will become extremely large. Every time a new transaction needs to be processed, the information is updated on all nodes of the network to make it transparent and verified across all nodes. Therefore, as the number of transactions grows, so does the ledger’s size, resulting in more data to be processed and stored on each node. With the block size and block time constraints, one has to wait for a long time for the validation of a transaction.

Since the magnitude of IoT data would grow rapidly, it makes the processing of high volumes of data extremely complicated and lengthy on the Blockchain, reducing the overall performance of the Blockchain.

Due to these limitations, certain Blockchain scalability layer 1 and layer 2 solutions have to be implemented before integrating Blockchain with IoT. These will increase the transactional throughput, increase the number of confirmed blocks per second and decrease the block time.

Layer 1 scaling solutions: Layer 1 scaling solutions are applied to the main Blockchains to increase their performance and transactional throughput. They are divided into two categories: consensus mechanism improvement and sharding, each of them has been discussed in Part 15.

Layer 2 scaling solutions: Layer 2 scaling solutions don’t require changes in the main Blockchain layer 1. They establish an additional protocol that is built on top of main Blockchains like those of Ethereum and Bitcoin. Layer 2 scaling solutions are of 4 types: channels, rollups, plasma, and side chains. Each of them has been discussed in detail in Part 16.

Layer 1 and Layer 2 Blockchain

(iii) Handling massive data on Blockchain: In the Blockchain network, every participant/node maintains a copy of the complete distributed ledger. Upon the confirmation of a new block, the block is broadcast throughout the entire network, and every node appends the confirmed block to their local ledger. Therefore, the management of huge data on Blockchain puts a burden on nodes’ storage space, making Blockchain very expensive for storing all the data collected by IoT devices. To overcome this issue, InterPlanetary File System (IPFS) can be used.

IPFS: IPFS is a content-addressing, peer-to-peer network for storing and sharing data in a distributed file system. Instead of storing every data in the blockchain network, IPFS can be used to store the entire digitized content with high integrity, and only the hash address of the data needs to be stored on the Blockchain. In other words, the Blockchain can be used to store the address of the data, while IPFS can be used to store the entire data securely. Furthermore, since IPFS is distributed, it has no single point of failure.

Proposed architecture for Blockchain and IoT integration

(i) Type of Blockchain: A permissioned private Blockchain, more specifically, a consortium Blockchain, can be used instead of a permissionless public Blockchain. The IoT devices that interact with consumers and gather their sensitive information have profound privacy implications, like in the scenarios such as a smart door lock that records what times of the day the door is open and closed or the data collected by a pacemaker and sent to a hospital. This type of information should not be available to the public. Therefore, a consortium Blockchain being a private Blockchain, would be suitable for the IoT. Additionally, unlike permissionless public Blockchain, where anyone can become a node, in the permissioned Blockchain, all nodes are pre-selected.

(ii) Consensus mechanism: The consensus mechanism used can be Proof of Authority, abbreviated as PoA, where the network users stake their identity and reputation. This means that, unlike Proof of Work (POW) and Proof of Stake (POS) consensus mechanisms, where anyone can join without disclosing their identities, users in PoA systems are known entities that put their reputations at stake. The faster speed of the PoA consensus mechanism allows the network to reach consensus more quickly. It, therefore, provides much faster processing of transactions than other consensus mechanisms like POW and POS.

(iii) Smart contracts: Smart contracts, written in Solidity language, are the self-executing programs stored on a Blockchain that run when predefined conditions are met. Smart contracts can settle service disputes between consumers and IoT service providers, restrict data access to only the desired parties, and securely share data with the stakeholders.

(iv) Integration of Artificial Intelligence (AI): Integration of AI tools is essential for converting raw data captured by IoT devices into meaningful, useful insights that can be interpreted and used to perform intelligent actions by the devices.

(v) Layer 2 scaling solution: Layer 2 scaling solution Sidechains can be used. Sidechains are separate Blockchains that are connected to the main Blockchain through a two-way peg to help process some of the IoT data from the main Blockchain. The IoT devices can be grouped together; each sidechain network is responsible for maintaining a secure log of the IoT data operations that occur within it. For instance, the IoT devices in the entire smart city can be grouped as sub-networks like smart transportation, smart medical, smart home, etc. Each of these sub-networks has independent businesses and runs in parallel on their assigned sidechains. Then these sidechains can share data through the mainchain to provide a more valuable service. The mainchain is also responsible for managing successful or failed requests to access IoT data. A sidechain with its own protocols and implementation runs independently and is completely isolated from the main chain. Therefore, sidechains provide scalability and increase the transaction throughput by taking away some of the IoT transactions into their sidechain and processing transactions at a much higher rate.

Each of the IoT sub-networks runs in parallel on their assigned sidechains

In case the main Blockchain is hacked or compromised, the sidechain can still operate; likewise, the cyberattacks on the sidechain cannot affect the operation of the mainchain.

Another advantage of using sidechains is that public Blockchain can also be used for IoT data management. While the mainchain is public and permissionless, the sidechain is designed private & permissioned to cater to IoT data. Thus, the public mainchain will be used as a reference chain to keep the IoT device information record, and maintaining and processing IoT data will be done on the private sidechains.

(vi) IPFS: Both the main Blockchain and sidechains are connected to IPFS for storing the entire IoT data. The hash address of the IoT data will be stored on sidechains and Blockchain.

IoT data is processed by sidechain and stored on IPFS

(vii) dApps: dApp refers to a distributed web application, a user interface that can interact with Blockchain using the smart contract. Unlike a conventional app, dApp is no longer controlled by a single entity or an organization once deployed on the Blockchain network.

When a new IoT device is added to a smart system, the device should be registered to the Blockchain network through the dApp. It enables the user to monitor their smart devices remotely and interact with them. Any notifications or alerts are also sent on the dApp.

Other related articles:


Ali, M. S., Dolui, K., & Antonelli, F. (2017, October). IoT data privacy via blockchains and IPFS. In Proceedings of the seventh international conference on the internet of things (pp. 1–7).

Hang, L., & Kim, D. H. (2019). Design and implementation of an integrated iot blockchain platform for sensing data integrity. Sensors, 19(10), 2228.

Jiang, Y., Wang, C., Wang, Y., & Gao, L. (2019). A cross-chain solution to integrating multiple blockchains for IoT data management. Sensors, 19(9), 2042.

Lee, J., Azamfar, M., & Singh, J. (2019). A blockchain enabled Cyber-Physical System architecture for Industry 4.0 manufacturing systems. Manufacturing letters, 20, 34–39.

Ngubo, C. E., McBurney, P. J., & Dohler, M. (2019, March). Blockchain, IoT and sidechains. In Proceedings of The International Multiconference of Engineers and Computer Scientists.

Sigwart, M., Borkowski, M., Peise, M., Schulte, S., & Tai, S. (2020). A secure and extensible blockchain-based data provenance framework for the internet of things. Personal and Ubiquitous Computing, 1–15.

Sultan, A., Mushtaq, M. A., & Abubakar, M. (2019, March). IOT security issues via blockchain: a review paper. In Proceedings of the 2019 International Conference on Blockchain Technology (pp. 60–65).

Thanks for reading!

If you liked this application and want to explore more real-world applications of blockchain please follow this link.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store