<p>Aiming at the problems of difficult charging, long waiting time and energy loss of IoEV (Internet of electric vehicles) during peak charging period, we design a V2V (vehicle to vehicle) energy trading model to simulate the energy trading process. Considering the problems of malicious node attacks and privacy protection, we combine the V2V energy transaction model with a federated chain and explore a distributed ledger to record the V2V energy transaction process. In addition, we design a credibility mechanism to initialize nodes according to their comprehensive strength and select master nodes based on their behavioral performance of participating in consensus, which ensures the reliability of the consensus. Based on this, we propose a more efficient and promising consensus algorithm SV-PBFT (shapley value-PBFT), which simplifies the consensus process, reduces the communication overhead, and improves the consensus efficiency. The SV-PBFT consensus algorithm is used to replace the traditional consensus algorithm in V2V energy trading. The proposed SV-PBFT algorithm is validated by extensive simulation experiments, and numerical results are provided to confirm the good performance of SV-PBFT in V2V energy trading models.</p> <p>&nbsp;</p>