Blockchain for Electric Vehicles Energy Trading: Requirements, Opportunities, and Challenges

Today’s technologies, techniques, and systems leveraged for managing energy trading operations in electric vehicles fall short in providing operational transparency, immutability, fault tolerance, traceability, and trusted data provenance features. They are centralized and vulnerable to the single point of failure problem, and less trustworthy as they are prone to the data modifications and deletion by adversaries. In this paper, we present the potential advantages of blockchain technology to manage energy trading operations between electric vehicles as it can offer data traceability, immutability, transparency, audit, security, and confidentiality in a fully decentralized manner. We identify and discuss the essential requirements for the successful implementation of blockchain technology to secure energy trading operations among electric vehicles. We present a detailed discussion on the potential opportunities offered by blockchain technology to secure the energy trading operations of electric vehicles. We discuss several blockchain-based research projects and case studies to highlight the practicability of blockchain technology in electric vehicles energy trading. Finally, we identify and discuss open challenges in fulfilling the requirements of electric vehicles energy trading applications.


I. INTRODUCTION
In the recent years, the world has been exposed to air pollution upto an unsafe level declared by the World Health Organization (WHO). It is estimated that the transport industry accounts for up to 28% of the total carbon dioxide (CO2) emissions in the atmosphere. Road traffic is deemed as the largest carbon dioxide producer. It is responsible for up to 70% of the CO2 emissions in the transport sector [1], [2]. Leveraging plug-in electric vehicles for general transport services could be helpful in creating a low-carbon and zero-emission transport system. Several European Union (EU) countries have launched projects to cater the issues of global warming by deploying hybrid or electric vehicles at a massive scale. However, large-scale deployment of electric vehicles can overload the existing power grid stations, which will result in an increased demand of efficient vehiclegrid integration and energy trading policies [3]- [6]. Existing energy trading solutions have leveraged Information Communication Technologies (ICT) to efficiently handle energy trading operations between electric vehicles. The ICT-based energy trading services estimate the surplus or excess energy of an electric vehicle's battery and sell the surplus energy back to the grid station or electric vehicle. However, the majority of ICT-based systems are centralized, highly disintegrated, insecure, non-transparent, and less trustworthy [7]- [10]. Blockchain is a decentralized technology that presents a transaction ledger in which transactions are secured using cryptographic hashing algorithms. It has the potential to path between source and destination energy charging stations, (e) sell the surplus energy to consumers or grid stations, and (f) estimate the price for energy during off-peak hours in a particular region [12], [13]. Power grid stations offer battery swapping and battery charging services to electric vehicles. Therefore, the complete information about the vehicles along with their trading preferences should be publicly available to assist the drivers to identify the trusted and reliable battery charging and swapping stations [14]. The Internet-of-Things (IoT) technology offers ubiquitous perception abilities for real-time interaction between the vehicles using sensors or radio frequency nodes [15]. The majority of the IoT-based systems have followed centralized cloud-based resources to store and process electric vehicle's energy trading-related data. However, centralized data storage and processing limit the collaboration opportunities to the energy trading vehicles. The centralized systems are highly disintegrated and do not ensure data consistency and transparency. The records stored on a centralized system are vulnerable to modifications, deletions, and fraud by adversaries. The decentralized blockchain technology has tremendous potential to handle such issues by enabling electric vehicles to perform energy trading operations in an easy, effective, and reliable way.
Blockchain is an open distributed ledger that stores electric vehicle's energy trading-related data and transactions in chronological order [7]. Blockchain follows a decentralized architecture and eliminates the need for a central command authority to settle business disputes among energy trading participants such as vehicles, energy charging stations, and power grid stations. It follows Peer-to-Peer (P2P) technology to allow owners of electric vehicles to communicate directly to perform business operations [7], [8]. The transactions and data stored on the blockchain are immutable, and adversarial and dishonest drivers in the electric vehicle network cannot modify, delete, or update the existing blockchain records. Moreover, since the blockchain data and transactions are publicly viewable to everyone, hence greater transparency is offered by the blockchain to the participants of the energy trading network [9]. The business transactions between participants are verified and validated by the miners using a distributed consensus protocol before storing data and transactions to the blockchain. The consensus process makes the blockchain technology highly fault-tolerant, and it assures that the miners agreed on the current state of the ledger. Examples of common consensus algorithms implemented by several well-known blockchain platforms include Practical Byzantine Fault Tolerance (PBFT) [16], Proof-of-Stake (PoS) [17], [18], and Proof-of-Work (PoW) [19], [20]. PBFT is a fault-tolerant protocol that assures blockchain safety despite the presence of some malicious miners as long as a minimum number of connected miners behave honestly. In the PoW algorithm, the miners solve a puzzle satisfactorily for block creation and rewards claiming. The PoS presents an alternative to the PoW algorithm. The PoS algorithm gives more mining rights to nodes that deposit more stake in the system to minimize mining-related fraud in the PoW algorithm.
Blockchain technology has shown immense potential in transforming and enhancing the transportation industry by securing and auditing P2P-based transactions of electric vehicles. P2P energy trading frameworks enable the energy traders to sell their excess or surplus energy to consumers on terms and conditions that suit both [9]. Due to the tremendous benefits of distributed technologies, blockchain-assisted energy trading has evolved from a theoretical topic to many practical implementations. In Brooklyn, a blockchain-based energy grid is working since 2016, and it enables traders to sell and buy energy conveniently [10]. Similarly, France has recently launched a Hyperledger Fabric-based research project called Sunchain for energy trading between solar prosumers. Sunchain represents a blockchain simulated virtual network that enables solar consumers to trade energy in realtime [21]. The developed Sunchain project has reduced the energy transaction cost of conventional energy trading systems. A project recently launched in Australia, called Energy Register, represents a trustless, transparent, and interoperable energy exchange platform which is capable of transferring energy tokens to the account of energy sellers in real-time [22]. SolarCoin [23] rewards the prosumers with cryptocurrency tokens for selling their surplus energy. The research works presented in [10], [21]- [23] have highlighted the practicability of blockchain in electric vehicles energy trading. To the best of our knowledge, none of the existing studies have thoroughly surveyed the role of blockchain technology in electric vehicles' energy trading. This study thoroughly investigates the benefits, requirements, challenges, and barriers in implementing blockchain technology for energy trading between electric vehicles. The main contributions of this research work include: • We explore the potential opportunities brought about by blockchain technology in terms of energy trading in electric vehicles by improving operational transparency, traceability, security, and accountability in energy trading operations. • We identify and discuss the main requirements for blockchain platforms that hinder the successful implementation of blockchain technology in electric vehicles energy trading. • We report and provide insightful discussions on several existing blockchain-based research projects to demonstrate the practicality of blockchain technology in electric vehicles energy trading. • We present important blockchain-based systems for various energy trading use cases to identify the system components, participants, role definition, and information flow among the users. • We present technological and organizational challenges along with their key causes in fulfilling the requirements of blockchain technology in electric vehicles energy trading.
The remainder of the paper is structured as follows.
Section II discusses the main requirements of blockchain technology in electric vehicles energy trading. Section III explores the opportunities of blockchain in electric vehicles energy trading. Section IV reviews recently reported blockchain-based research projects and case studies for electric vehicles energy trading. Section V identifies and discusses several open research challenges in electric vehicles energy trading. Section VI provides concluding remarks and future recommendations.

