# Blockchain-Based Lightweight Trust Management in Mobile Ad-Hoc Networks
## 4 Performance Evaluation
### Simulation Results  
#### 4.2.1 Effectiveness (Vulnerability Detection)  
To verify the effectiveness of the proposed scheme, the period of vulnerability to NIAs in a network with the proposed scheme was compared to that in a network with DCFM. Figure 11 presents the overall vulnerability periods based on the time required to detect attacks versus the percentage of newly introduced attacks in the network. According to the standard OLSR protocol, the hello and TC message intervals are two and five seconds, respectively. Therefore, attack detection can take up to five seconds depending on when an attack is launched.  
In this simulation, there were ten different potential attacker nodes in the network. We simulated ten sequential attacks at different time intervals. The newly introduced attack ratios varied from 0% to 100%, as shown in Figure 6. According to the DCFM, the nodes are guarding themselves and there is no information being shared between nodes regarding the attacks. Therefore, the nodes must perform the detection process whenever a new attack is introduced. In the proposed scheme, attack information is shared through the network and nodes do not have to repeat attack mitigation tasks that were already performed by other nodes. Therefore, even when the same attacker targets a different victim, a node in the blockchain OLSR scheme is not vulnerable to the attack. In contrast, multiple nodes in the DCFM scheme can be subjected to the attack until it is detected. As a direct result, the vulnerability period of the network with the blockchain OLSR scheme is reduced, as is the ratio of new attackers.  
Table 3 shows the percentage of messages received by the victim node when there is an attack and when there is not in the network. In this scenario, we use an attacker node to launch near two different victims. When there is no previous block and also DCFM rules are not applied, it is sure that the adversary had successfully launched the attack and the victim got very few messages. When the rules were using in the absence of block, victim can receive nearly the same percentage of messages as in normal scenario without attack. However, in the third and fourth columns, the percentage of  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Values** \\ \hline Simulator & NS-3 \\ Number of nodes & 30 mobile nodes \\ Mobility model & Random Waypoint Mobility Model \\ Simulation range & \(1\) km \(\times\) 1 km \\ Movement speed & 3 m/s \\ Transmission range & 250 m \\ Simulation time & 200 s \\ \hline \hline \end{tabular}
\end{table}
Table 2: Simulation Parameters and Values.  
Figure 11: Comparison of the Overall Vulnerability Periods in Networks.  
message received is even a little higher than the case of detecting with DCFM. Because of the block distributed in the network, the nodes are directly neglecting the attacker regardless of using DCFM or not. With our proposed scheme, even when the same attacker attacks the different victim, the victim node can still receive the same percentage of messages with no attack scenario. With new attacker in the network, the victim receives the same percentage of messages with DCFM even though it could be a little less than no attack scenario. Therefore, the proposed scheme is proved as an effective solution in terms of security value, too.