A Cost Analysis of Internet of Things Sensor Data Storage on Blockchain via Smart Contracts

Blockchain is a developing technology that can be utilized for secure data storage and sharing. In this work, we examine the cost of Blockchain-based data storage for constrained Internet of Things (IoT) devices. We had two phases in the study. In the first phase, we stored data retrieved from a temperature/humidity sensor connected to an Ethereum testnet blockchain using smart contracts in two different ways: first, appending the new data to the existing data, storing all sensor data; and second, overwriting the new data onto the existing data, storing only a recent portion of the data. In the second phase, we stored simulated data from several sensors on the blockchain assuming sensor data is numeric. We proposed a method for encoding the data from the sensors in one variable and compared the costs of storing the data in an array versus storing the encoded data from all sensors in one variable. We also compared the costs of carrying out the encoding within the smart contract versus outside the smart contract. In the first phase, our results indicate that overwriting data points is more cost-efficient than appending them. In the second phase, using the proposed encoding method to store the data from several sensors costs significantly less than storing the data in an array, if the encoding is done outside the smart contract. If the encoding is carried out in the smart contract, the cost is still less than storing the data in an array, however, the difference is not significant. The study shows that even though expensive, for applications where the integrity and transparency of data are crucial, storing IoT sensor data on Ethereum could be a reliable solution.

[1]  Marimuthu Palaniswami,et al.  Internet of Things (IoT): A vision, architectural elements, and future directions , 2012, Future Gener. Comput. Syst..

[2]  Li-Chun Wang,et al.  Stochastic Blockchain for IoT Data Integrity , 2020, IEEE Transactions on Network Science and Engineering.

[3]  Sherali Zeadally,et al.  A review and an empirical analysis of privacy policy and notices for consumer Internet of things , 2018, Secur. Priv..

[4]  Hyeon-Eui Kim,et al.  Blockchain distributed ledger technologies for biomedical and health care applications , 2017, J. Am. Medical Informatics Assoc..

[5]  Juan M. Corchado,et al.  Legal Aspects and Emerging Risks in the Use of Smart Contracts Based on Blockchain , 2019, KMO.

[6]  Juan M. Corchado,et al.  A Framework for Knowledge Discovery from Wireless Sensor Networks in Rural Environments: A Crop Irrigation Systems Case Study , 2018, Wirel. Commun. Mob. Comput..

[7]  Wei Ni,et al.  Blockchain's adoption in IoT: The challenges, and a way forward , 2019, J. Netw. Comput. Appl..

[8]  Sherali Zeadally,et al.  Privacy Issues and Solutions for Consumer Wearables , 2018, IT Professional.

[9]  Diane J Skiba,et al.  The Potential of Blockchain in Education and Health Care. , 2017, Nursing education perspectives.

[10]  Hongbo Zhu,et al.  Blockchain for the IoT and industrial IoT: A review , 2020, Internet Things.

[11]  F. Curbera,et al.  Blockchain: An enabler for healthcare and life sciences transformation , 2019, IBM J. Res. Dev..

[12]  Kyung-Hyune Rhee,et al.  Smart Contract-Based Review System for an IoT Data Marketplace , 2018, Sensors.

[13]  Hannu Tenhunen,et al.  Internet of things for remote elderly monitoring: a study from user-centered perspective , 2017, J. Ambient Intell. Humaniz. Comput..

[14]  Yeray Mezquita,et al.  Blockchain Technology in IoT Systems: Review of the Challenges , 2019 .

[15]  Michael Devetsikiotis,et al.  Blockchains and Smart Contracts for the Internet of Things , 2016, IEEE Access.

[16]  Xue Liu,et al.  Towards Secure Industrial IoT: Blockchain System With Credit-Based Consensus Mechanism , 2019, IEEE Transactions on Industrial Informatics.

[17]  Antônio A. de A. Rocha,et al.  A Survey of How to Use Blockchain to Secure Internet of Things and the Stalker Attack , 2018, Secur. Commun. Networks.

[18]  Xiangyang Li,et al.  A Summary of Research on Blockchain in the Field of Intellectual Property , 2018, IIKI.

[19]  Manuel Díaz,et al.  On blockchain and its integration with IoT. Challenges and opportunities , 2018, Future Gener. Comput. Syst..

[20]  Pietro Ferraro,et al.  Distributed Ledger Technology for Smart Cities, the Sharing Economy, and Social Compliance , 2018, IEEE Access.

[21]  Juan M. Corchado,et al.  Non-linear adaptive closed-loop control system for improved efficiency in IoT-blockchain management , 2019, Inf. Fusion.

[22]  Alessandra Pieroni,et al.  Smarter City: Smart Energy Grid based on Blockchain Technology , 2018 .

[23]  Theodora A. Varvarigou,et al.  Blockchains for Supply Chain Management: Architectural Elements and Challenges Towards a Global Scale Deployment , 2019, Logistics.

[24]  Khaled Salah,et al.  IoT security: Review, blockchain solutions, and open challenges , 2017, Future Gener. Comput. Syst..