# Smart Contract-Based Right-of-Way Trade with Game Theory in Blockchain-Enabled Internet of Vehicles
## 5 Simulation Results and Analysis  
In this section, the performance of the right-of-way trade strategy based on the V2V game is evaluated. The simulation parameters are listed in Table 1.  
Figure 5 shows the expected profit of B in Solution 1 with various bids and cost factors under \(\Delta t_{AB}=1\) and \(\Delta t_{BA}=3\) using the Monte Carlo simulation. It can be also seen that the theoretical optimal bid and expected profit obtained by Equations (29) and (30) are highly consistent with the simulation results, and it shows that Equation (29) is valid. In addition, the larger \(\alpha_{B}\) is, the larger expected profit  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Symbol** & **Value** \\ \hline The time cost factor of A and B & \(\alpha_{A}\) and \(\alpha_{B}\) & [0, 1] \\ Delayed travel time for [PERSON] after trading & \(\Delta t_{AB}\) & 1 time unit \\ Advanced travel time for [PERSON] after trading & \(\Delta t_{BA}\) & 3 time unit \\ Number of Monte Carlo simulation & \(N\) & 10,000 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation parameters.  
Figure 4: Performance comparison between two solutions, where red is of Solution 1 and blue is of Solution 2. (**a**) The trade success probability for two solutions; (**b**) the optimal bid points for two solutions.  
Figure 6 shows the profits of B in Solution 1 by the optimal bid with various \(\alpha_{A}\) and \(\alpha_{B}\). It can be seen that when \(\alpha_{B}\) is below a certain threshold and \(\alpha_{A}\) is above a certain threshold, no deal can be made and the profit of B is zero. And The profit of B increases with \(\alpha_{B}\), and decreases with \(\alpha_{A}\).  
Figure 7 shows the expected profit of B in solution 2 with various bids and cost factors under \(\Delta t_{AB}=1\) and \(\Delta t_{BA}=3\) using the Monte Carlo simulation. It can be also seen that the theoretical optimal bid and expected profit obtained by Equations (33) and (34) are highly consistent with the simulation results.  
Figure 5: The expected profit of B in Solution 1. (The dotted line is the theoretical optimal bid and expected profit).  
Figure 6: The profits of B in Solution 1 by the optimal bid with various \(\alpha_{A}\) and \(\alpha_{B}\).  
Figure 8 shows the cumulative distribution functions (CDFs) of the total profit of A and B in Solution 1 and Solution 2 and compares them with the theoretical upper bound and the random bid. As can be seen, the CDFs of the total profits of Solution 1 and Solution 2 are closer to the theoretical upper bound and much larger than the random bids, which means that Solution 1 and 2 can improve the performance to near perfection. In addition, relatively speaking, the total profit of Solution 1 is slightly greater than that of Solution 2.  
Figure 8: Cumulative distribution function (CDF) of the total profit of A and B.  
Figure 7: The expected profit of B in solution 2. (The dotted line is the theoretical optimal bid and expected profit).  
Figure 9 shows the profits of A and B in Solutions 1 and 2 and compares them with the random bid. As can be seen, the total profits of A and B in Solution 1 and 2 are equal to each other and much higher than that of random bid. However, Solution 1 is more favorable for A, and Solution 2 is more favorable for B. In some extreme cases of Solution 2, e.g., \(\alpha_{A}=0.6\) and \(\alpha_{B}=0.4\), the profit of A is closer to 0. Both methods achieve Pareto improvement and are effective methods.