This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE Globecom 2010 proceedings.

Odd for Even: A Selfishness Prevention File Swap Scheme for

Wang, Miao1, 2 Zhang, Yujun1 Li, Guojie1 1 Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China 2 Graduate School of Chinese Academy of Sciences, Beijing 100049, China {wangm, zhmj, lig}@ict.ac.cn

Abstract—The current BitTorrent-like systems volume of the free-riders etc. suffer from peer selfish behaviors. The uncooperative peers can freeload the compliant peers by various methods. To prevent the Being complementary to the current BitTorrent system, this selfishness, this paper presents a file swap scheme, also known as paper presents odd for even: a selfishness prevention file swap Odd for Even (OFE), as an enhancement to the current scheme for BitTorrent (OFE). OFE designs a file piece swap BitTorrent. With OFE, the file is segmented into odd and even policy between leechers: the initial file distributor divides the pieces; the peers swap the pieces according to “odd first, even file into odd and even pieces; leechers barter these pieces later” rule. To study the performance of OFE against the selfish consistent with “odd first, even later” rule. Specifically, a peer behaviors, a modeling for the related factors is established. We must upload an odd piece to its neighbor for its desired even suggest that by using an appropriate file segmentation policy, the piece; any leecher who receives an odd piece but refuses to free-riders who don’t make any contribution will undergo a give the even one will be chocked forever by its neighbor. As longer download time; the semi-free-riders who only upload odd a result, leechers are motivated to exchange file pieces with pieces, deliberately refuse to provide the even ones to save up half each other and deceivers would be penalized by a longer upload volume will not get their burden lessened. The complete time. We also analyze the correlation among the experimental results show that OFE can punish these selfish download time, the saved upload volume of selfish leechers peers effectively. and other variables including the peer arrival rate, the number of file pieces etc. The experiments show that OFE can Keywords-BitTorrent; file swap;incentive; selfish effectively strike selfish peers and incentive peers to share more resources. I. INTRODUCTION P2P system is designed based on the hypothesis that all II. BITTORRENT OVERVIEW peers in the community would act unselfishly and collaboratively. All participants service each other with their In BitTorrent, a file is divided into multiple pieces. Peers contents and bandwidth. However, without any incentives in download, meanwhile upload the file pieces, and ultimately the system, all peers would tend to be rational and selfish. The own the file. As shown in Fig.1, BitTorrent is composed of selfishness phenomenon has been observed in recent literature. five parts: a group of seeders, a group of torrent files, a web Adar and Huberman [1] report in Gnutella, 66% peers are server, a tracker, and a great number of leechers. free-riders; 73% peers share less than 10 files. Another − The seeder is a peer who has all the pieces of the file but popular P2P file sharing system, eDonkey is also experiencing stays in the system to allow other peers to download 80% free-riders [2]. Study has shown that the selfishness can severely undermine the P2P overall performance [3]. − The torrent file contains meta-data information of the file to BitTorrent [4] is a P2P file distribution protocol whose be downloaded, which includes IP addresses of the tracker, traffic accounts for 27-55% of all Internet traffic [5]. It was the file name and size, and the hash values of individual file usually believed that BitTorrent’s built-in mechanisms pieces for verification including tit-for-fat (TFT) and Optimistic Unchoking strategies would be able to address the selfishness [6][7]. But recent

studies reveal that the protection is not enough especially in file transfer fragments front of some vulnerabilities, for example, large view exploit[8][9][10] and Sybil[11] etc. With these attacks, the selfish peers can still freeload leechers and seeders, and then achieve the bandwidth equal to or better than the common peers. Currently some optimized incentive approaches for BitTorrent are documented. However most of them only focus on the algorithm, and miss the corresponding modeling for the involved factors, such as the download time, the saved upload Figure 1. BitTorrent overview

This work was supported by the National Natural Science Foundation of China, No. 60803139 and the Key Technology R&D Program of China, No. 2008BAH37B02.

