Blockchain Technologies: Smart Contracts for Consumer Electronics Data Sharing and Secure Payment
Abstract
:1. Introduction
2. Proposed Blockchain-Based Consumer Electronics for Data Sharing and Secure Payment
2.1. Proposed Smart Contracts in Consumer Electronics
2.1.1. Functionalities of Smart Contracts
- They can assist in automating procedures and minimizing the demand for manual intervention in consumer electronics.
- Avoiding the need for paper records can contribute to increased efficiency and accuracy in consumer electronics.
- They can help reduce consumer electronics expenses by eliminating the need for middlemen.
- They can aid in accelerating transactions by offering a clear and impenetrable record of transactions. Further, the smart contract can assist in lowering the risk associated with consumer electronics.
- Withdraw
- Receive
2.1.2. Withdraw() Function
2.1.3. Receive() Function
2.1.4. Algorithm for Withdraw() and Receive() Functions
- Define the withdraw and receive functions in the smart contract.
- In the withdraw function, retrieve the sender’s account balance from the contract’s storage.
- Check if the sender has enough funds to complete the withdrawal. If not, return an error message.
- If the sender has sufficient funds, calculate the amount to be withdrawn and subtract it from the sender’s balance.
- The receive function retrieves the recipient’s account balance from the contract’s storage.
- Add the amount received to the recipient’s balance.
- Update the contract’s storage with the updated balances for the sender and recipient.
- Return a success message to indicate that the withdrawal and receiving operations were completed successfully.
2.2. dApp for Consumer Electronics
2.3. Interaction of dApp and Smart Contract for Consumer Electronics
Pseudocode for Interacting Smart Contracts with dApps
- The dApp sends a request to the blockchain network requesting access to the smart contract.
- The network validates the request and grants access to the dApp if it is deemed valid.
- The dApp interacts with the smart contract by calling its functions and passing necessary arguments.
- The smart contract processes the request and performs the appropriate actions, such as updating its internal state or triggering other smart contracts.
- The dApp receives a response from the smart contract indicating the result of the interaction.
- The dApp updates its user interface to display the interaction results.
- The dApp continues to interact with the smart contract, allowing the user to perform a wide range of actions within the decentralized application.
3. Deployment of the Stablecoin Using ERC-20
- Total Supply: A method that specifies the overall supply of a user’s tokens; once achieved, the smart contract forbids the creation of additional tokens.
- Balance of: This method returns the number of tokens stored at a wallet address.
- Transfer: This technique involves taking specific tokens out of circulation and giving them to the user.
- Approve: Considering the overall supply, this approach determines whether a smart contract is authorized to provide a user with a specific number of tokens.
- Allowance: This technique is precisely the same as the accepted method, except that it also determines whether a user has a sufficient balance between giving another user a specific number of tokens.
- The contract creator sets the initial supply of the stablecoin and the price at which it is fixed through a stable asset, such as U.S. currency.
- A user can purchase the stablecoin by sending the appropriate amount of the stable asset to the smart contract.
- The smart contract automatically mints the corresponding amount of stablecoins and sends them to the user’s wallet.
- A user can redeem their stablecoins for the stable asset by sending the stablecoins to the smart contract.
- The smart contract automatically calculates the redemption amount and sends the corresponding amount of the stable asset to the user’s wallet.
- The smart contract updates its internal state to reflect the current supply and price of the stablecoin.
- The contract creator can adjust the price of the stablecoin if necessary to maintain its peg to the stable asset.
4. Performance Analysis
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Bistarelli, S.; Mazzante, G.; Micheletti, M.; Mostarda, L.; Tiezzi, F. Analysis of Ethereum Smart Contracts and Opcodes. In Advanced Information Networking and Applications; Barolli, L., Takizawa, M., Xhafa, F., Enokido, T., Eds.; Advances in Intelligent Systems and Computing; AINA 2019; Springer: Cham, Germany, 2019; Volume 926. [Google Scholar] [CrossRef]
- Huh, S.; Cho, S.; Kim, S. Managing IoT Devices using Blockchain Platform. In Proceedings of the 2017 19th International Conference on Advanced Communication Technology (ICACT), Pyeongchang, Republic of Korea, 19–22 February 2017. [Google Scholar]
- Hlaing, K.M.; Nyaung, D.E. Electricity Billing System using Ethereum and Firebase. In Proceedings of the 2019 International Conference on Advanced Information Technologies (ICAIT), Yangon, Myanmar, 6–7 November 2019; pp. 217–221. [Google Scholar] [CrossRef]
- Wood, G. Ethereum: A secure decentralized generalized transaction ledger. Ethereum Proj. Yellow Pap. 2014, 151, 1–32. [Google Scholar]
- Pee, S.J.; Nans, J.H.; Jans, J.W. A simple blockchain-based peer-to-peer water trading system leveraging smart contracts. In Proceedings of the International Conference on Internet Computing (ICOMP), Las Vegas, NV, USA, 26 April 2019; The Steering Committee of The World Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp). pp. 63–68. [Google Scholar]
- Gür, A.Ö.; Öksüzer, Ş.; Karaarslan, E. Blockchain Based Metering and Billing System Proposal with Privacy Protection for the Electric Network. In Proceedings of the 2019 7th International Istanbul Smart Grids and Cities Congress and Fair (ICSG), Istanbul, Turkey, 25–26 April 2019; pp. 204–208. [Google Scholar] [CrossRef]
- Albrecht, S.; Reichert, S.; Schmid, J.; Struker, J.; Neumann, D.; Fridgen, G. Dynamics of Blockchain Implementation-A Case Study from the Energy Sector. In Proceedings of the 51st Hawaii International Conference on System Sciences, Hilton Waikoloa Village, HI, USA, 3–6 January 2018. [Google Scholar]
- Adeyemi, A.; Yan, M.; Shahidehpour, M.; Botero, C.; Guerra, A.V.; Gurung, N.; Paaso, A. Blockchain technology applications in power distribution systems. Electr. J. 2020, 33, 106817. [Google Scholar] [CrossRef]
- Ma, Z.; Jiang, M.; Gao, H.; Wang, Z. Blockchain for digital rights management. Future Gener. Comput. Syst. 2018, 89, 746–764. [Google Scholar]
- Gul, M.J.J.; Paul, A. IoT Geography Chain: Blockchain-Based Solution for Logistics Ecosystem. In The Fifth International Conference on Safety and Security with IoT; Springer: Cham, Germany, 2023; pp. 191–194. [Google Scholar]
- Bhadoria, R.S.; Das, A.P.; Bashar, A.; Zikria, M. Implementing Blockchain-Based Traceable Certificates as Sustainable Technology in Democratic Elections. Electronics 2022, 11, 3359. [Google Scholar] [CrossRef]
- Butt, G.Q.; Sayed, T.A.; Riaz, R.; Rizvi, S.S.; Paul, A. Secure Healthcare Record Sharing Mechanism with Blockchain. Appl. Sci. 2022, 12, 2307. [Google Scholar] [CrossRef]
- Shrestha, A.K.; Vassileva, J. Blockchain-Based Research Data Sharing Framework for Incentivizing the Data Owners. In International Conference on Blockchain; Springer: Cham, Switzerland, 2018; pp. 259–266. [Google Scholar]
- Wu, A.; Zhang, Y.; Zheng, X.; Guo, R.; Zhao, Q.; Zheng, D. Efficient and privacy-preserving traceable attribute-based encryption in blockchain. Ann. Telecommun. 2019, 74, 401–411. [Google Scholar] [CrossRef]
- Zhang, Z.; Zhao, L. A Design of Digital Rights Management Mechanism Based on Blockchain Technology. In International Conference on Blockchain; Springer: Cham, Switzerland, 2018; pp. 32–46. [Google Scholar]
- Zhu, L.; Wu, Y.; Gai, K.; Choo, K.K.R. Controllable and trustworthy blockchain-based cloud data management. Future Gener. Comput. Syst. 2019, 91, 527–535. [Google Scholar] [CrossRef]
- Bisht, D.; Singh, R.; Gehlot, A.; Akram, S.V.; Singh, A.; Montero, E.C.; Priyadarshi, N.; Twala, B. Imperative Role of Integrating Digitalization in the Firms Finance: A Technological Perspective. Electronics 2022, 11, 3252. [Google Scholar] [CrossRef]
- Li, J.; Wu, J.; Chen, L. Block-secure: Blockchain based scheme for secure P2P cloud storage. Inf. Sci. 2018, 465, 219–231. [Google Scholar] [CrossRef]
- Li, J.; Wang, X.; Huang, Z.; Wang, L.; Xiang, Y. Multi-level multi-secret sharing scheme for decentralized e-voting in cloud computing. J. Parallel Distrib. Comput. 2019, 130, 91–97. [Google Scholar] [CrossRef]
- Xia, Q.I.; Sifah, E.B.; Asamoah, K.O.; Gao, J.; Du, X.; Guizani, M. MeDShare: Trust-less medical data sharing among cloud service providers via blockchain. IEEE Access 2017, 5, 14757–14767. [Google Scholar] [CrossRef]
- Hammi, M.T.; Hammi, B.; Bellot, P.; Serhrouchni, A. Bubbles of Trust: A decentralized blockchain-based authentication system for IoT. Comput. Secur. 2018, 78, 126–142. [Google Scholar] [CrossRef]
- Gao, X.; Zhang, W.; Zhao, B.; Zhang, J.; Wang, J.; Gao, Y. Product Authentication Technology Integrating Blockchain and Traceability Structure. Electronics 2022, 11, 3314. [Google Scholar] [CrossRef]
- Chen, Y.; Li, H.; Li, K.; Zhang, J. An improved P2P file system scheme based on IPFS and Blockchain. In Proceedings of the 2017 IEEE International Conference on Big Data (Big Data), Boston, MA, USA, 11–14 December 2017; pp. 2652–2657. [Google Scholar]
- Liang, W.; Tang, M.; Long, J.; Peng, X.; Xu, J.; Li, K.C. A Secure Fabric Blockchain-based Data Transmission Technique for Industrial Internet-of-Things. IEEE Trans. Ind. Inform. 2019, 15, 358–3592. [Google Scholar] [CrossRef]
- Steichen, M.; Fiz Pontiveros, B.; Norvill, R.; Shbair, W. Blockchain-Based, Decentralized Access Control for IPFS. In Proceedings of the 2018 IEEE International Conference on Blockchain (Blockchain-2018), Halifax, NS, Canada, 30 July–3 August 2018; pp. 1499–1506. [Google Scholar]
- Gaby, G.; Chandra, L.; Enderson, T. Towards Secure Interoperability between Heterogeneous Blockchains Using Smart Contracts. In Proceedings of the Future Technologies Conference (FTC), Vancouver, BC, Canada, 15–16 November 2017; pp. 73–81. [Google Scholar]
- Novo, O. Blockchain meets iot: An architecture for scalable access management in iot. IEEE Internet Things J. 2018, 5, 1184–1195. [Google Scholar] [CrossRef]
- Zhang, Y.; Kasahara, S.; Shen, Y.; Jiang, X.; Wan, J. Smart contract-based access control for the internet of things. IEEE Internet Things J. 2019, 6, 1594–1605. [Google Scholar] [CrossRef] [Green Version]
- Khan, N.; Aljoaey, H.; Tabassum, M.; Farzamnia, A.; Sharma, T.; Tung, Y.H. Proposed Model for Secured Data Storage in Decentralized Cloud by Blockchain Ethereum. Electronics 2022, 11, 3686. [Google Scholar] [CrossRef]
- Park, A.; Li, H. The Effect of Blockchain Technology on Supply Chain Sustainability Performances. Sustainability 2021, 13, 1726. [Google Scholar] [CrossRef]
- Kumar, A.; Abhishek, K.; Nerurkar, P.; Ghalib, M.R.; Shankar, A.; Cheng, X. Secure smart contracts for cloud-based manufacturing using Ethereum blockchain. Trans. Emerg. Telecommun. Technol. 2020, 33, e4129. [Google Scholar] [CrossRef]
- Taha, A.; Zakaria, A.; Kim, D.; Suri, N. Decentralized Runtime Monitoring Approach Relying on the Ethereum Blockchain Infrastructure. In Proceedings of the 2020 IEEE International Conference on Cloud Engineering (IC2E), Sydney, Australia, 21–24 April 2020; pp. 134–143. [Google Scholar]
- Awadallah, R.; Samsudin, A.; Teh, J.S.; Almazrooie, M. An Integrated Architecture for Maintaining Security in Cloud Computing Based on Blockchain. IEEE Access 2021, 9, 69513–69526. [Google Scholar] [CrossRef]
- Xu, D.; Yang, Q. The Systems Approach and Design Path of Electronic Bidding Systems Based on Blockchain Technology. Electronics 2022, 11, 3501. [Google Scholar] [CrossRef]
- Mahmood, Z.; Jusas, V. Blockchain-Enabled: Multi-Layered Security Federated Learning Platform for Preserving Data Privacy. Electronics 2022, 11, 1624. [Google Scholar] [CrossRef]
- Batool, A.; Byun, Y. Reduction of Online Fraudulent Activities in Freelancing Sites Using Blockchain and Biometric. Electronics 2022, 11, 789. [Google Scholar] [CrossRef]
- Oad, A.; Razaque, A.; Tolemyssov, A.; Alotaibi, M.; Alotaibi, B.; Zhao, C. Blockchain-Enabled Transaction Scanning Method for Money Laundering Detection. Electronics 2021, 10, 1766. [Google Scholar] [CrossRef]
- Srinivasu, P.N.; Bhoi, A.K.; Nayak, S.R.; Bhutta, M.R.; Woźniak, M. Blockchain Technology for Secured Healthcare Data Communication among the Non-Terminal Nodes in IoT Architecture in 5G Network. Electronics 2021, 10, 1437. [Google Scholar] [CrossRef]
- Buccafurri, F.; De Angelis, V.; Lazzaro, S. A Blockchain-Based Framework to Enhance Anonymous Services with Accountability Guarantees. Future Internet 2022, 14, 243. [Google Scholar] [CrossRef]
- Liang, X.; Shetty, S.; Tosh, D.K.; Kamhoua, C.A.; Kwiat, K.A.; Njilla, L. ProvChain: A Blockchain-Based Data Provenance Architecture in Cloud Environment with Enhanced Privacy and Availability. In Proceedings of the 2017 17th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGRID), Madrid, Spain, 14–17 May 2017; pp. 468–477. [Google Scholar]
- Hong, H.; Sun, Z. A secure peer to peer multiparty transaction scheme based on blockchain. Peer-to-Peer Netw. Appl. 2021, 14, 1106–1117. [Google Scholar] [CrossRef]
- Hong, H.; Sun, Z. A flexible attribute-based data access management scheme for sensor-cloud system. J. Syst. Archit. 2021, 119, 102234. [Google Scholar] [CrossRef]
- Suratkar, S.; Shirole, M.; Bhirud, S. Cryptocurrency Wallet: A Review. In Proceedings of the 2020 4th International Conference on Computer, Communication and Signal Processing (ICCCSP), Chennai, India, 22–23 April 2020; pp. 1–7. [Google Scholar] [CrossRef]
- Thapliyal, H. Internet of Things-Based Consumer Electronics: Reviewing Existing Consumer Electronic Devices, Systems, and Platforms and Exploring New Research Paradigms. IEEE Consum. Electron. Mag. 2018, 7, 66–67. [Google Scholar] [CrossRef]
- Caldarola, F.; d’Atri, G.; Zanardo, E. Neural Fairness Blockchain Protocol Using an Elliptic Curves Lottery. Mathematics 2022, 10, 3040. [Google Scholar] [CrossRef]
- Hamledari, H.; Fischer, M. Role of blockchain-enabled smart contracts in automating construction progress payments. J. Leg. Aff. Disput. Resolut. Eng. Constr. 2021, 13, 04520038. [Google Scholar] [CrossRef]
- Deny, J.; Narasimha, A.; Reddy, R.V.; Sathish, S. Electricity Monitoring and Auto Bill Generation Using IOT. In Proceedings of the 2021 3rd International Conference on Signal Processing and Communication (ICPSC), Coimbatore, India, 13–14 May 2021; pp. 695–698. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
John William, A.D.; Rajendran, S.; Pranam, P.; Berry, Y.; Sreedharan, A.; Gul, J.; Paul, A. Blockchain Technologies: Smart Contracts for Consumer Electronics Data Sharing and Secure Payment. Electronics 2023, 12, 208. https://doi.org/10.3390/electronics12010208
John William AD, Rajendran S, Pranam P, Berry Y, Sreedharan A, Gul J, Paul A. Blockchain Technologies: Smart Contracts for Consumer Electronics Data Sharing and Secure Payment. Electronics. 2023; 12(1):208. https://doi.org/10.3390/electronics12010208
Chicago/Turabian StyleJohn William, Alfred Daniel, Santhosh Rajendran, Pradish Pranam, Yosuva Berry, Anuj Sreedharan, Junaid Gul, and Anand Paul. 2023. "Blockchain Technologies: Smart Contracts for Consumer Electronics Data Sharing and Secure Payment" Electronics 12, no. 1: 208. https://doi.org/10.3390/electronics12010208
APA StyleJohn William, A. D., Rajendran, S., Pranam, P., Berry, Y., Sreedharan, A., Gul, J., & Paul, A. (2023). Blockchain Technologies: Smart Contracts for Consumer Electronics Data Sharing and Secure Payment. Electronics, 12(1), 208. https://doi.org/10.3390/electronics12010208