# Honesty-Based Social Technique to Enhance Cooperation in Social Internet of Things
## 3 Proposed Model
### Decision Module
In other words, it is the score calculated based on the direct contact of the nodes with their neighbors. Thus, the assessment of the node in the network only is not sufficient to declare the node as selfish or honest. We need the neighboring nodes' assessments to decide whether the node's behavior is honest or selfish. At each contact made, the node's performance is propagated to all N neighbors about its bundles of data which are accepted or rejected. The neighbor's opinion score is calculated by Equation (24):

\[NJD_{k}(n_{x_{i}})=\big{(}\frac{\sum_{0=1}^{N}JD_{v}\ (n_{x_{i}})}{N}\big{)} \tag{24}\]

where \(NJD_{k}(n_{x_{i}})\) represents the judgment of node \(k\) about node \(n_{x_{i}}\) and \(N\) is the total number of neighbors of node \(n_{x_{i}}\). Node \(v\) will evaluate the reputation of node \(n_{x_{i}}\) based on the value of accepted bundles and rejected bundles for node \(v\). The two values will be compared later to declare the node as selfish or honest in a reputation score calculation. The node score module (NS) will request all the neighbors to show their judgment about the contacted node. The requested information from all N neighbors has all the accepted bundles (AB) and rejected bundles (RB) from that node to them, and the judgment table is updated. #### 3.3.3 Threshold Value Calculation

The reputation score declares the node as honest or selfish. An honest node is a cooperative node, whereas a selfish node does not cooperate in forwarding the messages. The reputation score of the node is compared with the threshold value calculated in Equations (25)-(27). \[\tau_{Hni}\in(\rho,1]\in N:\{n_{xi}\;\epsilon\;RSn_{x_{i}}\;\textit{where}\;n_{ xi}>\rho\;\in\;(0,1]\;\} \tag{25}\]

\[\tau_{Sni}\in(\rho,\rho]\;\in\;N:\{n_{xi}\;\epsilon\;RSn_{x_{i}}\;\textit{where}\;n_{ xi}\;\leq\rho\;\in\;(0,1]\;\} \tag{26}\]

\[RSn_{x_{i}}\;\in N:\{n_{xi}\;\in\;\tau_{Hni}\;\vee\;\tau_{Sni}\;\in\;NSn_{x_{i +1}}\;\vee\;NId_{k}\;\} \tag{27}\]

\(\tau_{Hni}\) represents honest nodes, and \(\tau_{Sni}\) represents selfish nodes in the community. \(\rho\) is an arbitrary constant assumed for calculating the threshold value for the node score \(RSn_{x_{i}}\). The threshold value monitors the honesty level of the node in our technique and triggers actions according to the honesty level of the node. A node with a reputation score greater than the threshold value is cooperative; otherwise, it is declared as a selfish node. #### 3.3.4 Reputation Score

The reputation score (RS) of the node \(n_{x_{i}}\) will determine the node as honest or selfish by taking values from Equations (23) and (24) and calculating the reputation score of the node in Equation (28):

\[RSn_{x_{i}}=\left(\frac{NSn_{x_{i+1}}+NId_{k}(n_{x_{i}})}{2}\right) \tag{28}\]

were \(NSn_{x_{i+1}}\) is the reputation score of node \(n_{x_{i}}\) throughout the network, and \(NId_{k}(n_{x_{i}})\) represents the scores calculated by all its neighbors. The decision module accepts or rejects the request made by the node by comparing the reputation score with the threshold value. If the reputation score exceeds the threshold value, then the node is trustworthy and will be allowed to communicate; otherwise, it will be declared as a selfish node and isolated to the selfish domain. No communication will be made with the nodes in the selfish domain. A message will be propagated to all the nodes in the community. Algorithm 5 determines the node's behavior as selfish/honest. ## 4 Isolation of Nodes and Punishment

The reputation score determines the node's behavior as honest or selfish. A more honest node in the community means more cooperation among the nodes to enhance the community's performance. However, the selfish nodes can degrade the performance of the community, and some measures must be taken to reduce the number of selfish nodes. If the reputation score is less than the threshold value, the node will be declared selfish and isolated in a separate domain, and nodes will be unable to communicate with them.