978-1-4244-5637-6/10/$26.00 ©2010 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE Globecom 2010 proceedings.

− The web server provides a website for the torrent files to be IV. OFE MECHANISM published OFE targets the piece exchange between leechers, thus is − The tracker keeps track of all participating peers and helps compatible with other seeder bandwidth allocation or leecher the peers find each other to swap the file pieces selection algorithms to protect from free-riding. This section first specifies the basic principles of OFE, then explains the − The leecher is a peer who only has a portion (or none) of anti-selfish-behaviors nature of OFE, last builds a modeling to the file and does downloading and uploading depict the selfish behaviors in OFE. The torrent file, tracker, leechers, and seeders constitute a BitTorrent swarm. Initially, the seeder segments the file into A. Basic Principles pieces of fixed size (typically 256KB), creates a torrent file, OFE only changes the file piece swap protocol between posts it on a web server and registers to the corresponding leechers, and leaves other parts of BitTorrent unchanged. tracker. Leechers can still employ TFT and optimistic unchoking To download a file, a leecher first retrieves the torrent file strategies to pick the download candidates. from the web server and queries the tracker of the file for a In OFE, the first distributor divides the file into n M-sized partial swarm view. The tracker returns a random list of peers odd pieces and n m-sized even pieces ( M ≥ m ). During the in the swarm. Next the newcomer attempts to establish a piece exchange, peers comply with the “odd first, even later”, connection to each peer in that list; and becomes one neighbor that is, if one leecher wants an even piece from one of its of the peer if the request is accepted. Then the leecher finds neighbors, it needs to upload an odd piece first, then the out the file pieces in each of its neighbors by exchanging a bit- neighbor repays with the even piece that the sender expects. A field message. The leecher picks pieces from its neighbors leecher who delivers an invalid odd piece or who receives the based on the piece selection algorithm such as Local Rarest odd piece, but rejects (beyond a timeout) to upload in return First policy. will be choked eventually. Initially, all neighbor connections are choked (no data transition). For effectiveness and fairness, BitTorrent adopts B. Analysis TFT (tit-for-fat) policy and optimistic unchoking policy to 1) Countering Selfishness Behaviors unchoke a neighbor. In order to encourage users to upload and Free-riding is a typical selfish behavior in BitTorrent. Free- guard against free-riding, BitTorrent utilizes TFT strategy: each riders only download file pieces without uploading. Because peer only opens its outbound bandwidth to a fixed number of of “odd first, even later” rule, a free-rider can’t get the even the peers (4 by default) of the highest downloading rate. On the pieces from any peers except seeders. However since a seeder other hand, to allow each peer to explore the downloading rates is arbitrarily returned in the peer list from the tracker and the of other peers and bootstrap newcomers, the optimistic total number of seeders is always minor, the selfish peer unchoking strategy is used: each peer randomly chooses a doesn’t likely usually come across a seeder. As to the odd requesting leecher to upload regardless of its downloading rate. pieces, the selfish peer can free-ride compliant peers only once Typically, TFT is performed every 10 seconds while optimistic according to the piece swap strategy. If all current neighbors unchoking is attempted once every 30 seconds. are already fooled, it has to wait for new neighbors or new participants. With large view exploit, the uncooperative peer can repeatedly request peer list to expand its neighborhood, III. RELATED WORK thus increase the likelihood of discovering seeders, existing To tackle selfish behaviors, Jun and Ahamad [12] suggest to and new users, and then accelerate the download process. But replace optimistic unchoking by k-TFT scheme with which as long as we determine a large piece number, we argue in the peers continue uploading to others until the deficit (the upload next section that this method can’t help free-riders to shorten amount minus the download amount) exceeds some niceness the download time. number k. Reference [13] develops an auction-based model which enables a proportional-share unchoker to yield faster A selfish peer can be more strategic and compromised downloads against the original BitTorrent. Reference [14] where there are few seeders or limited bandwidth from proposes a seed bandwidth allocation strategy based strictly on seeders. To receive the even file pieces, it may act faithfully to the uploading rate of peers to prevent free-riders from getting upload odd pieces. But upon receiving odd pieces, it denies to benefit from seeders. send even ones as payoff to save half upload times, which is called semi-free-riding. This approach doesn’t need to In order to understand the performance of BitTorrent download any even pieces from seeders, however similar to system, Yang and Veciana [15] propose a Markov chain the discussion above, the download time for odd pieces may model to sketch the service capability of BitTorrent. Inspired also depend on the newcomer arrival. Moreover, the upload by [15], Qiu and Srikant [7] setup a simple fluid model to amount of semi-free-riders will not be saved much if the size describe the dynamics of the BitTorrent system. In [14], a two- of odd and even pieces is selected carefully. class fluid model based on [7] is introduced to study the free- riding behaviors on BitTorrent system. Reference [16] Sybil attack [17] can be avoided by strict user registration, characterizes the design space of BitTorrent protocol and login process and address detection [18] etc. In the paper, we stresses the fundamental trade-off between performance and presume the solution for Sybil is in place. fairness for BitTorrent protocol. 2) Model Analysis of Selfish Behaviors

