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.
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.
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:
NFTs have some special properties:
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.
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:
Also published here.