II. REQUIREMENTS FOR BLOCKCHAIN TECHNOLOGY
Blockchain technology has the potential to handle the challenges that the traditional centralized-based energy trading systems, techniques, and approaches are currently facing [24]. The distinguishing features of blockchain technology can help energy trading organizations to promote trust, transparency, traceability, and security by safeguarding data against external attacks and eliminating the need for a middleman. This section highlights several essential requirements and benefits of employing blockchain technology in electric vehicles energy trading.

A. DATA ACCURACY
The stakeholders in the rapidly evolving electric vehicle ecosystem (e.g., electric vehicles, fuel vehicles, electric charging stations, energy providers, and electric grid stations) employ incompetent communication and computing platforms for storing and processing energy trading-related data [25]. Many energy trading applications rely on data related to the available electric charge capacity of the vehicle to decide whether the selected energy charging station is appropriate and reliable for energy trading or not. Moreover, using location-based data, a reputed and registered energy charging station can be selected for energy recharging purposes. The stakeholders of electric vehicle's energy trading applications require that energy trading-related data should be highly accurate, visible, and trusted in order to ensure safe, reliable, and trustworthy operations of participants during electric vehicle energy trading. The data immutability and transparency features of emerging blockchain technology improve the visibility of the data and transactions [14]. Employing blockchain for energy trading in electric vehicles can empower energy traders to access and verify the complete historical data about energy trading transactions for each trader. In contrast to blockchain technology, centralized-based data storage and processing can face several cyber attacks and often result in inaccurate data [26]. Therefore, high data integrity, resilience against Denial of Service Attacks (DoS), and privacy-preserving through encryption techniques are the primary requirements of prosumers that can be fulfilled by the blockchain technology [27].

B. FAST PROCESSING OF TRANSACTIONS
The research projects started by the automobile industry for greening the cities are aimed at using electric vehicles as a mean of transportation as they are environment friendly and emits less carbon in the air compared to traditional fuel-based transportation systems. In the last two years, the highly dense cities have started considering deploying thousands of energy charging stations in the cities to fulfill the energy demands of the existing electric vehicles. Electric vehicles are increasing every day due to their high economic benefits. There exist many use case scenarios wherein a blockchain is required to process several hundred thousand transactions every second (e.g., sensor-based data collection, storage, and processing). Furthermore, such use case scenarios can not tolerate the high latency during the execution of energy trading-related transactions. For instance, in voting-based energy auctioning protocol [28], the electric vehicle requires fast and real-time processing of transactions. The major delays in the processing of energy trading transactions occur due to the distributed nature of blockchain technology and the complexity of the employed consensus algorithms (e.g., loading and verifying blocks). Therefore, efficient and convenient systems are required that should be capable enough executing transactions in a fast, cheap, and secure manner to meet the requirements of energy trading applications. In addition to fast data processing, electric vehicle energy trading also requires that the developers of smart contracts should gain sufficient handson experience in writing bug-free smart contracts. The bugs in the smart contracts can change the functionality of smart contracts for harmful purposes [28], [29] and significantly degrade the system throughput.

