# Does IPFS use bittorrent or bitswap?

**URL:** <https://discuss.ipfs.tech/t/does-ipfs-use-bittorrent-or-bitswap/277>\
**Category:** Help\
**Created:** [May 23, 2017, 12:06am UTC](https://discuss.ipfs.tech/t/does-ipfs-use-bittorrent-or-bitswap/277 "2017-05-23T00:06:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [May 23, 2017, 12:06am UTC](https://discuss.ipfs.tech/t/does-ipfs-use-bittorrent-or-bitswap/277/1 "2017-05-23T00:06:55Z")

</div>

_From @iskradelta on Wed Nov 30 2016 21:13:11 GMT+0000 (UTC)_  
  
Or bitswap and bittorrent?

What is bitswap, how does it deal with free-riders/leechers in the swarm?  
  
  
_Copied from original issue: [Does IPFS use bittorrent or bitswap? · Issue #206 · ipfs-inactive/faq · GitHub](https://github.com/ipfs/faq/issues/206)_

---

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [May 23, 2017, 12:07am UTC](https://discuss.ipfs.tech/t/does-ipfs-use-bittorrent-or-bitswap/277/2 "2017-05-23T00:07:49Z")

</div>

_From @raptortech-js on Tue Dec 06 2016 19:25:33 GMT+0000 (UTC)_  
  
IPFS uses Bitswap. It does not use Bittorrent in any way. Any references you see to Bittorrent are likely from people trying to explain the similarity, as Bitswap is similar in many ways to Bittorrent. You can learn more about Bitswap by reading this paper: [https://github.com/ipfs/papers/blob/master/ipfs-cap2pfs/ipfs-p2p-file-system.pdf](https://github.com/ipfs/papers/blob/master/ipfs-cap2pfs/ipfs-p2p-file-system.pdf). Section 3.6 explains Bitswap.

Bitswap does not set one true way of dealing with leeches; instead, it allows clients to set their own _Bitswap strategies_. A Bitswap strategy tells a node how it should request and send blocks to/from its peers. In the paper, they discuss one possible strategy, which uses a “sigmoid scaled by a debt ratio.” I don’t understand the math involved, but basically it should elegantly handle free-riders and the retention of rare blocks and so on.