978-1-4244-5637-6/10/$26.00 ©2010 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE Globecom 2010 proceedings.

If a mechanism can deal with the large view exploit attack, download Mlc ( lc odd pieces) in a very short period (since no it should also work well for the general free-riders. So we download bandwidth limit). And the downloading bandwidth assume the selfish peers uses large view exploit in the of the left odd pieces from the upcoming leechers for the free- following analysis and the simulations. rider is related to the arrival rate of the newcomers, thus can λ We also have the following assumptions which are be denoted as M c . Then we derive the odd pieces download consistent with reference [16]: 1) each peer always has SMlmnMnMlnl−− − − time from leechers t o ===ccc and the available pieces so that it can upload these pieces to others f λλλ MMccc without breaks; 2) peers arrive the system according to a mn Sl Poisson process with an arrival rate λ , seeders depart at rate even piece download time from seeders t e == p . c f bl + λ s (1)kbls q (service time is modeled as exponential distribution); 3) lp peers won’t abort during the downloading session; upon It’s easy to know tSlble ≤ ()()2 , t e has upper limit. Hence, completion of a file download, the peers becomes seeders; 4) f psf the uploading bandwidth are identical for all peers, the to prolong the download time of the free-rider, we need even o downloading bandwidth are unlimited. The notations used are larger t f and n. described in Table I. Sl λ We first compute the average download time of the Theorem 2 If nl>+ pc , the download time of the c + compliant peers in an ideal scenario where all leechers behave (1)kbls

in accordance with “odd first, even later” requirement. Then a free-rider t f is dependant on the piece number n and free-rider or semi-free-rider is supposed to join the swarm. We [](1)knklSl+− formalize the behaviors of the selfish leecher; demonstrate t = cp. f (1)knblkSl++λ how to select the number of file pieces and the size of odd and s cp even pieces to purge the free-riders and semi-free-riders. oe=−()λ >=() + Proof: tnlf ccf tSlkbl() p(1) s, iff. From Little’s law [19], in the steady state, the user number = λ in the group can be evaluated by ltccc and the seeder Sl λ nl>+ pc . number would be l =+1 λλ (suppose the original file c + (3) s cq (1)kbls distributor won’t depart the system). So the average bandwidth oe> If ttf f , the selfish peer will download odd pieces from from seeders for all compliant leechers can be denoted as seeders as well. Then the complete time is bls lc . Actually a seeder only shares its bandwidth among its kSl lp neighbors, a specific selfish peer can find all seeders via S − c SMl− + [](1)knklSl+− ==c (1)kn = cp. large view exploit, then gains the bandwidth bls lp . Usually, if t f (4) bl bl kSλ (1)knblkSl++λ ssc++Mλ s cp there are a great number of seeders, some prevention from llknc (1)+ freeloading seeders is needed along with OFE. For simplicity pp in our analysis, we assume that most of leechers would offline The time is the increasing function of n. Thus, if we make more file pieces, the download time will be up accordingly. quickly after they are done, ls is quite small and satisfies