C. PRIVACY PROTECTION
Data privacy assurance is one of the indispensable requirements of electric vehicle communication networks because any breach of data privacy can cause information or identity theft. Therefore, it results in a loss of user's trust in the system and degrades the reputation of the energy providers due to identity theft. The centralized data storage makes the system exploitable by intruders as it can enable the system participants to access the credentials of the energy trading parties [30]. Blockchain is considered a suitable technology for energy trading in electric vehicles as the relevant data is always available without any threat of data hacking, alteration, and security breach. It enables users to retaliate against the data-diddling attack that targets the integrity and privacy of the user's records. Blockchain is an immutable technology secured by cryptographically hashed values of data, and it has the potential to avoid attacks targeting data integrity and privacy [30], [31]. Since blockchain technology uses cryptographic public keys to identify users, hence it presents an anonymous identity of the users to the other participating users for security purposes. Considering the privacy requirements of electric vehicle energy trading applications, a network of proxy re-encryption [32] or trusted blockchain Oracles [33] should be integrated into the existing blockchain-based systems to preserve the user's data privacy. VOLUME 4, 2016

D. SECURE DATA SHARING
The participants of the electric vehicle energy trading framework require fully secure and reliable energy-trading-related data sharing and processing. The centralized-based systems employed for managing energy-trading data often result in device spoofing, data manipulation, and false user authentication. The participants in the electric vehicle energy ecosystem also require fulfillment of data nondisclosure and confidentiality agreement and standard format usage during data sharing among energy consumers and prosumers. Blockchain technology presents a public and distributed system that can efficiently and conveniently store, manage, share, and update energy trading-related data and transactions on the ledger [34], [35]. The ledger is distributed among the miners who continuously monitor and verify the data updates to guarantee data integrity. In centralized-based systems, the designated entities are responsible for sharing the energytrading data or documents among the participating entities. The centralized data storage and processing increase the transaction execution time. As a result, the data cannot be timely processed and shared with the users to fulfill their fast and secure data sharing requirement. In a blockchainbased system, smart contracts have made it easier to execute transactions with specific agreements. Unlike current technologies used for energy trading, blockchain follows distributed architecture which makes it more efficient for storing, updating, and sharing data and transactions than the traditional technologies.

E. LEGALIZATION OF BLOCKCHAIN TECHNOLOGY
Many of the blockchain platforms (e.g., Bitcoin) do not provide a means to verify the identity of participants involved in electric vehicle energy trading as there is no central body available that can verify the identity of participants. The traditional centralized-based systems are highly capable of identifying suspicious transaction patterns or users through third-party software. But, such software involves indispensable memory organization processes that are extremely slow and utilizes immense computational power. In a blockchainbased solution, cryptocurrencies can be accessed and transferred online across borders for any illegal activities. According to Financial Action Task Force (FATF) recognition, any virtual currency that can be converted back and forth in exchange for physical currency can support money laundering or financing terrorist activities [29]. Usually, financial institutions such as the state bank of a country develop monetary policies to control and regulate the flow of money in the market. But, in the case of cryptocurrency, the unavailability of a regulatory framework can be a source of financial loss to a country due to the un-monitored and uncontrollable cross-border flow of money [28]. Therefore, like many other industries, the participants of the electric vehicle energy trading framework require that the regularity frameworks for cryptocurrencies should be developed for the safe and lawful implementation of blockchain by the electric vehicles energy trading.

F. CROSS-PLATFORM COMMUNICATION SUPPORT
The participants of energy trading systems for electric vehicles can use heterogeneous blockchain-based platforms for decentralized storage, real-time sharing, and distributed processing of data. The underlying heterogeneous blockchain systems should conveniently translate and execute the energy trading transactions which follow different data formats because of the architectural differences of deployed blockchain platforms. The existing centralized-based solutions for crossplatform communication are complex and slow due to the time-consuming and compute-intensive instruction translation processes. Hence, the blockchain platforms should have full support to successfully exchange and process data in a convenient, seamless, efficient, and fast manner among blockchain-based systems that are developed and deployed by the different companies [36], [37]. There could be many applications and use case scenarios in which the energy prosumers and consumers communicate for energy price negotiation and transaction payment. Such systems have implemented standardized codes for communication. As most of the centralized applications are task-specific in energy sharing, hence blockchain technology is the best choice in this case as it has standardized data code to follow [38].

G. STORAGE
The plug-in electric vehicles on the roads worldwide are increasing every day. Therefore, the size and frequency of data generated by such electric vehicles increases. Existing electric vehicles can generate several hundred gigabytes of data every second; thus expanding the ledger significantly. The growth rate of the ledger can be influenced directly by the type of blockchain deployed to host energy trading applications between electric vehicles. For instance, the ledger expands more aggressively for public blockchain platforms opting to implement energy trading operations between existing electric vehicles. Likewise, the ledger size grows at a limited pace for private blockchain platforms since limited users can join and access the private ledger. Methods such as data pruning are helpful to reduce the size of the blockchain ledger on the disk. But, the majority of these methods fail when the ledger size grows beyond the available capacity of the disk [28], [39]. Hence, proper planning for selecting a blockchain platform to trade energy between electric vehicles in a secure and trusted manner is a vital requirement of the transport industry users [40]. Further, various optimal storage options using edge, fog, and cloud-based storage technologies should be proposed to present highly scalable and low-cost energy trading operations for electric vehicles.

III. OPPORTUNITIES FOR BLOCKCHAIN IN ELECTRIC VEHICLES ENERGY TRADING
Blockchain permanently stores the digital asset records in encrypted form to protect the confidentiality of digital data related to energy trading in electric vehicles. Examples of digital data related to energy trading in electric vehicles include pseudonyms identity of energy traders, data type, battery charge capacity, metadata, timestamped energy trading transactions, and indexed history of metadata. Blockchain features assist to efficiently handle the data security, privacy, traceability, and transparency problems of the traditional energy management systems. The potential opportunities for blockchain in electric vehicle energy trading are highlighted in Fig. 1. This section briefly explores and discusses the potential opportunities of blockchain technology in eclectic vehicles energy trading.

