{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,26]],"date-time":"2026-03-26T11:43:03Z","timestamp":1774525383579,"version":"3.50.1"},"reference-count":55,"publisher":"MDPI AG","issue":"19","license":[{"start":{"date-parts":[[2022,9,25]],"date-time":"2022-09-25T00:00:00Z","timestamp":1664064000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"EIAS Data Science and Blockchain Lab, College of Computer and Information Sciences, Prince Sultan University, Riyadh Saudi Arabia"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>In this paper, a secure energy trading mechanism based on blockchain technology is proposed. The proposed model deals with energy trading problems such as insecure energy trading and inefficient charging mechanisms for electric vehicles (EVs) in a vehicular energy network (VEN). EVs face two major problems: finding an optimal charging station and calculating the exact amount of energy required to reach the selected charging station. Moreover, in traditional trading approaches, centralized parties are involved in energy trading, which leads to various issues such as increased computational cost, increased computational delay, data tempering and a single point of failure. Furthermore, EVs face various energy challenges, such as imbalanced load supply and fluctuations in voltage level. Therefore, a demand-response (DR) pricing strategy enables EV users to flatten load curves and efficiently adjust electricity usage. In this work, communication between EVs and aggregators is efficiently performed through blockchain. Moreover, a branching concept is involved in the proposed system, which divides EV data into two different branches: a Fraud Chain (F-chain) and an Integrity Chain (I-chain). The proposed branching mechanism helps solve the storage problem and reduces computational time. Moreover, an attacker model is designed to check the robustness of the proposed system against double-spending and replay attacks. Security analysis of the proposed smart contract is also given in this paper. Simulation results show that the proposed work efficiently reduces the charging cost and time in a VEN.<\/jats:p>","DOI":"10.3390\/s22197263","type":"journal-article","created":{"date-parts":[[2022,9,26]],"date-time":"2022-09-26T03:34:17Z","timestamp":1664163257000},"page":"7263","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":26,"title":["An Efficient and Secure Energy Trading Approach with Machine Learning Technique and Consortium Blockchain"],"prefix":"10.3390","volume":"22","author":[{"given":"Tehreem","family":"Ashfaq","sequence":"first","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6643-6558","authenticated-orcid":false,"given":"Muhammad Irfan","family":"Khalid","sequence":"additional","affiliation":[{"name":"Department of Information and Electrical Engineering and Applied Mathematics, University of Salerno, 84084 Fisciano, SA, Italy"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9691-7347","authenticated-orcid":false,"given":"Gauhar","family":"Ali","sequence":"additional","affiliation":[{"name":"EIAS Data Science and Blockchain Lab, College of Computer and Information Sciences, Prince Sultan University, Riyadh 11586, Saudi Arabia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9349-1985","authenticated-orcid":false,"given":"Mohammad El","family":"Affendi","sequence":"additional","affiliation":[{"name":"EIAS Data Science and Blockchain Lab, College of Computer and Information Sciences, Prince Sultan University, Riyadh 11586, Saudi Arabia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Jawaid","family":"Iqbal","sequence":"additional","affiliation":[{"name":"Department of Computer Science, Capital University of Science and Technology, Islamabad 44000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1523-1330","authenticated-orcid":false,"given":"Saddam","family":"Hussain","sequence":"additional","affiliation":[{"name":"School of Digital Science, Universiti Brunei Darussalam, Jalan Tungku Link, Gadong BE1410, Brunei"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5406-0389","authenticated-orcid":false,"given":"Syed Sajid","family":"Ullah","sequence":"additional","affiliation":[{"name":"Department of Electrical and Computer Engineering, Villanova University, Villanova, PA 19085, USA"},{"name":"Department of Information and Communication Technology, University of Agder (UiA), N-4898 Grimstad, Norway"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Adamu Sani","family":"Yahaya","sequence":"additional","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Rabiya","family":"Khalid","sequence":"additional","affiliation":[{"name":"Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8607-7783","authenticated-orcid":false,"given":"Abdul","family":"Mateen","sequence":"additional","affiliation":[{"name":"Department of Computer Science, University of Sialkot, Sialkot 51040, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2022,9,25]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"129","DOI":"10.1016\/j.techfore.2018.10.029","article-title":"Municipalities\u2019 understanding of the Smart City concept: An exploratory analysis in Belgium","volume":"142","author":"Desdemoustier","year":"2019","journal-title":"Technol. Forecast. Soc. Chang."},{"key":"ref_2","unstructured":"Allied Market Research (2020, March 21). Autonomous Vehicle Market by Level of Automation. Available online: https:\/\/www.alliedmarketresearch.com\/autonomous-vehicle-market."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"96","DOI":"10.1016\/j.erss.2018.10.001","article-title":"Fear and loathing of electric vehicles: The reactionary rhetoric of range anxiety","volume":"48","author":"Noel","year":"2019","journal-title":"Energy Res. Soc. Sci."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"71","DOI":"10.1007\/s00450-017-0348-5","article-title":"Privacy-preserving blockchain-based electric vehicle charging with dynamic tariff decisions","volume":"33","author":"Knirsch","year":"2018","journal-title":"Comput.-Sci.-Res. Dev."},{"key":"ref_5","unstructured":"Nakamoto, S. (2020, March 21). Bitcoin: A Peer-to-Peer Electronic Cash System. Available online: https:\/\/bitcoin.org\/bitcoin.pdf."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Yahaya, A.S., Javaid, N., Alzahrani, F.A., Rehman, A., Ullah, I., Shahid, A., and Shafiq, M. (2020). Blockchain based sustainable local energy trading considering home energy management and demurrage mechanism. Sustainability, 12.","DOI":"10.3390\/su12083385"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"5799","DOI":"10.1109\/TVT.2020.2967052","article-title":"A blockchain-based framework for lightweight data sharing and energy trading in V2G network","volume":"69","author":"Hassija","year":"2020","journal-title":"IEEE Trans. Veh. Technol."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"1495","DOI":"10.1109\/JIOT.2018.2836144","article-title":"Blockchain-based decentralized trust management in vehicular networks","volume":"6","author":"Yang","year":"2018","journal-title":"IEEE Internet Things J."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"205","DOI":"10.1109\/TETCI.2018.2880693","article-title":"Blockchain and computational intelligence inspired incentive-compatible demand response in internet of electric vehicles","volume":"3","author":"Zhou","year":"2019","journal-title":"IEEE Trans. Emerg. Top. Comput. Intell."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Pop, C., Cioara, T., Antal, M., Anghel, I., Salomie, I., and Bertoncini, M. (2018). Blockchain based decentralized management of demand response programs in smart energy grids. Sensors, 18.","DOI":"10.3390\/s18010162"},{"key":"ref_11","doi-asserted-by":"crossref","unstructured":"Ashfaq, T., Javaid, N., Javed, M.U., Imran, M., Haider, N., and Nasser, N. (2020, January 15\u201319). Secure Energy Trading for Electric Vehicles using Consortium Blockchain and k-Nearest Neighbor. Proceedings of the 2020 International Wireless Communications and Mobile Computing (IWCMC), Limassol, Cyprus.","DOI":"10.1109\/IWCMC48107.2020.9148494"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"79","DOI":"10.1109\/TII.2015.2494884","article-title":"Balancing power demand through EV mobility in vehicle-to-grid mobile energy networks","volume":"12","author":"Yu","year":"2016","journal-title":"IEEE Trans. Ind. Inf."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"3620","DOI":"10.1109\/TII.2019.2908497","article-title":"BSIS: Blockchain-based secure incentive scheme for energy delivery in vehicular energy network","volume":"15","author":"Wang","year":"2019","journal-title":"IEEE Trans. Ind. Inform."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"122","DOI":"10.1109\/MCOM.2017.1600267CM","article-title":"Security and privacy in smart city applications: Challenges and solutions","volume":"55","author":"Zhang","year":"2017","journal-title":"IEEE Commun. Mag."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"102238","DOI":"10.1016\/j.scs.2020.102238","article-title":"Different charging infrastructures along with smart charging strategies for electric vehicles","volume":"60","author":"Sachan","year":"2020","journal-title":"Sustain. Cities Soc."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"160546","DOI":"10.1109\/ACCESS.2019.2951057","article-title":"Electric vehicle power trading mechanism based on blockchain and smart contract in V2G network","volume":"7","author":"Liu","year":"2019","journal-title":"IEEE Access"},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"207","DOI":"10.1007\/s00450-017-0360-9","article-title":"A blockchain-based smart grid: Towards sustainable local energy markets","volume":"33","author":"Mengelkamp","year":"2018","journal-title":"Comput.-Sci.-Res. Dev."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"2873","DOI":"10.1109\/TSG.2016.2622743","article-title":"A contract game for direct energy trading in smart grid","volume":"9","author":"Zhang","year":"2016","journal-title":"IEEE Trans. Smart Grid"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"9110","DOI":"10.1109\/TVT.2019.2927533","article-title":"A Secure and Efficient Blockchain-Based Data Trading Approach for Internet of Vehicles","volume":"68","author":"Chen","year":"2019","journal-title":"IEEE Trans. Veh. Technol."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"3154","DOI":"10.1109\/TII.2017.2709784","article-title":"Enabling localized peer-to-peer electricity trading among plug-in hybrid electric vehicles using consortium blockchains","volume":"13","author":"Kang","year":"2017","journal-title":"IEEE Trans. Ind. Inform."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"25657","DOI":"10.1109\/ACCESS.2018.2835309","article-title":"Adaptive blockchain-based electric vehicle participation scheme in smart grid platform","volume":"6","author":"Liu","year":"2018","journal-title":"IEEE Access"},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"44","DOI":"10.15575\/join.v3i1.207","article-title":"Security Analysis on the Decentralized Energy Trading System Using Blockchain Technology","volume":"3","author":"Rahmadika","year":"2018","journal-title":"J. Online Inform."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"7000","DOI":"10.1109\/ACCESS.2020.3048169","article-title":"Blockchain based Data and Energy Trading in Internet of Electric Vehicles","volume":"9","author":"Sadiq","year":"2020","journal-title":"IEEE Access"},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"13565","DOI":"10.1109\/ACCESS.2018.2812176","article-title":"LNSC: A security model for electric vehicle and charging pile management based on blockchain ecosystem","volume":"6","author":"Huang","year":"2018","journal-title":"IEEE Access"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"3859629","DOI":"10.1155\/2022\/3859629","article-title":"Blockchain-Based Land Registration System: A Conceptual Framework","volume":"2022","author":"Khalid","year":"2022","journal-title":"Appl. Bionics Biomech."},{"key":"ref_26","unstructured":"Kazmi, H.S.Z., Javaid, N., and Imran, M. (2019). Towards Energy Efficiency and Trustfulness in Complex Networks Using Data Science Techniques and Blockchain. [Ph.D. Thesis, COMSATS University Islamabad (CUI)]."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Mohan, P., Subramani, N., Alotaibi, Y., Alghamdi, S., Khalaf, O.I., and Ulaganathan, S. (2022). Improved metaheuristics-based clustering with multihop routing protocol for underwater wireless sensor networks. Sensors, 22.","DOI":"10.3390\/s22041618"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"219","DOI":"10.1016\/j.comnet.2018.08.016","article-title":"Branch based blockchain technology in intelligent vehicle","volume":"145","author":"Singh","year":"2018","journal-title":"Comput. Netw."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Ali, J., and Roh, B.H. (2022). A Novel Scheme for Controller Selection in Software-Defined Internet-of-Things (SD-IoT). Sensors, 22.","DOI":"10.3390\/s22093591"},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Abubaker, Z., Gurmani, M.U., Sultana, T., Rizwan, S., Azeem, M., Iftikhar, M.Z., and Javaid, N. (2019, January 7\u20139). Decentralized Mechanism for Hiring the Smart Autonomous Vehicles Using Blockchain. Proceedings of the International Conference on Broadband and Wireless Computing, Communication and Applications, Antwerp, Belgium.","DOI":"10.1007\/978-3-030-33506-9_67"},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"1550147719870653","DOI":"10.1177\/1550147719870653","article-title":"Intelligent design and implementation of blockchain and Internet of things\u2013based traffic system","volume":"15","author":"Ren","year":"2019","journal-title":"Int. J. Distrib. Sens. Netw."},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"1113","DOI":"10.1016\/j.energy.2018.12.185","article-title":"A multi-objective risk-based robust optimization approach to energy management in smart residential buildings under combined demand and supply uncertainty","volume":"170","author":"Khan","year":"2019","journal-title":"Energy"},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Javed, M.U., Rehman, M., Javaid, N., Aldegheishem, A., Alrajeh, N., and Tahir, M. (2020). Blockchain-Based Secure Data Storage for Distributed Vehicular Networks. Appl. Sci., 10.","DOI":"10.3390\/app10062011"},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"582","DOI":"10.1016\/j.apenergy.2018.06.025","article-title":"Real-time renewable energy incentive system for electric vehicles using prioritization and cryptocurrency","volume":"226","author":"Zhang","year":"2018","journal-title":"Appl. Energy"},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"6552","DOI":"10.1109\/TSG.2019.2907262","article-title":"Electric vehicle charging station placement method for urban areas","volume":"10","author":"Cui","year":"2019","journal-title":"IEEE Trans. Smart Grid"},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"3386","DOI":"10.1109\/TITS.2018.2876287","article-title":"Optimal charging scheduling by pricing for EV charging station with dual charging modes","volume":"20","author":"Zhang","year":"2018","journal-title":"IEEE Trans. Intell. Transp. Syst."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"288","DOI":"10.1016\/j.cose.2019.05.006","article-title":"BEST: Blockchain-based secure energy trading in SDN-enabled intelligent transportation system","volume":"85","author":"Chaudhary","year":"2019","journal-title":"Comput. Secur."},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"47047","DOI":"10.1109\/ACCESS.2020.2979051","article-title":"A blockchain-based load balancing in decentralized hybrid P2P energy trading market in smart grid","volume":"8","author":"Khalid","year":"2020","journal-title":"IEEE Access"},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"161377","DOI":"10.1109\/ACCESS.2020.3021613","article-title":"Towards real-time energy management of multi-microgrid using a deep convolution neural network and cooperative game approach","volume":"8","author":"Samuel","year":"2020","journal-title":"IEEE Access"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"4640","DOI":"10.1109\/JIOT.2018.2874398","article-title":"Blockchainbased internet of vehicles: Distributed network architecture and performance analysis","volume":"6","author":"Jiang","year":"2018","journal-title":"IEEE Internet Things J."},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"4601","DOI":"10.1109\/JIOT.2018.2869297","article-title":"A secure charging scheme for electric vehicles with smart communities in energy blockchain","volume":"6","author":"Su","year":"2018","journal-title":"IEEE Internet Things J."},{"key":"ref_42","first-page":"3690","article-title":"Consortium blockchain for secure energy trading in industrial internet of things","volume":"14","author":"Li","year":"2017","journal-title":"IEEE Trans. Ind. Inform."},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"102464","DOI":"10.1016\/j.ipm.2020.102464","article-title":"A blockchain based incentive provisioning scheme for traffic event validation and information storage in VANETs","volume":"58","author":"Khalid","year":"2021","journal-title":"Inf. Process. Manag."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"11248","DOI":"10.1109\/TVT.2019.2940148","article-title":"Toward Blockchain-Based Fair and Anonymous Ad Dissemination in Vehicular Networks","volume":"68","author":"Li","year":"2019","journal-title":"IEEE Trans. Veh. Technol."},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"43","DOI":"10.1109\/TSMC.2019.2896323","article-title":"Secure and efficient vehicle-to-grid energy trading in cyber physical systems: Integration of blockchain and edge computing","volume":"50","author":"Zhou","year":"2019","journal-title":"IEEE Trans. Syst. Man Cybern. Syst."},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"2627","DOI":"10.1109\/TSG.2019.2958971","article-title":"An Iterative Two-Layer Optimization Charging and Discharging Trading Scheme for Electric Vehicle Using Consortium Blockchain","volume":"11","author":"Li","year":"2019","journal-title":"IEEE Trans. Smart Grid"},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Javed, M.U., Javaid, N., Aldegheishem, A., Alrajeh, N., Tahir, M., and Ramzan, M. (2020). Scheduling Charging of Electric Vehicles in a Secured Manner by Emphasizing Cost Minimization Using Blockchain Technology and IPFS. Sustainability, 12.","DOI":"10.3390\/su12125151"},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"36","DOI":"10.1016\/j.comnet.2019.02.002","article-title":"SURVIVOR: A blockchain based edge-as-a-service framework for secure energy trading in SDN-enabled vehicle-to-grid environment","volume":"153","author":"Jindal","year":"2019","journal-title":"Comput. Netw."},{"key":"ref_49","doi-asserted-by":"crossref","first-page":"3548","DOI":"10.1109\/TII.2019.2893433","article-title":"Privacy-preserving energy trading using consortium blockchain in smart grid","volume":"15","author":"Gai","year":"2019","journal-title":"IEEE Trans. Ind. Inform."},{"key":"ref_50","unstructured":"(2020, September 15). Gas\/Ether Prices. Available online: https:\/\/currencio.co\/gas\/eth\/."},{"key":"ref_51","first-page":"2-1","article-title":"Ethereum White Paper: A Next Generation Smart Contract Decentralized Application Platform, First Version","volume":"3","author":"Buterin","year":"2014","journal-title":"White Pap."},{"key":"ref_52","doi-asserted-by":"crossref","unstructured":"Luu, L., Chu, D.H., Olickel, H., Saxena, P., and Hobor, A. (2016, January 24\u201328). Making smart contracts smarter. Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria.","DOI":"10.1145\/2976749.2978309"},{"key":"ref_53","doi-asserted-by":"crossref","first-page":"3849","DOI":"10.1007\/s13369-018-03715-4","article-title":"Blockchain-based framework for protecting author royalty of digital assets","volume":"44","author":"Nizamuddin","year":"2019","journal-title":"Arab. J. Sci. Eng."},{"key":"ref_54","unstructured":"(2020, April 13). How To Use Oyente, A Smart Contract Security Analyzer - Solidity Tutorial. Available online: https:\/\/medium.com\/haloblock\/how-to-use-oyente-a-smart-contract-security-analyzer-solidity-tutorial-86671be93c4b."},{"key":"ref_55","doi-asserted-by":"crossref","first-page":"79","DOI":"10.1016\/j.entcs.2016.12.006","article-title":"Double-spend attack models with time advantange for bitcoin","volume":"329","author":"Rocha","year":"2016","journal-title":"Electron. Notes Theor. Comput. Sci."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/19\/7263\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T00:39:09Z","timestamp":1760143149000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/19\/7263"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,9,25]]},"references-count":55,"journal-issue":{"issue":"19","published-online":{"date-parts":[[2022,10]]}},"alternative-id":["s22197263"],"URL":"https:\/\/doi.org\/10.3390\/s22197263","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,9,25]]}}}