# Next-Generation Payment System for Device-to-Device Content and Processing Sharing
## 3 System Model  
We consider a single cell with \(N\) mobile users. A number of the users are assumed to form social clusters around attraction points, such as popular shops in a mall or classrooms in a university campus. The attraction points are assumed to be located randomly with a uniform distribution within the cell, which has a radius of \(R\). Similarly, mobile users within a social cluster are located randomly with a uniform distribution within the cluster radius, \(r<R\). There are also free-roaming mobile users that do not belong to a social cluster. In this study, we assume that users are stationary and leave the analysis of the impact of mobility to future studies. We assume that each video has a number of different quality copies at the content server. A mobile user requesting the video will be able to play the video in a quality level determined by its downlink data rate. The downlink data rate that a mobile user achieves depends on the distance between the mobile user and the source. In this study, we assume a piece-wise constant dependence in the following manner: If the distance between the mobile user and the source is below a certain threshold, \(d_{1}\), the best-quality video is downloaded. If the distance is between \(d_{1}\) and a second-tier threshold, \(d_{2}\), the second-best-quality video is downloaded and so forth up to the cell diameter, \(2R\). A conceivable scenario in this context is that communication around the attraction points is over WiFi, whereas either licensed or unlicensed cellular channels are employed for transmissions over longer distances. Each video is assumed to be encoded in group-of-pictures (GOP) structure, where we assume constant GOP length. In this manner, we can define the video length in terms of the number of GOPs. There are three types of videos:  
1. Short videos: These have lengths uniformly distributed between \(L_{s,min}\) and \(L_{s,max}\) and are played out entirely in sequence. 2. Long videos: These have lengths uniformly distributed between \(L_{l,min}\) and \(L_{l,max}\), where \(L_{s,max}<L_{l,min}\), and they are played out entirely in sequence. 3. Seek videos: These have lengths uniformly distributed between \(L_{l,min}\) and \(L_{l,max}\) similarly to the long videos. However, we assume that the viewer skips through certain portions of this type of videos. After each GOP is viewed, the next GOP is played out with probability \(1-p_{seek}\), whereas the viewer seeks uniformly one of the GOPs in the remainder of the video after this particular GOP with probability \(p_{seek}\). Each video is requested by each mobile user at most once. Associated with each video file \(i\) is a \"popularity index\", \(p_{i}\). The arrival of the requests to video file \(i\) follows a Poisson process with intensity \(\lambda_{i}\) that is proportional to \(p_{i}\). Upon the request of a video file, the mobile user informs the base station. If the requested content is present neither in the cache of the base station nor in any of the mobile users, it is downloaded from the cloud/content server and cached at the base station. In the mean time, the related virtual network function (VNF) co-located at the same computing unit hosting the base station keeps track of the cache of each mobile user and maintains a map of each GOP of each video file. Based on this, the base station informs the requesting mobile user of the other mobile users that have a copy of the next GOP to be played out, as well as their geographical locations. In the light of this information, the requesting mobile user decides the location to download from. If one of the mobile users is selected as the source for the next GOP to be played out, there is a cost attached to it. This cost roughly reflects the energy to be consumed by the provider user for this process. The energy required for transmission of a signal over a distance of \(d\) is inversely proportional to \(d^{k}\), where \(k\) ranges from 2 to 4, depending on the scenario [48].