A. ENHANCE ENERGY TRACEABILITY
The blockchain traceability feature aims at managing the assets record during asset processing by the participating organizations or shipment from source to destination. The complete and immutable transaction records enable electric vehicle owners to establish data provenance of renewable energy sources. More specifically, the traceability feature of blockchain assist in verifying the Renewable Energy Certificates (RECs) of energy generators to assure compliance with state renewable portfolio standards. The green marketing theory has forecasted that people will prefer renewable energy resources if assured of their origins [41]. In an Internet of Electric Vehicles (IoEV) network, blockchainbased smart contracts can record the trade transactions when energy is transferred from the battery of the energy prosumers to the consumers. Also, because of the blockchain traceability, immutability, and transparency features, smart contracts can enable electric vehicles to search for an electric vehicle willing to sell its surplus charge. The electric vehicles can also verify using immutable data that the required energy amount is available at a nearby grid station. Using blockchain, the electric vehicle owners can also verify the type and reputation of the plant supplying electricity to the grid stations. Additionally, through the traceability feature, electric vehicle owners can consider environmental-geopolitical-economical factors, power plant's energy trading policies, and the type of primary energy source to choose a plant to sell their residual energy [42], [43]. The real-time access to smart grid data can assist in avoiding the congestion caused by electric vehicles at a smart grid, especially during peak hours. Through data traceability and immutable transaction record, the electric vehicle owners can verify the legitimacy of the energy providers to assure that energy is traded from an authorized, registered, and trusted provider. The traceability feature can assist the regularity and authorities in auditing the energy trading operations of the involved organizations to assure compliance with energy trading regulations. In summary, blockchain traceability is more effective and trustworthy than any centralized system as data records are incomplete, unsafe, and modifiable in centralized systems. The timestamping of the transactions assures that transactions are maintained in chronological order and it assists in establishing data provenance of energy, highlighting frauds, and assuring compliance with regulations.

B. IMPROVE MARKET EFFICIENCY AND RESOURCE OPTIMIZATION
An efficient system for an optimized energy trading market for electric vehicles aims at decreasing energy trading prices, maximize participants' profit, and satisfy the network constraints. The differentiating features of blockchain technology assist in presenting an optimized energy trading market to owners of electric vehicles through timestamped, transparent, immutable, and verifiable historical data of the energy trading operations. Blockchain technology can have a vital role in the growth of the electric vehicles energy trading market as owners of electric chargers can be offered incentives to bring their private chargers online for public use. It assists the operators of energy grid stations to better control, use, and manage the energy demand of electric vehicles [41], [44]. Both energy buyers and sellers can use immutable historical data related to energy trading rates to calculate an indexed and suitable rate during off-peak hour load. The availability of complete historical energy trading related data, operational transparency, and data traceability of blockchain can increase the trust of the involved organizations in the electric vehicles energy trading market.
The next-generation energy trading practices offer an incentive to the energy trading organizations for retaining them to further increase energy trading business opportunities. For instance, having more energy chargers in the network creates an opportunity for electric vehicle owners to purchase energy from those chargers who offer the cheapest rates [44], [45]. Decentralization characteristics of blockchain technology and its transparency feature assists electric vehicle owners to register electric vehicles to the system and earn profit by selling the surplus battery charge to benefit buyers. The energy trading decision of an electric vehicle can be influenced by many factors such as the preferences VOLUME 4, 2016 of the electric vehicle owners. Furthermore, the driver of an electric vehicle can select a roadside energy filling station by evaluating the blockchain-based data such as the charger's available energy capacity, and distance in kilometers to the charger. In addition, energy price transparency enabled by the blockchain technology can assist to improve the energy market efficiency. In summary, the capabilities of electric vehicles to serve as an energy prosumer enables blockchain technology to present an optimal market for trading.

C. STAKEHOLDERS REPUTATION-AWARE ENERGY TRADING
Electric vehicle network present an economical and reliable way to reduce petroleum products to keep the environment clean. Electric vehicles significantly contribute to greening cities as they aim at minimizing the pollution due to carbon dioxide emissions caused by fossil fuel-based vehicles. Currently, limited roadside energy filling stations are available in cities worldwide to fulfill the energy demands of electric vehicles. The roadside energy filling stations depend on renewable energy generation plants for buying energy to fulfill the needs of electric vehicles. The system for ensuring fair and even allocation of energy resources to electric vehicles uses demand and self-declared deadlines (e.g., the maximum time to refill the charger) data provided by the drivers of the electric vehicles. This data is used by the grid schedulers to formulate a plan to fulfill the requirements of existing electric vehicles in a fair, timely, and cheap way [46]. However, there is the possibility that the electric vehicle drivers could have presented wrong deadlines data to the smart grids that can cause unfair energy allocation to the electric vehicles. The scheduler of a smart grid counts on such data to prepare a plan to allocate the energy filling slots to the electric vehicles. For instance, electric vehicle owners can present the wrong deadline data to the scheduler to grab the earliest energy filling slots to get better service or monetary benefits. As a result, it can cause congestion on the smart grid, energy shortage, and unfair energy allocation to electric vehicles.
Blockchain technology has the potential for identifying, verifying, and handling frauds causing unfair energy resources allocation to electric vehicles. Smart contracts can be developed and deployed on blockchain platforms such as Ethereum to assure that dishonest electric vehicle drivers can not be successful in gaming systems for their benefits. A reputation smart contract can assign, calculate, and update the reputation score of an electric vehicle driver after verifying its self-declared deadline. More precisely, it decreases the reputation score of an electric vehicle driver on encountering misleading deadline data shared by the driver. The reputation smart contract increases the reputation score of the electric vehicle drivers when the submitted deadline data is found true. A smart contract can offer penalties to dishonest or selfish drivers on encountering fraud related to energy trading. For instance, smart contracts can exclude selfish or dishonest drivers from making any energy trading transactions during a specified period. The blockchain-based scheduler for smart grids can consider the reputation score of an electric vehicle to allot an energy filling slot. The energy allocation management using blockchain can create healthy competition among registered and authorized energy providers to increase their profit.

