**7. Challenges and Limitations**

Blockchain was first proposed in 2008, and it was utilized mainly to develop a currency exchange system for some time [13]. Later in 2014, Ethereum came up with the concept of smart contracts, which influenced researchers to utilize blockchains in different fields [52,53]. In fact, that worked like a catalyst for the creation of innovative applications and areas where they could be used. As a newly developed system, it still requires more experiments (and convincing proofs) to make it compatible with other systems.

The proposed method can also be considered as an effort to combine the P2P energy exchange with blockchain technology. Thus, while developing such a system, several challenges were faced. First of all, it is really difficult to develop a real-world system that can directly communicate with a blockchain. Thus, a simulation study was performed where VMs were considered EVs and HCSs. Secondly, there are very few way to learn and develop smart contracts. Thirdly, rather than popular languages, it supports newly developed languages such as Solidity, Serpent, and Yul, which makes the development phase more difficult. However, some simplified code was written using Solidity (which is an object-oriented, high-level language for implementing smart contracts) to simulate the proposed method. In spite of our efforts, it still requires improvement and optimization. Thirdly, to ensure the trustability of the blockchain, our mechanism uses a consensus protocol which could be highly time consuming (at times), and thus, it is considered a barrier while developing a system that requires high throughput.

While proposing our system, we have considered this above-mentioned issue about time consumption, and accordingly developed the system in such a way that the slowness of the block generation process would not harm the ongoing flow of the system. None of the components and none of the protocols have to wait for block generation, but rather, they can just perform the required actions. After all the communications, tasks, and transactions (starting from *searching()* and ending with *feedback()*) are completed, the server initiates the block generation process. Before the block generation, the charging process and money calculation are performed. Hence, EVs can leave the site just after receiving the charges. As the payment is done after the block generation, the HCSs are required to wait. However, as the system is secure using the blockchain, there is no confusion left regarding receiving the payment and getting extraordinary services, such as security, integrity, transparency, and availability; and HCSs can endure the delay and identify the service taker. We have mentioned the registration system under the blockchain to identify who would be allowed to get the service. While this gives the solution to this issue, a more efficient method can be searched for to enhance the performance of the blockchain. In the future, we plan to also find out more suitable ways to increase the throughput and more optimized outcomes from the currently designed system.

As blockchain-based systems have become popular recently, they were not developed to support all kinds of systems (just yet). Hence, there are several practical issues while adapting blockchain to new systems. Scalability is a critical limitation of the blockchains because of their decentralized and distributed nature. As all the members store the block information, the system requires a huge amount of storage space compared to a typical centralized system. Again, to ensure security, several cryptographic functions are required to be used for encryption, decryption, hashing, etc., which would require high computational power, and that would make the blockchain system expensive. Moreover, systems with low computational power require substantial computational time, which minimizes the throughput of the system. However, to mitigate these problems, several online solutions, such as edge/fog computing, would help the blockchain-based system, as they can virtually provide high computational and storage capacity and can perform complex cryptographic calculations in short periods of time.
