# Resource Management and Secure Data Exchange for Mobile Sensors Using Ethereum Blockchain
## 4 Methodology
### MS Operation Module  
The module considers the GN residing in uniform proximity to the AP in a defined deployment within a smart city region. The AP and GN are powered by an edge server, where the resources are provisioned for various operations, e.g., generating updates associated with the real-time condition of the road to the MS, the dissemination of emergency events, and congestion-related information analysis. Considering \(s=(1,2,\ldots S)\), the number of \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Meaning** \\ \hline \(\phi\) & Density of sensors \\ \(s\) & Number of N2N mobile users \\ \(t\) & timeslots \\ \(Tr/Re\) & Transmitting/Receive nodes \\ \(\alpha\) & transmission criticality coefficient \\ \(ds\) & data size \\ \(pl\) & permissible latency of transmission \\ _iden_ & Identity \\ _arb_ & Arbitrary value \\ \(sc\) & security certificate \\ \(\Omega\) & generation of security method \\ \((p,\,q)\) & Non-negative integer \\ \(pr\) & Prime number \\ \(A_{t}\) & Timestamp \\ _pub/priv_ & Public/private key \\ \(\pi\) & Arbitrary number generated by gateway node \\ _incog_ & Incognito coefficient \\ \(tr\) & Trust Score \\ \(sig\) & Signature \\ \(s_{j}/s_{o}\) & Source sensor/target sensor \\ \(Q_{sig}\) & Signal quality \\ \(d_{1}/d_{2}\) & durations required for the N2N and N2S communication modes \\ \(C_{e}\) & Cost \\ \(\chi\) & channel capacity size \\ \(\psi\) & change in the unit price \\ \(in\) & instantaneous channel capacity \\ \(O_{jun}\) & Objective function \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Table of notations. N2N mobile users assumed to possess \(t\) time slots is represented by a discrete probability function once \(s\) number of MSs enter the coverage of specific regions within the smart city. Therefore, the mathematical representation of the density \(s\) number of MSs is expressed by Equation (1). \[\Phi_{s}=Q_{1}\cdot Q_{2} \tag{1}\]  
Equation (1) shows the formation of the density \(\Phi\) of sensors \(s\), which depends on two variables: \(Q_{1}\) and \(Q_{2}\). The first variable, \(Q_{1}\), represents \(O^{S(t)}/S(t)\), and the second variable, \(Q_{2}\), represents \(e^{-O}\), where the attribute \(O\) represents the mean onset score of MS in a specific smart city zone. It should be noted that \(\Phi\) is also influenced by various sets of information that the MS demands during the mobility process to enable seamless communication with another MS or network structure. In addition, the computational burden of GN is controlled by the MS, which occasionally switches between N2N and N2S modes of communication. This switching mechanism is used to access the information stored within the cache from the neighboring MS or the nearest AP. The proposed module considers the dual mode of sensory communication in transmitting _Tr_(N2N) and receiving _Re_(N2N) while adopting the N2N mode of data transmission. The model executes communication strategies mainly within an IoT environment and with less network traffic based on cellular systems. Different numbers of connected N2N modes of communication within the MS are not permitted to exchange their data within the same communication channel. In contrast, only one MS (i.e., \(s_{1},s_{2},\ldots\)) is allowed to pair with another MS in N2N. Simultaneously, the connection (in the form of request and response) of the MS is permitted to be paired with only one AP. This simplified strategy allows each sensor to be free of any possibility of interference. As the MS within the users is free to move at any variable speed within the defined region of a smart city, it is necessary to characterize this topology and connection among the MSs as highly dynamic and intermittent. This situation could introduce security vulnerabilities in the IoT environment. In such circumstances, it is computationally challenging for every individual peer sensor within the N2N mode of communication to be protected from being traced or vulnerable to attackers in IoT.