D. STREAMLINE BILLING AND PAYMENTS
Many of the systems developed by the automotive industry to automate the energy trading among electric vehicles have followed centralized-based architectures. Centralizedbased systems are managed and controlled by a single authorized organization. The legacy energy trading systems use a centralized third-party service to identify and settle payment-related disputes among energy trading organizations. Moreover, centralized-based data storage is vulnerable to modification or damage by adversaries [20], [47]. Electric vehicle owners desire for quick, automated, trusted, reliable, and verifiable payment settlement system to minimize frauds related to billing and payments (e.g., fabricated payment certificates). The payment-related services hosted on the centralized system are slow, non-transparent, non-traceable, and less trustworthy. Blockchain is a distributed technology that is primarily introduced to transfer cryptocurrencies between business parties, and it guarantees compliance with the organizational rules during payment settlement operations. The fast, secure, and reliable cryptocurrency-based payment settlement for energy trading between the electric vehicles can create new opportunities for the involved parties to increase their profit rates. Many digital currencies such as Bitcoin are based on a public decentralized blockchain ledger, and they are considered as an alternative to traditional solutions for thing-to-thing payments.
Bitcoin and Ethereum-based platforms support micropayment transactions in Satoshi and Gas, respectively. Blockchain technology allows micro-payments and eliminates the need for third-party authorization to present a cheap business model for energy trading [48]. Additionally, smart contracts on the blockchain execute payment-related transactions as long as specific conditions are met. For example, when an electric vehicle verifies that it has received the requested energy from a prosumer, the cryptocurrency tokens will be automatically transferred to the wallet of the energy trader by the deployed smart contract. Additionally, since blockchain immutability stores the transactions, hence, digitally signed transactions can be used by the authorities to assure that the seller or buyer of energy cannot repudiate transactions in the future.

E. AUTOMATE ENERGY AUCTIONING
Electric vehicles can be categorized into two main categories: (1) energy consumers and (2) prosumers. Existing electric vehicles can sell surplus energy to the neighbor vehicles at a rate that suits both. Such autonomous choices of energy selling and purchasing enable the electric vehicles to maximize their financial benefits [47], [49]. The price of electric charge is usually dynamic as it is affected by the demand and supply of energy in the market. Furthermore, electric vehicles can sell their residual energy to other vehicles at different rates during peak hours and non-peak hours. Auctioning is one of the methods that can be adopted by electric vehicle owners to maximize their profit by selling residual energy at competent rates. Usually, the services of centralized brokers are opted by electric vehicles to sell and purchase surplus energy. Blockchain technology can remove the intermediary services by automating the auction process for energy selling and buying from the most appropriate customers. As a result, it helps in minimizing the transaction cost related to energy trading. Blockchain ensures a high level of trust among those actors who are involved in auctioning of energy.
Blockchain-based smart contracts automate the bidding process to expedite the process of energy auctioning. In particular, a blockchain-based system for energy auctioning can register the energy consumers and prosumers nodes, store the bid prices offered by the participants, verify the auctioning deadlines, and declare the winners based on the bid price offered by the participants. The winners are immediately announced using blockchain-based data once the auctioning process has been completed. The auctioning process considers several parameters for declaring a winner, such as a participant's offered bid price and the distance between buyers and sellers [30]. An exemplary system to highlight the system components such as blockchain Access layer protocols, DApp frontend, Smart contracts, Blockchain ledger, and InterPlanetary File System (IPFS), participating stakeholders, and information flow direction among system components has been presented in Fig. 2. The presented system has discussed a blockchain-based reverse auctioning system that can assist electric vehicle owners to securely trade energy with neighboring electric vehicles, smart grids, roadside energy filling stations, and registered energy VOLUME 4, 2016 providers. In the presented system, the bidding process has been initiated by the energy vehicle owners. In response, the registered stakeholders of the system will post their bids price against the demands of the bidder on the blockchain. The bidder can select and notify the winner based on its preferences.

