A Grade-Based Incentive Mechanism for Peer-to-Peer Networks

Free-riding is a desperate and a constant menace to many P2P systems, to violate the cooperation among peers. This study proposes a grade-based approach, which expeditiously maintains fairness in the network by encouraging the high contributed peers and altogether wiping out the free-riders. The Network Contribution Ratio determines the contribution of users globally. Besides, the proposed grading algorithm uses a point-based incentive mechanism which provides credit points to the users with respect to their grade and the transfer of users between each grade is instituted


INTRODUCTION
Peer-To-Peer (P2P) systems are distributed systems which consist of thousands of interconnected nodes. Nodes can join or exit from P2P systems without any control. Main principles of P2P systems are self-organizing and adapt to changing peer populations while providing services for content sharing and personal communications without requiring the support of centralized server or authority. Unlike client/server model, each node in a P2P system plays the role of a client as well as server. These node shares a part of their resources such as content, CPU cycles, storage and bandwidth. By combining the resources of each user's computer or node, it can provide an inexpensive platform for distributed computing (e.g., SETI@home), instant message (e.g., ICQ), cooperative working (e.g., Groove), search engine (e.g., Infrasearch), storage (e.g., Napster) and data sharing that is highly scalable, available, fault tolerant and robust (Tang et al., 2004).
Public attention and acceptance to P2P applications came first from highly popular file-sharing systems such as Gnutella, BitTorrent. The subsequent success of the Skype Internet telephony application showed the generality of the P2P approach and its feasibility to provide acceptable service quality to millions of users. Consequently P2P networking has emerged as a viable business (e.g., IPTV) model and a novel Internet based computing paradigm. Current P2P applications demonstrate that it may become an effective way to build broad range of applications for social networking, information delivery and personal communication in future (Tang et al., 2004). Even though P2P system got popular, its performance is plagued by many problems out of which free-riding problem is investigated. A free rider is a peer that uses the file-sharing application to access content from others but does not contribute content to the same degree to the community of peers. Each node has different character or has their own functions and also they belong to different organizations and individuals with different interests. Here effective cooperative mechanism is lacking and the nodes think of its own interest without doing anything for the benefit of P2P system which leads to the above said problem. This study is focalized to design an approach that provides proper incentives whereby the high contributed peers are encouraged to a high extent and low contributed peers are motivated to share their resources, besides completely eliminating the freeriders. Incentives are the bonuses or the motivators that

Science Publications
AJEAS are provided to a peer to enhance cooperation among all the peers in the network.
The rest of the study is organized as follows. Related work section explores some of the works related to the issue. Next we derive the necessary and sufficient rules to enhance fairness among transactions, which is followed by the description of proposed grading approach. After that modelling of a transaction procedure for any peer in the network to maintain network fairness is shown followed by the discussion of the Simulation results . Finally Experimental evaluation and the result obtained are presented along with the contributions of this study and ends with conclusion.