< . llsp2 (1) ⎛⎞λλ()++ Theorem 1 If all leechers comply to the “odd first, even Slpc k bl s bl c S c l cp l Theorem 3 If nl>+max⎜⎟ , , later” rule, then in the steady state, the leecher number will be ⎜⎟c (1)kbl+ ()kllllllb++−1 () ⎝⎠s ps pc sc lSblb=−()λ , and the average download time will be ccs then the download time of the free-rider will be longer than =−()()λλ tSblbccsc. that of the compliant peers. Sl λ Proof: From the above analysis, we can derive an equation Proof: If nl>+ pc , the download time of the free- c + as to the complete time of the compliant leechers ( tc ) and (1)kbls Sl rider will be determined by the download of odd pieces. Hence, leecher number ( l ), t ==c . To solve the equation, c c bl λ [](1)knklSl+− Sblλ − s + b c tt=>=cp cs, iff. fc++λλ lc (1)knblkSlscp b c we can get kbl()++ bl Sλ ll =−()λλλλ = =−()(). > sc ccp. lSblbtlccsccccsc, Sblb (2) n (5) ()k++−1 () llllllb ps pc sc < +−> Note that because (1) llsp2 , then llps ll pc ll sc 0 . A free-rider who doesn’t supply any outgoing bandwidth can acquire even pieces only from the seeders, and odd pieces Consider the extreme situation where there exits only one from both the seeders and the leechers. When the free-rider seeder, k is very large, we will have

joins, there are lc leechers already in the group and it can

978-1-4244-5637-6/10/$26.00 ©2010 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE Globecom 2010 proceedings.

kbl()++ bl Sλ ll Sblλ + Proof: From M =+()(kS() k1 ) n , we derive n >≈sc ccp cc. Briefly, the number ()++−() kllllllb1 ps pc sc b ()nlM− kS ttoe=>=c , iff. ff+ should be greater than the sum of the existing leechers and bls + λ ()kb1 M c number of newcomers during the average complete time. lp

[](1)kblkSl++λ n > ccp. (6) The semi-free-riders can obtain odd and even pieces from (1)kllb+−() both leechers and seeders and save half upload. Imagine a ps < −> semi-free-rider exchanges all its even pieces by uploading odd Note that because (1) llsp2 , then llps0 . ones, the download time will depend on its uploading If odd pieces consume more time, the semi-free-rider will bandwidth tnMbkSkbe ==() ()(() +1 ) . The semi-free-rider f use the seeders’ bandwidth, can download odd pieces from both seeders and leechers kS kSl ()nlM− − c concurrently t o = c . If ttoe≤ , the final complete time ()nlM− kkn++1( 1) ()nlkSl− f bl f f tt==o c = = cp . s + λ ff λ (7) M c bl bl kS (1)knblkSl++λ l ssc++M λ s cp p c + llknpp(1) t will be within ()(kS() k+1 ) b , which is obviously much f It is easy to see that the time is the increasing function of n. close to the download time of compliant users. If ttoe> , t f f f will be dependent on the piece number n. In this situation, a rational selfish peer won’t download any even pieces from the Theorem 5 If seeders; otherwise, the odd pieces download would take more ⎛⎞[](1)kblkSl++λ ⎡Sbllkllλ ++()⎤ time. n > max⎜⎟ccp , ⎣⎦csccp, then ⎜⎟(1)kllbklllkllb+−()⎡⎤()() +−+ 1 [](1)kblkSl++λ ⎝⎠ps⎣⎦ scp cs Theorem 4 If n > ccp, the download time of the download time of the semi-free-rider is longer than that (1)kllb+−() ps of the compliant peers.