F. AUTOMATE VEHICLE-TO-GRID ENERGY TRADING
The existing Vehicle-to-Grid (V2G) energy trading platforms aim at reducing the mismatch between demand and supply of energy during peak hours. The bidirectional flow control support in existing electric vehicles enables the smart grid to handle the energy scarcity during peak hours by purchasing energy from the electric vehicles. However, electric vehicle driver's range anxiety, resource requirements during battery discharging, and time required to discharge/charge a battery can de-motivate the electric vehicle owners from participating in the V2G energy trading process [50], [51]. Through incentive provisioning in the form of energy tokens, the local drivers can be motivated to participate in V2G energy trading. Blockchain technology can assist in automating and securing the V2G energy trading using smart contracts, digital signatures, and efficient consensus algorithms. It can assure that cryptocurrency-based incentives are transferred immediately to the wallet of the electric vehicle owner who sells energy to the smart grid. Unlike centralized-based energy trading systems, blockchain technology supports micropayments and presents a cheap energy trading solution. Furthermore, smart contracts can be used by a smart grid to aggregate the energy requests from multiple electric vehicle owners. Based on the energy request data and total energy storage capacity of a grid station, the smart grid owners can calculate the additional energy needed to balance the energy supply and demand in the market.
Blockchain creates a healthy competition among the smart grid owners to purchase energy from electric vehicles to fulfill user demands during peak hours. Blockchain presents a single and unified view of the energy trading data and stores transactions in a transparent way; hence, the competition among the smart grids increases the creativity as some prosumers can contact many smart grids hoping to earn more profit by sharing their residual electrical charge. Fig.  3 presents a high-level design of a blockchain-based system that enables energy prosumers to sell energy to consumers. The reward management smart contract sends crypto tokens to the wallet of the registered prosumers after transferring energy to the consumer. The order management smart contract assists the energy traders in performing the business operations by calling sell, purchase, confirm, and confirmreceive functions. Another blockchain-based system, presented in Fig. 4, highlights the system components involved in tracing the energy trading transactions from the generation of energy to consumers (end-to-end traceability). The smart grids in the presented system purchase energy from various renewable energy sources such as wind energy, solar energy, and hydropower energy plants using a blockchain platform. The energy received by the smart grids can be sold to the energy charging stations to fulfill the requirements of the electric vehicle. Electric vehicles can buy energy from deployed electric energy charging stations. In addition, the surplus energy of the electric vehicles can be resold to the energy filling stations to earn profit.

IV. BLOCKCHAIN-BASED RESEARCH PROJECTS AND CASE STUDIES
This section presents insightful discussions on the recent blockchain-based research projects and case studies that fo-cus on energy trading in general, and in particular, energy trading between electric vehicles. Blockchain technology has been practiced widely in energy trading systems such as transmission and distribution of electrical power using smart grids in the past. However, integrating blockchain with electric vehicles for energy trading is a new concept.

A. VANDEBRON AND TENNET
A significant rise in interest of the public in electrical vehicles has been noticed worldwide due to the paradigm shift of countries to electrification. Vandebron represents an Amsterdam-based company that was founded in 2013 and delivers green electricity to communities [52]. Though this company does not generate any electricity, it aims at enabling individual electric producers to sell their electricity in a trusted way. Both Vandebron and TenneT companies share a strong collaborative partnership to enable electric vehicle owners to trade energy more flexibly and safely using blockchain technology. TenneT is an electricity transmission operator which is based in Netherlands and Germany and supplies electricity to more than 41 million users. The energy trading transactions between the stakeholders are performed using a permissioned Hyperledger blockchain platform developed by IBM and hosted by The Linux Foundation [53]. The aim of this collaborative partnership between the two companies is to balance the demand of the grid with its supply through the analysis of the trusted data stored on the blockchain. Furthermore, the integration of renewable energy resources such as wind and solar to the developed system has enabled maintaining the balance between demand and supply.

B. MOTIONWERK
MotionWerk is a German-based startup that focuses on providing energy charging platforms for electric vehicles. It reg- VOLUME 4, 2016 isters private and public energy charging stations responsible to trade energy between electric vehicles. The implementation of blockchain technology by using the Share&Charge project has facilitated the stakeholders in automating payments related transactions. Share&Charge project aims at enabling charging point operators, eMobility service providers, and other market participants to trade in a fast, reliable, and trustworthy manner [54]. Share&Charge is an application that provides a P2P service that allows electric vehicles and charging station owners to trade energy securely and reliably without relying on a centralized third-party service [55]. Further, Share&Charge proposes a decentralized protocol for the processes of electric vehicles energy charging, securing energy trading transactions, and sharing data regarding those processes. The network where transactions are done is based on the Apache 2.0 and Open Charge Point Interface (OCPI) 2.2 and with the use of an ERC20 token interface for the services. More precisely, the Share&Charge project allows its users to charge their electric vehicles with the help of digital payments and a decentralized digital protocol.

C. EMOTORWERKS
By design, Share&Charge is an open platform that is publicly accessible and supports energy trading between electric vehicles. The eMotorWerks company has leveraged the Share&Charge project for enabling energy trading between electric vehicles. The eMotorWerks is an electric vehicle charging company that has recently created a P2P charging platform in California [56]. The technicalities of the blockchain used by eMotorWerks are similar to the Mo-tionWerk because they have used the same digital protocol (Share&Charge). Furthermore, eMotorWerks company has recently developed an application called JuiceNet that enables users to trade energy by controlling and monitoring grid stations connected through WiFi links. JuiceNet takes into account drivers' historical charging patterns, real-time input and signals from grid operators, current charging station demand, and several other aspects using open APIs to optimize the charging process of electric vehicles. After deploying this application, the reliability of power grid stations surges, and the capacity of energy charging stations can be fully optimized to increase the profit rate. Further, it enables improving the environment due to flexibility in integrating more solar and wind systems into the grid [57].

D. POWER LEDGER
Power Ledger provides a platform that enables tracking and trading of energy using blockchain technology. This company was developed by an Australia-based agency and enables P2P solar energy trading between electric vehicles in an efficient, fast, and transparent way [58]. It also enables V2G and Grid-to-Vehicle (G2V) energy trading and offers flexibility to the users to sell surplus energy at suitable rates. Further, by timely transferring the cryptocurrency as payments to the wallet of the energy producers, the Power Ledger platform envisions an automated market that benefits all users involved in the energy trading process. The Power Ledger has leveraged the Ethereum blockchain platform to form a consortium-like environment. The software allows users to track and trade energy as well as trade environmental commodities such as solar energy being sold to the grid. The company also created a utility token called Power Ledger (POWR) coin that allows the participants to invest in the system for a specific time. The company deals with energy trading in general; however, in recent years, they have shown more interest in electric vehicle energy charging by attempting to turn electric vehicles into mobile ATMs by collaborating with Silicon Valley Power [59].

