paint-brush
Enabling Smart Communication for IoT Devices With Smart Contracts and NFTsby@techbysmita
383 reads
383 reads

Enabling Smart Communication for IoT Devices With Smart Contracts and NFTs

by Smita SelotOctober 20th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Non-Fungible-Token (NFT) can be used to uniquely identify IoT devices as well. Uniquely identifying IoT devices also help with audit trails, verification and location of the IoT device.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Enabling Smart Communication for IoT Devices With Smart Contracts and NFTs
Smita Selot HackerNoon profile picture


What are smart contracts?

Smart Contracts are secure pieces of code that store, verify, and self-execute when triggered. Since there is no human or intermediary involvement, a smart contract executes deterministically, typically within a few seconds, with no dependency on the bank holidays.


The smart contract makes sure that the conditions of the transaction are satisfied. It defines both the rules and penalties around an agreement in the same way that a traditional contract does, and also automatically enforces those obligations.


What is a Non-Fungible Token (NFT)?

The word Fungible stands for the property of being freely swapped without affecting the value i.e., a dollar bill or Bitcoins. So Non-fungible stands for the property of an asset being unique and indivisible. And Non-Fungible-Token, though not the most sonorous word, can change the way IoT devices are identified.


Though NFTs have been in news related to digital arts and collectibles, they can be used to uniquely identify IoT devices as well. This property of NFTs for IoT devices is very useful as it solves the issue of malicious or fake devices spoofing a genuine IoT device. Uniquely identifying IoT devices also help with audit trails, verification, and location of the IoT device.


How NFTs are created?

NFTs for the IoT device is created by using the ERC-721 standard, which produces only a single token per physical/digital asset. An NFT is owned singularly and a change of owner requires the firmware reset. The ownership of NFT tokens is managed using a unique Id and metadata such as manufacturer, user, owner, and approvers. The combination of unique Id and metadata can not be cloned/replicated.


When an IoT device starts for the first time and connects to the internet, the public and private key pairs are generated. The public-private key pair along with some more information is passed to a smart contract that mints the NFTs. This smart contract also assigns ownership and manages the transferability of the NFTs.


The process of minting the NFTs has the following steps:

  • Create a new block
  • Validate information
  • Record information into the blockchain


NFTs have some special properties:

  • Each token minted has a unique identifier directly linked to one Ethereum address.
  • They’re not directly interchangeable with other tokens of the same type.
  • Each token has an owner and this information is easily verifiable.


The private key is proof of ownership of the original while the content creator’s public key serves as a certificate of authenticity for that particular IoT device. The creator’s public key is essentially a permanent part of the token’s history.


A signed message can be used as proof of ownership without revealing them to anybody. No one can manipulate it in any way. When an NFT ownership is changed, the firmware is reset and a new public key associated with the new owner is generated.


How do NFTs and Smart Contracts enable smart communication?

IoT devices participate in the Blockchain with their Blockchain Accounts (BCA), and the BCA is an attribute of NFT. IoT devices can use BCA accounts to self-sign transactions. This allows IoT devices to share data across the network.


Using smart contracts automated transactions can be carried out after agreed-upon transaction conditions are met. Since no intermediaries are involved, the cost of identification and authentication is reduced. Decentralization of the data makes it robust against cyberattacks in the absence of a central system to target.


Using Smart Contracts and NFTs have the following benefits:

  • IoT devices can record metadata such as location, time, temperature, etc., and make it available as metadata on the Blockchain network. The metadata can then be analyzed to check for compliance and audits.
  • Payments and negotiations can be automated using smart contracts and executed within a few seconds.
  • Micropayments can be carried out easily between the devices and services.
  • Secure software updates can be published as a URL on the Blockchain and IoT devices can validate the updates using a cryptographic hash.



Also published here.