## 4 The Proposed Routing Protocol: HPA-SR
### The Hybrid-Price Auction Model Process for The Proposed HPA-SR Protocol  
As we can see in Figure 4, a sinkhole attack occurs when a node tries to attack the data of a trusted neighbor by broadcasting fake routing information and then proceeding to the destination node. A sinkhole attack has behavior in choosing the best route in the network. We can solve this problem by using a hybrid-price auction in secure routing to avoid sinkhole attacks. In other words, the source will choose the best route using first or second-price auction to send data transmission to the destination. In this paper, we consider the secure routing protocol based on hybrid-price auction. Therefore, we present the hybrid-price auction model process for the proposed the routing protocol, HPA-SR. In this analysis, we will drive to select the kind of auction model. In secure routing protocol, the sets of players are included as the intermediate nodes and denoted as \(N=1,2,\cdots,n\). Thus, the valuation of each nodes is \(v_{1}>v_{2}>\cdots>v_{n}>0\). The node valuations of the object are assumed to be all different and all positive. We assume that each intermediate node receives a per-packet cost for forwarding packets and that this cost is private to itself. Each node \(i\) bids \(b_{i}\) its outbound link cost, which is reported during the route discovery \begin{table}
\begin{tabular}{c c c c} \hline \hline PN & NN & Cost & SID & DID \\ \hline \hline \end{tabular} The list of packet for the HPA-SR protocol can be summarized in Table 3.  
\end{table} 
Table 2: Routing table of the proposed HPA-SR protocol. Figure 5: The flowchart of the proposed routing protocol: HPA-SR.  
process, and each node \(i\) can only bid one time. We use (3) as the equilibrium of hybrid-price auction. In summary, the hybrid-price auction is the following strategic game:  
**Players:** The set \(I=1,2,\cdots,i\) of the \(n\) bidders. In this case, players are the intermediate nodes. **Action:** Action is what the player will do. In this case, each player will make a bid. **Payoff:** Since \(b_{i}<B_{th}\), the players play the first-price auction. Otherwise, players play the second-price auction. If \(b_{i}\geq B_{th}\), we denote \(\bar{b}\) as the highest submitted by a player other \(i\) as in (4). * If \(b_{i}\leq\bar{b}\), the number of each other player who bids \(\bar{b}\) is greater than \(b_{i}\), then the maximum payoff of the \(i\)-th player is \(v_{i}-\bar{b}\) where \(\max_{p_{i}}\) is not equal to zero. We aim to design an hybrid-price auction that consists of the first-price auction (FPA) and second-price auction (SPA) model to help for determining the route to be chosen by the next node. Based on [35; 37] for either FPA or SPA strategies, let \(b_{i}\) denote the bidding value of the node, \(S_{n}\) represents the session of the network. In this work, the basic concept of the hybrid-price auction can be modeled as a two-state Markov chain with the FPA and SPA states, respectively, as illustrated in Figure 4. In state FPA, the node will use FPA to determine the route to be pursued by the next node, and in state SPA, the node will use SPA to determine the route to be traversed by the next node. The transition of the FPA/SPA strategies can be explained as follows. For illustration, suppose that each node receives an RREP packet from the previous node. We consider remaining energy to get the cost/bidding value because sinkhole nodes and edge servers have unlimited energy while intermediate nodes have limited energy. Thus, we combine the number of hops and the remaining energy of each node to obtain the cost/bidding value. The cost/bidding value is calculated by multiplying the number of hops by the remaining energy of each node, which is expressed as:  
\[b_{i}=\text{hop}_{i}\times ER_{i}, \tag{10}\]  
where \(\text{hop}_{i}\) represents the number of hops of node \(i\) and \(ER_{i}\) represents remaining energy of node \(i\) as explained in Section 4.5. Then, the node will compare the cost/bidding value that is received with the cost/bidding threshold.