E. LIGHTENCY
Lightency is a green technology startup founded in 2018, and provides software-based solutions to energy companies. Lightency provides a decentralized energy marketplace to connect participants such as consumers, grid operators, and prosumers and enabling them to trade energy in a secure manner [60]. Similar to other companies mentioned previously, Lightency allows consumers to become prosumers and allows them to sell the surplus energy for monetary benefits. It assures that the energy is produced, consumed, and exchanged locally. The lightency framework, also known as powerchain, is based on the Ethereum platform and allows electric vehicles to trade energy. Lightency project aims to lower the cost of electricity whilst creating new revenue streams for all users including prosumers and grid operators. The current goal of lightency is to empower African communities particularly villages, to sell energy at lower rates. The lightency empowers users to buy electricity at lower prices when demand is low.

V. RESEARCH CHALLENGES AND ISSUES
Blockchain technology can assist to automate electric vehicles energy trading operations, secure the the energy auctioning, and minimize payment-related frauds. Despite the many advantages of blockchain technology in the energy trading between electric vehicles, the successful adoption of blockchain technology can be affected by many technological, social, and organizational challenges. This section briefly discusses the main challenges that can affect the adaptability of blockchain in electric vehicle energy trading.

A. SCALABILITY
Blockchain is a P2P-based technology that enables a fully automated system where electric vehicles can trade energy in a highly secure, trusted, transparent, and traceable way. However, the adaptability of blockchain in electric vehicles energy trading can be affected by the scalability of existing blockchain platforms [61]. It is forecasted that electric vehicles will dominate the transportation industry in the future because of their ever-increasing demand and fuel efficiency. However, the current state of blockchain technology is not capable of hosting billions of electric vehicles within a smart city with real-time data processing requirements.
This could be improved with future technologies such as fog and edge computing or other smart technological solutions such as electric vehicle communication through offchain channels [61]- [64]. Private platforms are more scalable than public blockchain platforms, but they do not truly follow a decentralized architecture for storing and processing data and transactions. To visualize the issue of scalability, compared to VISA which can process approximately 2000 transactions/second, the most popular blockchain coins such as Bitcoin and Ethereum can execute up to twenty transactions/second only [63], [65]. Researchers have proposed solutions such as sharding to handle the scalability issues of existing blockchain platforms. Sharding selects a specific group of nodes in the electric vehicle ecosystem for transactions within their group/shard. The future scalability solutions for blockchain should also consider energy as one of the parameters to propose green scalability approaches.

B. INTEROPERABILITY
The interoperability feature of blockchain platforms enables electric vehicle drivers to share and process information across different blockchain platforms, and it assists in resolving the information silos problem of disintegrated organizations. It assures that the heterogeneous blockchain platforms can talk and understand the information shared by the communicating parties [66]. The existing electric vehicles are integrated with other systems, such as smart grids and roadside energy filling stations, for energy trading and resource sharing purposes. However, it can create problems if the interoperability support that enables users to communicate across heterogeneous platforms is not available within the deployed platform. The issues such as differences in supported languages, consensus algorithms, block size, and choices of hashing algorithms are handled by the existing solutions for blockchain interoperability for effective, fast, and uninterrupted communication [66], [67]. Also, many blockchain systems do not follow any standard, and they do not have a specific standard that incentivizes creativity. Hence, cross-platform communication support which is one of the key requirements of existing electric vehicle energy trading platforms becomes difficult. The interoperability solutions such as Atomic Swap enable blockchain platforms to transfer cryptocurrency tokens directly from the wallet of an energy buyer to the seller. Other solutions, such as multi-chain platform, require that the energy trading electric vehicles should be plugged into the multi-chain platform to share and process the information [36], [37].

C. IRREVERSIBILITY
Blockchain technology brings about trust, security, transparency, automation, traceability, and auditability to the business operations, focusing energy trading between electric vehicles, roadside battery charging stations, and power grids. For instance, the auditability feature can enable the authorities to verify that the electric vehicles and grid stations involved in energy trading are registered, authorized, and genuine. The traceability feature assists in establishing data provenance of the energy supplied to an electric vehicle from a power grid [68], [69]. In addition to these benefits of blockchain, data immutability assures that the data stored on the ledger cannot be modified, deleted, or hacked by any adversary accidentally or intentionally. Therefore, irreversibility is a prominent and vital feature of blockchain and guarantees data security and transparency [70]. However, for a few use case scenarios that require frequent data alteration, the irreversibility feature becomes an issue that requires attention by the researchers to develop future applications. For instance, a vehicle route optimization application installed on an electric vehicle can store false data on the blockchain that is required to be deleted immediately. Since the majority of the electric vehicle automation projects are at their initial stage, the incorrect data can be generated and stored on the ledger. The accuracy of data stored on the blockchain is not fully guaranteed. The data accuracy depends on the precision level of sensors designated to collect and store electric vehicle data on the blockchain. This issue would not exist with more futuristic technologies and better solutions.