the semi-free-rider t f will depend on the piece number n and [](1)kblkSl++λ ()nlkSl− Proof: If n > ccp, the odd pieces account for t = cp . (1)kllb+−() f ++λ ps (1)knblkSls cp ()nlkSl− Sblλ − the complete time. tt=>=cp cs, iff. fc++λλ (1)knblkSlscp b c TABLE I. NOTATION DESCRIPTION λ ++() Notation Description ⎡Sbllkllcsccp⎤ n > ⎣⎦. (8) S Size of the file ⎡ ()()+−+⎤ ⎣klscp l l k1 ll cs⎦ b M Size of odd pieces Note because (1) ll< 2 and k ≥1 , then m Size of even pieces sp kl()()+−+> l l k10 ll n Number of file pieces, nSMm=+() scp cs . k Ratio of odd piece to even piece, kMmk=≥ (1) Similarly, consider the extreme situation where k is very b Uploading bandwidth of peers large, and there exist only one seeder, λ λ ++ c Arrival rate of a new leecher ⎡Sbllkll()⎤ λ Slb+ >≈⎣⎦csccp cc λ n . q Departure rate of a seeder ⎡⎤()()+−+ b ⎣⎦klscp l l k1 ll cs b t Average download time of compliant peers c t f Download time of the selfish peer Theorem 6 The ratio of the saved upload amount of a semi- t o f Odd pieces download time of the selfish peer free-rider to the upload amount of a compliant peer is e Rk=+11(). t f Even pieces download time of the selfish peer s l c Average number of leechers in the swarm Proof: The upload of a normal leecher would be: l Average number of seeders in the swarm s =⋅+⋅. GMnmnc (9) l p Number of neighbors of each peer The semi-free-rider can save n pieces m-sized even pieces: G Upload amount of a compliant leecher c =⋅. GMnf (10) Gf Upload amount of a semi-free-rider Ratio of saved upload amount of a semi-free-rider to upload The ratio of the saved upload volume of a semi-free-rider to Rf =− upload volume of a compliant peer is amount of a compliant peer, Rfcfc()GGG

978-1-4244-5637-6/10/$26.00 ©2010 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE Globecom 2010 proceedings.

RGGGmMmk=−() =() +=+11(). (11) against the arrival rate of peers. It can be observed that the fcfc download time of compliant peers is independent of the arrival rate of peers while the download time of selfish peers drops sharply with the growth of λ . It implies that more peers join, From Theorem 6, the saved upload ratio Rs relies on k. c When k = 1 , the sizes of odd and even pieces are equal, semi- selfish peers can download faster. free-rider can save 1/2 upload. If k gets larger, the interest for Next, we do comparison of the performance of BitTorrent the semi-free-rider decreases. and BitTorrent with OFE. In the following tests, n = 8192 , = λ = We can conclude so far: 1) selecting a large n, the selfish k 15 , c 1 . peers will need a long wait time for new users to complete download; 2) a greater kMm= results in a smaller R . Fig.5 compares the download time of BitTorrent and OFE s against selfish peers percentage. When the selfish peer Note that download time in this section is evaluated in percentage gets greater, the download time of both theory. The real complete time may be influenced by the mechanisms rises. However the download time difference selfish peer percentage and the unchoking policy. between compliant peers and selfish peers in OFE is Additionally, since OFE serializes the upload/download accentuated. OFE is successful in penalizing selfish peers in sequence, the utilization of bandwidth could be degraded. This effect by increasing their download time. can be addressed by increasing the number of unchoked Fig.6 compares the upload amount per peer of BitTorrent neighbors of each peer, for example, from by default 4 to 8. and OFE against selfish peer percentage. As the relative population of selfish peers increases, the upload amount of V. SIMULATIONS compliant peers in both mechanisms ascends. The free-riders We conduct experiments to test OFE on the Pentium IV do not share resources, thus the upload capacity is 0. Semi- 2.66 GHz, 2GB system; the test is implemented in C++ based free-riders in OFE mechanism upload more with more selfish on the BitTorrent Protocol Specification [20]. peers.