Related Work
To deal with the issue of free riding in P2P networks, researchers proposed various incentive mechanisms. Some of the incentive mechanisms and its limitations are briefly described below. An experimental evaluation on Gnutella (Adar and Huberman, 2000;Hughes et al., 2005) indicates that 66% of users share no file. 47% of all download is from top 1% users. 99% of all download is from top 25% users. It is due to the absence of a mechanism to monitor the behaviour of any user in P2P network which increases the possibility of free riding.
Bit Torrent (Li et al., 2008), a popular file sharing application, uses a variant of Tit-for-Tat strategy. In Titfor-Tat, if a peer X consumes a block from peer Y, then peer Y has the right to consume a block from peer X in the future. Though it works well with peers having transaction history, it has serious limitations with newly entered peers. Newly entered peers have to produce some blocks initially to start the transaction. A free-rider who is not willing to share his blocks will cheat the newly entered peers by collecting the initial blocks they share. Also, if the newly entered peers at the beginning have no blocks to produce, then the peers will be put in a situation in which they cannot even participate in the transaction itself. It also failed to deal with zero-cost identity or white washing (Feldman et al., 2004a) which occurs when users change their identity and act as new comers or strangers in order to get away from penalty imposed by the network. Asymmetric Transactions are not addressed by Tit-for-Tat strategy (i.e., how other peers have indirectly taken part in contributing to it). Feldman et al. (2004b), an Adaptive stranger policy is used to deal with zero cost identity. This policy works fully on suspicions and can fail to trust the strangers who are really good. In subjective reputation (Lai et al., 2003), a mechanism was designed to reduce the effect of Colluders who make false representation of themselves in order to receive benefits from the network, by making each user to rate the other users transacted with it. Here the limitation is that it doesn't have a mechanism to detect the users who make false rating of one another.
In monetary payment scheme (Feldman and Chuang, 2005), point-based mechanism is introduced. Peers receive points either with cash or by contributing to the network. But, the difficulty with this system is that a separate accounting system has to be maintained and it suffers from scalability issues. The incentive mechanism in (Golle et al., 2001) is based on user generosity to raise the cooperation among users. Some mechanisms try to prevent free riding by exchanging the bandwidth (Garbacki et al., 2007). An experimental study of Bit Torrent (Jun and Ahamad, 2005) says, free riders are not penalized and high contributed peers are not honoured or encouraged.
In the Global Contribution (GC) approach (Nishida and Nguyen, 2010) where the peer gets points or GC value, based on its contribution to the entire network. This approach has a transaction procedure that estimate its GC value with all other peers having the file and based on the predicted GC values, transaction procedure is applied which is difficult to implement. Liu et al. (2010), utility value is calculated based on the contribution and performance of the peer. Here pyramid like rank structure is established based on the utility value. Access to rated files is made with respect to its rank. There are two limitations in this approach. Files are rated on user's perspective and files importance will differ for each user. Next computation cost is more.
The Network Contribution Ratio (NCR) value calculation in the proposed grading approach is similar to Reciprocative Decision Function (Feldman et al., 2004b). Every peer must maintain the normalized generosity (i.e., the ratio of the user i's generosity to the user j'z`s generosity) of all the peers connected to the network to make the transaction. A shared history is maintained which is not feasible to implement in the viewpoint of storage. Of all the approaches proposed, there are no mechanisms that provide added credits to the high contributed peer and fewer credits to the low contributed peer.

Fairness Rule
Let us assume that every user in a network will just desire to download all the files he needs and would like to move over without uploading the files they had downloaded and may also be interested in changing their identities in order to receive benefits from the network and trying to exploit the benefits of other peers in the network. So our model has to meet the following requirements in order to transform such user, a good contributor: • The peers should be motivated such that the total uploaded amount and the total downloaded amount for each peer are made equal Science Publications AJEAS • The system should be self-managed to restrict the freeriders to download unless he uploads to the network • Each peer should be made to strictly commit to the actions imposed by the system so that the system would remain strong against collusion and whitewashing • The credit points provided should be purely based on the peer's contribution and no initial credit points are provided for newly entered peers thereby preventing free-riding

Proposed Grading Approach
In this article, a grade based approach is proposed where the Network Contribution Ratio (NCR) determines the contribution of each peer to the entire network and based on the calculated NCR value, each peer is given a grade. The Grade determines the amount of Credit Point (CP) that the Peer has to receive or spend for each unit of data transfer. After uploading or downloading each unit of data, the NCR value is recalculated and the peer switches between different grades respectively. The peer is allowed to download only if it has sufficient CP with respect to its grade. Unless a free rider uploads the data to the network, free rider will be unable to download the file he needs. This section first defines some keys to determine the credit points and grade, to be granted for peers and then defines the grading approach.

Determining Credit Points
In considering the fairness rules, the following keys are adopted, in order to encourage the high contributed peer and also to motivate the low contributed peer to share his data.
• The peer's Credit Point (CP) should be increased when it shares or uploads data to the network • The peer's Credit Point (CP) should be decreased when it consumes or downloads data from the network • The peer in the higher grade should get more Credit Points (CP) for uploading data than the peer in the lower grade i.e., Credit Points given for uploading in Grade g > Credit Points given for uploading in Grade g+1, where g = 1, 2, 3, 4 • The peer in the lower grade should lose more points for downloading data than the peer in the higher grade. i.e., Credit Points deducted for downloading in Grade g < Credit Points deducted for downloading in Grade g+1, where g = 1, 2, 3, 4

Terminologies
The following terms are used in the proposed Grading approach.

Credit Point (CP)
The proposed Grading approach assigns a grade to every peer based on its contribution to the entire network. Based on the grade, the Credit Points are allotted accordingly. Peers are benefitted from the network by incurring Credit Points (CP).The peer is allowed to download only with this CP. Downloading the data will decrease the CP and uploading the data will increase the CP.

Total Uploaded (TU)
The Total Uploaded (TU) determines the total amount of data uploaded by the peer to all the peers connected globally, from since the peer entered into the network.

Total Downloaded (TD)
The Total Downloaded (TD) determines the total amount of data downloaded by the peer from all the peers connected globally, from since the peer entered into the network.

Network Contribution Ratio (NCR)
The proposed NCR (Network Contribution Ratio) determines the contribution of the Peer to the entire network. It is the ratio of total amount of data uploaded (TU) to the total amount of Data Downloaded (TD): Based on the NCR value, a grade will be allotted. Based on the grade, the CP will be provided accordingly.

Grade
Grade is allotted to the peer based on the calculated NCR value. It determines the amount of Credit Point (CP) that: • Will be given to the peer for uploading 1 unit (e.g., 1MB) of data • Will be deducted from the peer for downloading 1 unit of data In considering the keys to allot credit point for each grade, the peer in the higher grade is set to get more points for uploading data than the peer in the lower grade. Similarly the peer in the lower grade is set to lose more points for downloading data than the peer in the higher grade.

Steps to Determine Grade
The following steps are adopted to determine the grade of the peer. These steps are calculated by the network once after uploading or downloading 1 unit of data: • Calculate the Total Uploaded (TU) amount and the Total Downloaded (TD) amount of the peer from since the peer joined the network: where, ∑pu denotes the total amount of data uploaded by the peer P and ∑pd denotes the total amount of data downloaded by the peer P Calculate the Network Contribution Ratio (NCR) of the peer.

∑ ∑
where, Pncr denotes the contribution of the peer to the entire network.
Allot the grade to the peer with respect to the calculated Network Contribution Ratio: where, Pg denotes the grade of the peer P based on the calculated pncr.
Calculate the total credit points available (CP avail ) subsequently for uploading or downloading 1 unit of data.
For uploading one unit of data to the network Eq. 1: For downloading one unit of data from the network Eq. 2: where, g = 1, 2, 3, 4 and CU g = Credit points allotted for uploading in Grade g which takes the value as given below: 2 g = 1 1.5 g = 2 CUg = 1 g = 3 0.5 g = 4        Also, CD g = Credit points allotted for downloading in Grade g, which takes the value as shown in the following Table 1-3: The following section describes how each peer follows a simple procedure to maintain network fairness and how the steps mentioned above prevent free-riders and motivates the peer to contribute more to the network.

Transaction Procedure
A transaction procedure is described to keep the network fair. Each peer has to follow this simple procedure to receive credits from the network. Then the transaction of a newly entered peer and a high contributed peer is shown. The grade and the available credit points for uploading or downloading each unit of data (Assumption each unit of data-1MB) will be updated in the network. The procedure is as follows.
Search for peers who have files the downloader needs. (TU/TD) Initially, the peer will be in the 4th Grade In 4th Grade, a peer requires 2 CP to download 1 unit. Since his CPavail is 0, he cannot download and can only upload He has not yet uploaded, so his TU is 0 He has not yet downloaded, so his TD is 0 The NCR is 0 (we have to consider 0/0 as 0)  ) b 0.5 The peer is in 4th Grade Since in 4th Grade, uploading 1 unit of data yields 0.5 CP, he earns or receives 0.5 CP Since he uploaded 1 Unit of data, his TU increases to 1 He has not yet downloaded, so his TD remains 0 Now his NCR is recalculated which is 1/0 that should be considered as greater than 1 and his Grade changes to 1st Grade The peer is now in 1st Grade, so with 0.5 CP, his Dmax=1 i.e., he can download 1 Unit of Data

AJEAS
If α is the size of the file (in units) to be downloaded and Dmax being the maximum units a peer can download from other peers. Then 0 < α < Dmax: where, avail g CP Dmax = CD and CD g = Credit points allotted for downloading in Grade g, where g = 1, 2, 3, 4. Since the CP avail and grade will change after downloading each unit of data, we cannot exactly predict the value of α. However, the prediction of α helps the peer to stay in the higher grade and enjoy the benefits of it. If the downloading peer has sufficient Credit Points (CP) to download for each unit of data, with respect to its grade, then the requested unit of data can be downloaded from the selected peer.
If the downloading peer has insufficient Credit Points (CP) to download a unit of data with respect to its grade (i.e., Dmax<1), then the peer must upload some units of data which will yield him the required Credit Points (CP) to continue downloading.
The third step in the procedure may happen even for the peer who predicted the α value before downloading the file, since, the CP avail though, may seem to be sufficient before downloading, it may be keep on decreasing more so that it gets reflected in the grade and the peer may be unable to download further. To avoid this condition, it is good for the peer to upload more amounts of data when compared to the amount to be downloaded to the network. Free-riders can be prevented effectively through this approach.

.5 The peer is in 1st Grade
In 1st Grade, since uploading 1 unit of data yields 2.0 CPs, the CPavail is 2.5 He has uploaded another 1 unit of data, so his TU increases by 1 He has not yet downloaded, so his TD remains 0 Now the NCR is recalculated which is 2/0 and that should be considered as greater than 1 and so he retains his grade The peer stays in 1st Grade He has 2.5 CP. With 2.5 CP, his Dmax=5 i.e., he can download 5 Units of Data, since 1st Grade requires just 0.5 CP to download 1 Unit

Transaction of a Newly Joined Peer
In the beginning, it may seem that the peer hit 1st grade so quickly with little effort. The fact is that the peer will just drop as fast as it attained the topmost grade. To retain the 1st grade, it should keep its NCR value greater than 1, which is possible only by maintaining his TU greater than the TD. In the following Table 4-13 it is clearly illustrated.
From the previous illustrations it is clear that, whenever the downloaded amount exceeds the uploaded amount even by 1 unit, then the peer cannot download further data or it will fall from its current grade to lower grades. Thus the proposed Grading approach effectively keeps the free rider out of the P2P network and prevents the normal user turn to a free-rider. The free-rider, in order to sustain in his grade, must keep his NCR value at a reasonable rate, which is possible only by uploading or sharing the data. Also this proposed grading approach ffectively distinguishes a Good contributor from a new comer and maintains fairness in the network. The peer stays in 1st Grade He now loses 0.5 CP, since 1st Grade demands 0.5 CP to download per unit of data He does not upload and so his TU remains the same He has downloaded 1 unit of data, so his TD increases by 1 Now his NCR is recalculated which is 2/1 and that is 2 (Greater than 1) and he retains his Grade. The peer stays in 1st Grade Now he has 2 CP. With 2CP, his Dmax=4 i.e., he can download 4 units of Data, since 1st Grade demands just 0.5 Credit Point todownload 1 unit of data  (2), since 1st Grade demands 0.5 CP to download per unit and so it loses 0.5 CP He does not upload and so his TU remains the same He has downloaded 1 unit of data, so his TD increases by 1 Now the NCR is recalculated which is 2/2 and that is 1 (Eq. 1) and so he retains his Grade The Peer stays in 1st Grade He has 1.5 CP. With 1.5 CP, his Dmax=3 i.e., he can download 3 units of Data, since 1st Grade demands just 0.5 CP to download 1 unit of data. The peer stays in 1st Grade He now loses 0.5 CP, since 1st Grade requires 0.5 CP todownload per unit of data He does not upload and so his TU remains the same He has downloaded 1 unit of data, so his TD increases by 1 Now his NCR is recalculated which is 2/3 and that is 0.66 (Lesser than 1) and so he falls to 3rd Grade. The peer now falls to 3rd Grade He has 1.0 CP. With 1CP, he cannot download further i.e., Dmax <1 Unit, since 3rd grade demands 1.5 credit point for 1 unit of download (TU/TD) At some time-n, since the peer is a good contributor let us assume that he is in 1st Grade Since he is a Good Contributor, he might have been in the 1st grade for a long duration and so, for uploading each unit, he might have got 2 CPs. So let us assume that he has 5000 CP by uploading 2500 Units by remaining in the 1st Grade Let us assume that his TU is now 3,000 units Let us also assume that his TD is now only 1,000 Units Now his NCR is 3 (i.e.,) 3000/1000 Since he is in 1st Grade, with 5,000 CPs, his Dmax = 10,000 units i.e., he can now download 10,000 units of Data, unless his NCR falls below 1. (TU/TD) The Peer is in 1st Grade He loses 0.5 CP, since 1st Grade demands 0.5 CP to upload 1unit He does not upload and so his TU remains the same He has downloaded 1 unit and so its TD now becomes 1001 Now his NCR is recalculated which is 3000/1001and that is 2.997 (Greater than 1) and so he retains his grade as shown in the following table He is now in 1st Grade and so his Dmax = 9,999 units i.e., he can now download 9,999 units of Data with the available 4999.5 CPs, since 1st Grade demands 0.5 CP to download per unit Above simulation is depicted in Fig. 1. Here a peer is promoted to higher grade if upload increases and its grade level decreases with more download than upload which prevent the presence of free riders in the network.

Transaction of a Good Contributed Peer
From the previous illustrations, it can be clearly said that for each unit of data downloaded by the Good Contributor, his NCR decreases gradually only in Fractions.   He enjoys the benefits of the 1st grade for a very long time. It will be cut off only when his NCR value falls below 1, which happens only when his TD is greater than the TU. Let us see how this occurs in another illustration. Let us assume that the Good contributor was been downloading data and not been uploading any unit after since TU = 3000. In Fig. 2, we assume some constant values for TU=400MB and TD=300MB. It shows the maximum amount that can be downloaded with respect to different grades. Download amount increases when the peer remains in higher grade and it decreases when the peer remains in lower grade. Even at this point, unlike

Science Publications
AJEAS the newly entered peer, who rapidly loses his grade on downloading each unit of data, the good contributor remains in the top Grade for a very long time since the NCR value changes gradually (in fractions). But now we have considered a situation in which the good contributor does not upload any data and only downloads. Since a good contributor will keep on uploading data while downloading, practically such a situation will usually happen rarely and thus he will remain in the top grade forever. Thus this proposed grading approach effectively eliminates free riding as well as recognizes and encourages the good contributor by keeping him in the topmost grade for a longer time as possible.

Experimental Evaluation
The proposed Grading approach effectively prevents free-riding in the network. This approach considers that the newly entered peer would have some initial amount to upload to the network.
But in case, if the newly entered peer has no files to share then starvation occurs. To prevent starvation we can maintain the grade of all peers and when the peer searches for a file, the grade of all the peers who have the particular file is determined and the downloading peer is made to download the file from the uploading peers who is in the last grade.
Let C be the downloading peer and Table 1 shows the list of all the uploading peers who have the file searched by peer C. From the table it is clear that, Peer D and peer G are in the last grade. So C can choose D or G to download the file. This approach can efficiently prevent starvation since the grades will be keep on changing and so all the peers can actively participate in the transaction.

CONCLUSION
The proposed Grading approach, almost efficiently deal with free rider challenges faced by the P2P network. There are also some security problems to be considered which may completely retard the growth of the P2P network and so an effective mechanism can be developed in future to enhance the secure transmission of data. Also, the peers may upload some files which are of no use and may gain more CP. Though there are various rating mechanisms which rates the files, most approaches rates the file on user's perspective. So the future work is to encourage the peers sharing the rarest or most important files which are not easily available. The Grading approach, thus completely eliminate the freeriders by forcing them to share their resources and encourage the high contributed peers by making them stay in top grade and thereby enjoying the benefits of it.