D. PRIVACY AND GDPR LAWS
Public blockchain platforms such as Ethereum and Bitcoin prioritize data immutability, transparency, and anonymity over system throughput and latency. On the other hand, private blockchain platforms are more concerned about system efficiency and immutability than data transparency and anonymity. Existing data privacy-preserving systems guarantee that data is both safe and secure from unauthorized users. Protecting data privacy is one of the challenges to public blockchain platforms as data and transactions are open and transparent in public blockchain platforms. As a result, it allows everyone to access the data. According to the General Data Protection Regulation (GDPR), any digital entity such as encrypted or hashed digital identifiers or personal data should be inaccessible to unauthorized users. Therefore, such data should be erasable or modifiable only by authorized users. The deployed blockchain systems should efficiently handle data confidentiality and access control to meet the data privacy requirement of electric vehicle users during energy trading. The registration smart contracts can assure that only authorized users have access to the data. Being an immutable technology, the GDPR requirements about data erasability by the authorized users, mentioned in Article 17, are not fully implemented by the current blockchain platforms [71]. The public availability of blockchain pseudo-anonymous data and its decentralization nature hinders the successful implementation of blockchain by electric vehicles as well as the incompetence of technology in satisfying the GDPR laws [72]. The researchers have implemented different techniques to make sure that data stored on the blockchain is compliant with GDPR standards [73]. VOLUME 4, 2016

E. SECURITY VULNERABILITIES
Blockchain technology follows a P2P data broadcasting structure and verifies the validity of transactions using consensus protocols. However, the P2P characteristic of blockchain can be exploited by adversaries to perform harmful activities such as stealing cryptocurrency tokens from the wallet of the electric vehicle owner. The adversaries can perform mapping of IP addresses to the wallet addresses of electric vehicle owners to compromise the user's data. As a result, it often leads to data leakage issues that arise several security challenges to the blockchain network. The increasing computational capacity of computers due to quantum computing also introduces new security challenges to the blockchain platforms. The high-performance quantum computers [71] can empower the hackers to quickly break the public-key cryptography algorithms such as RSA (Rivest, Shamir, Adleman) [74], ECDSA (Elliptic Curve Digital Signature) [75], and ECDH (Elliptic Curve Diffie-Hellman) [76], [77]. A case highlighting the successful attack on an encryption algorithm has been reported in [78] wherein the RSA algorithm was broken using Shor's Prime factorization algorithm in a few hours. In addition, the bugs and vulnerabilities in blockchain-based smart contracts create severe challenges to blockchain security. The adversaries can exploit poorly written contracts, that can perform harmful activities. For instance, the vulnerabilities in smart contracts can be exploited by the adversaries to transfer cryptocurrency tokens from the wallet of a user to his account [48], [79]. Extensive testing of smart contracts against various types of attacks before deploying them on the blockchain can protect against external attacks.

F. REGULATIONS AND STANDARDS
Blockchain technology presents many benefits to electric vehicles in terms of data security, privacy, transparency, visibility, and immutability for ensuring efficient, trusted, traceable, and auditable energy trading services. In addition to these benefits, there are yet many challenges concerning the legality, regulations, and standards for blockchains that affect the adaptability of blockchains to electric vehicle energy trading [20], [79]. The traditional systems count on a centralized system that is held responsible, accountable, and answerable for the actions of electric vehicle owners during energy trading. The decentralization feature of blockchain technology makes difficult the accountability and maintainability processes as there is no single entity responsible to solely run and control the blockchain network. Blockchain is not regarded as mature and developed technology as it is still in its evolving stage [20], [79], [80]. The standards and regulatory frameworks for blockchain technology are still in their development stages. The consensus algorithms such as PoW and PoW ensure an agreement to the current state of the ledger using the mining nodes. PoW is the fundamental and highly secure consensus algorithm used by the Ethereum platform, but it requires a lot of power to produce a single block of the chain [81]. This power budget further increases with an increase in the number of users in the blockchain network. Also, the operations of current blockchain technologies for assuring data privacy are not compliant with GDPR laws. All aforementioned concerns significantly affect the prosperous implementation of blockchain in electric vehicle energy trading [80].

VI. CONCLUSION
In this paper, we have presented the benefits and features of blockchain technology to efficiently control and manage energy trading operations between electric vehicles. We identified the requirements of blockchain technology to ensure secure and traceable energy trading between energy prosumers and consumers. We have explored and discussed numerous opportunities for blockchain technology in electric vehicle energy trading to ensure trust, transparency, security, immutability, and accountability in energy trading operations. We have presented several exemplary blockchain-based systems to highlight the components, stakeholders, and sequence of operations between the participants involved in the energy trading activities. We have identified and discussed several technological, organizational, and social challenges that require further research to unlock the full potential of blockchain in electric vehicles energy trading. Our key findings of this research include: • The lack of standards, absence of effective guidelines, regulatory frameworks, and lack of understanding about blockchain technology can significantly affect the adaptation of blockchain in the transportation industry. • The development of high-performance quantum computers is a serious threat to the information security of blockchain-based energy trading systems. Quantum computers can quickly break the security of state-of-theart public-key cryptography algorithms. • Electric vehicles have the potential to replace the traditional transportation systems as they can provide carbon-free atmosphere. But, the performance of blockchain platforms in terms of transaction execution throughput and speed can affect blockchain adaptability in electric vehicles energy trading operations. • Ensuring data privacy is one of the challenges to the existing public blockchain platforms because data and transactions are open and accessible to everyone. Therefore, aforementioned issues can affect blockchain's adaptability in electric vehicles energy trading operations.