## 4 Social Mechanism
### Local Trustworthiness  
Peers belonging to the same cluster foster localized trust. This is because these peers are part of the same neighborhood in the network topology and share a direct transactional relationship, facilitating the generation of trust. It is important to note that the term \"transaction\" here encompasses not only the exchange of valuable assets but also the dissemination and reception of data in general.  
Prior to calculating the local trustworthiness, it is essential to determine the similarity between the two sets of transactional peers. Numerous social network researchers employ the number of neighboring peers as a criterion for assessing the similarity between peers and utilize the Pearson correlation coefficient method to quantify this similarity [26]. However, due to the utilization of the density clustering network structure in this study, which is not a pure P2P structure, certain scenarios involve unidirectional data propagation. For instance, when a core object disseminates blocks to the leaf peers within the cluster. These leaf peers, which serve as the tail peers in the network, typically have significantly fewer neighboring peers compared to the core object. Consequently, when applying the aforementioned calculation method under such circumstances, the resulting similarity between the two sets is likely to be lower. To mitigate this issue, this study utilizes the count of peers belonging to the same cluster class as the similarity discrimination parameter. The calculation method is illustrated in (1):  
\[r(a,b)=\begin{cases}0&CL_{ab}=0\\ \frac{1}{1+e^{-x+2a}}&CL_{ab}>0\end{cases} \tag{1}\]  
The variable \(r(a,b)\) in (1) denotes the similarity between peer \(a\) and peer \(b\), where \(r(a,b)\in[0,1)\). Similarly, \(CL_{ab}\) represents the number of clusters that both peer \(a\) and peer \(b\) belong to. As the number of shared cluster classes increases, their similarity to each other also increases. The sigmoid function can represent the nonlinear relationship between these two variables.  
Once the similarity between the trading parties is determined, the local trustworthiness can be assessed based on the number of successful and failed transactions between peers. The calculation method is presented in (2):  
\[PT_{ab}=\begin{cases}r(a,b)\frac{S_{ab}-US_{ab}}{S_{ab}+US_{ab}},&S_{ab}!=0\mid \mid US_{ab}!=0\\ 0,&S_{ab}=0\&\&\&\;US_{ab}=0\end{cases} \tag{2}\]  
Equation (2) defines \(PTab\) as a measure of local trustworthiness, in which \(Sab\) represents the number of successful transactions, and \(USab\) represents the number of failed transactions. Transaction failures may occur due to a peer becoming inactive or deliberately disseminating distorted messages. Crucially, the trustworthiness calculation is unidirectional and focuses solely on the message sender. Specifically, peer \(a\) exclusively records both \(Sab\) and \(USab\) to assess the trustworthiness of peer \(b\). Conversely, peer \(b\) logs only those parameters related to trustworthiness that pertain to peer \(a\)'s role as the message sender, such as \(Sba\), \(USba\), \(PTba\), etc. Furthermore, \(PT_{ab}\) is assigned a value of zero when there are no transaction records between the two peers.