RESUMEN
The rise of Electric Vehicles (EVs) has introduced significant advancement and evolution in the electricity market. In smart transportation, the EVs have earned more popularity because of its numerous benefits including lower carbon footprints, higher performance, and sophisticated energy trading mechanisms. These potential benefits have resulted in widespread EV adoption across the world. Despite its benefits, energy management remains the biggest challenge in EVs and it is mainly because of the lack of Charging Stations (CSs) near EVs. This creates a demand for an effective, secure and reliable energy management framework for EVs. This study presents a secure data and energy trade paradigm based on Blockchain (BC) in the Internet of EVs (IoEV). BC technology prepares for the high volume of EV integration that serves as the foundation for the next generation, and to assist in developing unique privacy-protected BC-based D-Trading and storage Models. Entities evaluated for the proposed model include Trusted Authority (TA), Vehicles, Smart Meters, Roadside Units (RSU), BC, and Inter-Planetary File System (IPFS). In addition, E-trading involves several phases, including the acquiring E-trading demand requests, E-trading response requests, request matching and token assignment. Moreover, account mapping is performed using a Mayfly Pelican Optimization Algorithm (MPOA), which is created by merging the Mayfly Algorithm (MA) and Pelican Optimization Algorithm (POA). Various security features are used to protect data and energy trade in IoEV, including encryption, hashing, polynomials, and others. The testing results revealed that the MPOA outperformed the state-of-the-art results regarding memory consumption, trading rate, transaction cost, and trading energy volume with values of 4.605 MB, 91%, 0.654, and 90 kW, respectively.