# VANET Secure Reputation Evaluation & Management Model Based on Double Layer Blockchain
## 4 Design of the DBREMM
### Indirect Trust  
Due to the characteristics of wireless transmission in VANET, there may be unavoidable noise and the sensor or firmware may suffer from faults, so the evaluation of the reliability of the target vehicle \(v_{i}\) based on the direct trust may be biased or untrustworthy. To obtain the trusted trust value, \(v_{j}\) can request the opinion of other nearby vehicles that verify the target events simultaneously, obtain their direct trust as the indirect trust of \(v_{j}\), which is recorded as \(T_{ji}^{in}\), and then the node trust is obtained by the weighted fusion.  
To our knowledge, none of previous work considered the effect of historical reputation when computing indirect trust. That is, for \(v_{j}\), if the historical reputation of \(\{v_{k1},v_{k2},...,v_{kn}\}\) is far lower than the historical reputation value of \(v_{j}\) itself, the reference value of their opinions should be reduced, and vice versa. Therefore, in our scheme, we propose an indirect trust function based on the adaptive difference attenuation factor to increase the influence of the historical reputation. The equation of indirect trust computation is as follows:  
\[T_{ji}^{in}=\frac{\sum_{y=1}^{n}\theta_{y}T_{ky}^{in}}{\sum_{y=1}^{n}\theta_{ y}} \tag{9}\]  
That is, \(v_{j}\) can indirectly assess the reliability of the the report of \(v_{i}\) using direct trust \(T_{ky}^{de}\) from the vehicle group \(\{v_{k1},...,v_{kn}\}\) after the weighted fusion. Where \(\theta_{y}\) is the weight factor calculated according to the historical reputation difference between \(v_{j}\) and \(v_{y}\) from \(\{v_{k1},...,v_{kn}\}\):  
\[\theta_{y}=\begin{cases}0&\gamma<R_{j}-R_{y}\\ \frac{1}{4\kappa|K_{j}-R_{y}|}&0<\gamma<R_{j}-R_{y}\\ e^{2\times|K_{j}-R_{y}|}&R_{j}-R_{y}<0\end{cases} \tag{10}\]  
where, \(\mid R_{j}-R_{y}\mid\) is the absolute value of the historical reputation difference between two vehicles, and \(\gamma\) is the threshold factor of the difference, which is used to control the upper limit. That is, when the difference between the reputation of vehicle \(v_{j}\) and the historical reputation of vehicle \(v_{y}\) is greater than the predetermined threshold \(\gamma\), the opinion from this node can be completely discarded. The purpose of this step is to prevent low-reputation or malicious vehicles from gaining trust quickly by \"ingratiating\" high-reputation vehicles to join the verification. The threshold factor can change dynamically based on the number of cooperated nodes. The significance of using a logarithmic function in (10) is that the weight does not change linearly with the reputation difference. When the historical reputation of \(v_{y}\) is greater than that of \(v_{j}\), its weight is slowly increased. When the historical reputation is less than that of \(v_{j}\), it quickly reduces its weight. The calculation method is subject to the idea of a \"slowly accumulating and rapidly declining\" reputation. The values of 4 and 2 are obtained after several attempts. They are obtained following the ideas that: (1) the value is significant enough to distinguish the influence of different historical reputations; (2) the different influences of those nodes that have less historical reputations need to be greater than those with more historical reputations. These values may not be perfect but they are enough to complete our algorithm. Upon calculating the threshold value allocated by each node through (10), indirect trust \(T_{ji}^{in}\) of node \(v_{j}\) towards \(v_{i}\) can be obtained through (9).