40000 A. Experimental Setup compliant nodes Different from previous work in which peers join the 35000 free-riders semi-free-riders system simultaneously, in our simulations peers arrive 30000 according to a Poisson process with an arrival rate λ and quit c 25000 right after they are done. Only one seeder exists ( λ =∞). q 20000 Selfish peers leave the system when the elapsed time is 50 times of the average download time. The file size is 128MB. 15000 The uploading bandwidth is 800Kbps and there are no 10000 constraints on the downloading bandwidth. The neighborhood 5000 = Time (s) Completion Download size is l p 50 . To run into the steady state, the tests need 0 [4096, 65536] peers to join respectively. 1024 2048 3072 4096 5120 6144 7168 8192

B. Experimental Results Number of File Pieces (n)

First, we inspect the impact of the number of file pieces (n), Figure 2. Download time of peers against number of file pieces = the ratio of odd piece to even piece ( kMm/ ), and the arrival ( P =10% , k =15 , λ =1 ) λ c rate of peers ( c ) on the performance of OFE. In the following experiments, the percentage of selfish peers is set to P=10%. 200000 compliant nodes free-riders k = 15 λ = 1 Let and c , Fig.2 shows the download time of 160000 half free-riders peers against the number of file pieces. In the figure, the download time of compliant peers remains nearly unchanged 120000 as increasing n. If n<3072, the complete time of selfish peers is similar to that of compliant peers. This is because selfish 80000 peers can finish download by cheating the existing users. But when n ≥ 3072 , the download time of selfish peers grows 40000 almost linearly against n. Upload Amount per Peer KB) ( Peer per Amount Upload = λ = Let n 8192 and c 1 , Fig.3 shows the upload amount per 0 3715 peer against the ratio of the odd piece to the even piece. Free- riders don’t upload. A larger k will induce more contribution Ratio of Odd Piece to Even Piece (k) from semi-free-riders. = = Figure 3. Upload amount per peer against ratio of odd piece to even piece Let n 8192 and k 15 , Fig.4 shows the download time = = λ = ( P 10% , n 8192 , c 1 )

978-1-4244-5637-6/10/$26.00 ©2010 IEEE This full text paper was peer reviewed at the direction of IEEE Communications Society subject matter experts for publication in the IEEE Globecom 2010 proceedings.

implementation. Using OFE, a file is divided into odd and 60000 compliant nodes even pieces. Peers can barter with each other according to 50000 freeriders “odd first even later", that is, a peer must upload an odd piece semi-freeriders before receiving an even piece. The analytic modeling proves 40000 that through appropriate file piece strategy, OFE makes selfish peers spend more download time. Experimental results show 30000 that OFE can severely penalize the selfish peers, thus encourage peers to share their resources. 20000

10000 REFERENCE

DownloadCompletion Time (s) [1] Adar E, Huberman B. Free-riding on Gnutella. First Monday, 2000, 0 0.75 1 1.25 1.5 1.75 5(10): 1-22. [2] Handurukande S B, Kermarrec A M, Fessant F L, Massoulie L, Patarin λ S. Peer sharing behaviour in the eDonkey network, and implications for Arrival Rate of Peers ( c) the design of server-less file sharing systems. ACM SIGOPS Operating Systems Review, 2006, 40(4): 359-371. Figure 4. Download time against arrival rate of peers [3] Hughes D, Coulson G, Walkerdine J. Free-riding on Gnutella revisited: ( P =10% , n = 8192 , k =15 ) the bell tolls?. IEEE Distributed Systems Online, 2005, 6(6): 1-18. [4] http://www.bittorrent.com. 80000 BitTorrent:compliant nodes [5] http://www.redherring.com/Home/11346. 70000 OFE:compliant nodes [6] Cohen B. Incentives build robustness in BitTorrent. Proc. of the 1st BitTorrent: free-riders Workshop on Economics of Peer-to-Peer Systems (P2Pecon 2003). 60000 OFE:free-riders Berkeley, CA, USA, 2003. OFE:semi-free-riders 50000 [7] Qiu D, Srikant R. Modeling and performance analysis of BitTorrent-like peer-to-peer networks. ACM SIGCOMM Computer Communication 40000 Review, 2004, 34(4): 367-378. 30000 [8] Sirivianos M, Park J H, Chen R, Yang X. Free-riding in BitTorrent networks with the large view exploit. Proc. of the 6th International 20000 Workshop on Peer-to-Peer Systems (IPTPS 2007). Bellevue, WA, USA, 2007. 10000 Download Completion Time (s) Completion Download [9] Locher T, Moor P, Schmid S, Wattenhofer R. Free-riding in BitTorrent 0 is cheap. Proc. of the Fifth Workshop on Hot Topics in Networks 0 5% 10% 15% 20% (HotNets-V). Irvine, California: ACM Press, 2006. Percentage of Selfish Nodes (P) [10] Piatek M, Isdal T, Anderson T, Krishnamurthy A, Venkataramani A. Do incentives build robustness in BitTorrent?. Proc. of 4th USENIX Symposium on Networked Systems Design & Implementation (NSDI Figure 5. Download time against selfish peer percentage 2007). Cambridge, MA, USA: USENIX, 2007. 1-14. = = λ = ( n 8192 , k 15 , c 1 ) [11] Shneidman J, Parkes D, Massoulie L. Faithfulness in internet algorithms. Workshop of SIGCOMM on Practice and Theory of Incentives and 240000 Game Theory in Networked Systems (PINS), Portland, OR, USA, 2004. BitTorrent:compliant nodes OFE:compliant nodes [12] Jun S, Ahamad M. Incentives in BitTorrent induce free-riding. Proc. of 200000 BitTorrent:free-riders the Third Workshop on Economics of Peer-to-Peer Systems (P2Pecon OFE:free-riders 2005). Philadelphia, Pennsylvania, USA, 2005. OFE:semi-free-riders [13] Levin D, Lacurts K, Spring N, Bobby Bhattacharjee. BitTorrent is an 160000 auction: analyzing and improving BitTorrent's incentives. Proc. of the ACM SIGCOMM 2008 conference on Data communication 120000 (SIGCOMM 2008). Seattle, WA, USA: ACM Press, 2008. 243-254. [14] Li M L, Yu J D, Wu J. Free-riding on BitTorrent-like Peer-to-Peer file 80000 sharing systems: modeling analysis and improvement. IEEE Transactions on Parallel and Distributed Systems, 2008, 19(7): 954-966. 40000 [15] Yang X Y, Veciana G. Service capacity of peer to peer networks. Proc. Upload Amount per Peer (KB) Peer per Amount Upload of the Twenty-third Annual Joint Conference of the IEEE Computer and Communications Societies (INFOCOM 2004). Hong Kong: IEEE Press, 0 2004. 2242-2252. 0 5% 10% 15% 20% [16] Fan B, Lui J C S, Chiu D M. The design trade-offs of BitTorrent-like file Percentage of Selfish Peers (P) sharing protocols. IEEE/ACM Transactions on Networking, 2009, 17(2): 365-376. Figure 6. Upload amount per peer against selfish peer percentage [17] Douceur J R. The Sybil attack. Proc. of the 1st International Workshop on Peer-to-Peer Systems (IPTPS 2002). Cambridge, MA, USA, 2002. ( n = 8192 , k =15 , λ =1 ) c [18] Levine B N, Shields C, Margolin N B. A survey of solution to the Sybil attack. Technical report, University of Massachusetts Amherst, Amherst, VI. CONCLUSION MA, 2006. Resistant to the selfish behaviors in BitTorrent-like file [19] Bertsekas D, Gallager R. Data networks. Englewood Cliffs, NJ: Prentice sharing systems, a file piece swap policy (OFE mechanism) is Hall, 1987. proposed as an enhancement to the current BitTorrent [20] http://www.bittorrent.org/beps/bep_0003.html.

978-1-4244-5637-6/10/$26.00 ©2010 IEEE