# NB-IoT for D2D-Enhanced Content Uploading with Social Trustworthiness in 5G Systems
## 4 Cooperative Multihop D2D-Based Data Uploading  
We consider a single LTE-A cell with multiple devices interested in uploading their content to the Internet by adopting an _in-band NB-IOT_ solution. Data uploading according to the traditional _cellular-mode_ is performed through the activation of separate links from each device to the eNodeB. The alternative solution proposed in this paper is the cooperative content uploading controlled by the eNodeB (i.e., network-assisted D2D), where the UE organizes itself to form a \"logical multihop D2D topology\" and cooperates in uploading the content generated by _all_ the involved devices. The cooperative topology formation is implemented according to a game theoretic coalition formation model as proposed in [10]. In the formed cooperative topology, the user equipment (UE) located farther from the base station relays its content to nearby UE and only the UE playing the head-end role in the topology, the so-called _gateway_, is in charge of uploading all the contents received from the rest of the UE to the eNodeB. The UE with the best link quality in the coalition is chosen as the gateway and may receive (if needed) all the radio resources that would have been separately allocated by the eNodeB to the UE in the coalition. Of course, since NB-IoT technology is used, in this case the radio resources are \"tones\" rather than the classic definition of resource blocks (RBs). For example, a channel bandwidth of 20 Mhz corresponds to 100 RB of LTE-A. The RB corresponds to the smallest time frequency resource that can be allocated to a user (12 sub-carriers) in LTE. The intermediate UE in the topology also acts as _relays_ for the contents received from the upstream UE. In doing this, they benefit from the higher quality of the short D2D links with respect to the direct cellular link. In the most general configuration, each relay has one or more links active to receive data from the preceding sources in the topology, and one single link active to relay data (its own generated traffic and the traffic from the incoming D2D links) to the subsequent UE in the topology. Each UE operates in half-duplex mode; thus, it either receives or transmits in a given transmission time interval. We consider a reasonable assumption for _rational_ self-interested devices, that each UE uploads its own generated content first and then the content received by the preceding UE in the topology. In particular, the transmission starts only after the generic UE has received the whole content (in other words, UE uses the decode-and-forward relaying protocol). We remark that all the transmission between one single device towards the eNodeB exploits the NB-IoT tones, whereas D2D links are activated over the legacy LTE spectrum (thus using RBs instead of tones). The motivation of this choice is driven by the fact that NB-IoT does not yet support proximity-based transmission even if this feature is actually been discussing during the 3 GPP Release 15 standardization. In realistic scenarios, end-users may not be aware of whom they are going to be connected to and _malicious_ devices may decide to either modify the received content before forwarding a corrupted packet or drop data packets they are expected to forward without informing the interested users. In the remainder of the paper we will refer to these two different types of malicious nodes as _type A_ and _type B_, respectively. Whenever a malicious node in the coalition either modifies or drops the data packets, we assume that the source node will be informed by the eNodeB and will perform standard data uploading. This will introduce both a delay in the data delivery and an increase in the energy consumption for the involved nodes. However, there is a difference, since the effect of a _type B_ malicious node is identified earlier than the effect of a _type A_ (note that type A malicious nodes are present only when unencrypted payloads are delivered) node.