Title
A cost analysis of internet of things sensor data storage on blockchain via smart contracts
Document Type
Article
Publication Date
2-1-2020
Publication Title
Electronics (Switzerland)
Volume
9
Keywords
Blockchain, Internet of Things, Sensor data, Smart contracts
Abstract
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. 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.
Recommended Citation
Peker, Yeşem Kurt; Rodriguez, Xavier; Ericsson, James; Lee, Suk Jin; and Perez, Alfredo J., "A cost analysis of internet of things sensor data storage on blockchain via smart contracts" (2020). Faculty Bibliography. 2694.
https://csuepress.columbusstate.edu/bibliography_faculty/2694