A Cost Analysis of Internet of Things Sensor Data Storage on Blockchain via Smart Contracts
Open Access
- 2 February 2020
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 9 (2) , 244
Abstract
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.Keywords
Funding Information
- National Science Foundation (1560214)
This publication has 31 references indexed in Scilit:
- On blockchain and its integration with IoT. Challenges and opportunitiesFuture Generation Computer Systems, 2018
- IoT security: Review, blockchain solutions, and open challengesFuture Generation Computer Systems, 2018
- A Survey of How to Use Blockchain to Secure Internet of Things and the Stalker AttackSecurity and Communication Networks, 2018
- A review and an empirical analysis of privacy policy and notices for consumer Internet of thingsSecurity and Privacy, 2018
- Smarter City: Smart Energy Grid based on Blockchain TechnologyInternational Journal on Advanced Science, Engineering and Information Technology, 2018
- Blockchain distributed ledger technologies for biomedical and health care applicationsJournal of the American Medical Informatics Association, 2017
- Privacy Issues and Solutions for Consumer WearablesIT Professional, 2017
- Internet of things for remote elderly monitoring: a study from user-centered perspectiveJournal of Ambient Intelligence and Humanized Computing, 2016
- Blockchains and Smart Contracts for the Internet of ThingsIEEE Access, 2016
- Internet of Things (IoT): A vision, architectural elements, and future directionsFuture Generation Computer Systems, 2013