Could Cryptocurrency Improve P2P File Sharing?

What does The Pirate Bay's recent closure mean for decentralised file sharing? And could the blockchain help to improve the concept?

AccessTimeIconDec 28, 2014 at 6:40 p.m. UTC
Updated Sep 29, 2023 at 12:03 p.m. UTC
10 Years of Decentralizing the Future
May 29-31, 2024 - Austin, TexasThe biggest and most established global hub for everything crypto, blockchain and Web3.Register Now

The Pirate Bay may never make it to its teenage years. The popular file sharing site, launched in 2003, was recently taken offline following a raid by Swedish police.

It’s a sad event for a site that is supposed to be all about unassailable file sharing and, although resurrected versions of The Pirate Bay may already be back up online, the latest interruption to its service raises a number of questions.

What does this raid mean for decentralised P2P filesharing? And can the same technologies that underpin cryptocurrencies help sustain or even enhance decentralised P2P filesharing networks like The Pirate Bay?

A way around ISPs

P2P filesharing networks work by enabling lots of computers on the Internet to share files with each other. Most of the P2P networks today use the BitTorrent protocol.

BitTorrent has some superficial similarities to cryptocurrencies like bitcoin: namely, it is a protocol offering decentralised communications among autonomous nodes in a network.

There are several potential problems for people wanting to use BitTorrent networks. The first is that visitors to sites like The Pirate Bay may be blocked by their own ISPs, possibly at the behest of governments or industry lobby groups.

“I don’t think a decentralised service offers a way around ISPs,” said Nick Lambert, COO at MaidSafe, which focuses on distributed secure file storage. “When the SAFE Network launches – which is the most decentralised service I have heard of, as it doesn’t have a blockchain – it is still not immune from ISPs.”

Theoretically, users could do away with ISPs altogether with a decentralised mesh network using bitcoin as an incentive to participate. Lambert points to Libernet, a bitcoin-funded mesh networking concept, as a way to dodge ISPs altogether. This is more of a theoretical solution than a practical one at present, though.

“The quest to find a replacement for ISPs is something that many people would like to see, but unfortunately I think a really viable solution is a wee bit off,” he concluded.

The other potential problem for filesharing users is that even if their ISPs let them visit sites like The Pirate Bay, local law enforcement may take those sites down at the source, as happened with The Pirate Bay.

However, this may be less of an issue than expected, because The Pirate Bay wasn’t actually sharing the files itself. Instead, it was simply an index, maintaining a database of those files.

“Despite the warning message, most of these users will still download their file successfully, since BitTorrent trackers have already been made mostly redundant by a global P2P network, which can be referred to as ‘the BitTorrent DHT’,” said Andrew Miller, a computer science PhD student at the University of Maryland.

Miller is a key contributor to permacoin, a project designed to use blockchain technology to archive data across thousands of computers.

How BitTorrent file sharing works

To understand this concept, we must delve into how BitTorrent works.

In a BitTorrent network, files are made available for others to download in a process called 'seeding'. Files are seeded by computers called 'peers', and anyone’s computer can be made into a peer simply by downloading an appropriate software client and connecting it to the Internet.

Computers on the network that download files from seeders are called 'leeches', and it’s common for a peer to be both a seeder and a leech at the same time.

Seeded files are carved up into many individually downloadable segments. This has three advantages:

First, if one peer containing a file becomes unavailable during a download, other seeders will still be available to deliver the segments that a leech is missing. Second, multiple segments can be downloaded from different seeders at once, making it easier to retrieve files quickly. Finally, leeches can quickly become seeders themselves, by seeding the files that they have already downloaded. This contributes to the overall health of the network and the availability of files.

In the early days of BitTorrent, peers on the network found each other using tracker files, which contained a constantly-updated list of which peers held which file segments.

The Pirate Bay used to be a centralised tracker service for BitTorrent files. For each downloadable file, it would host a downloadable tracker file with a .torrent extension.

Trackerless torrents

In 2009, The Pirate Bay switched off its centralised tracking service. Instead, it switched to trackerless torrents. These use a variety of mechanisms to enable people to find their files. The most common is the distributed hash table (DHT) technology that Miller describes. It enables peers in the network to hold partial lists of other peers that are hosting particular file segments. Another mechanism, Peer Exchange, enables BitTorrent clients to ask other peers in the network directly which peers they are connected to.

Consequently, The Pirate Bay moved from being a source of downloadable trackers, to a directory of magnet links. Unlike trackers, magnet links didn’t tell a peer where to find a file. Instead, it contained cryptographically hashed information about the content of a particular downloadable file, effectively telling a client what to look for. A BitTorrent client referencing a magnet link connects to its peers using distributed hash tables and asks them who is seeding that file.

When sites like The Pirate Bay stopped sharing files, they stopped being necessary for the continued operation of the file sharing network. Instead, the real heavy lifting has long since moved to the client, and the distributed hash tables. Nevertheless, those sites did provide a useful way to easily find shared files online.

One way to sustain that ease of use, rather than relying on people manually sharing links, may be to decentralise the publishing of file information itself. This is something that distributed hash tables are useful for. OpenBazaar, which is a decentralised marketplace allowing people to list their own goods and services, uses DHTs to get that information out. Projects like OpenBazaar suggest that it’s possible for autonomous nodes in a global network to publish information of their own for everything from trading to P2P lending.

Other projects, like Triblr, have already implemented distributing searching for file sharing.

Using cryptocurrency to improve performance

So, cryptocurrency’s underlying technologies may not be needed to save file sharing, or the indexing of information about currently-available files. Nevertheless, there may be room for cryptocurrency to improve the performance of these filesharing networks.

“One of the innovative things in bitcoin is its use of built-in virtual currency for incentives in its network,” said Miller.

BitTorrent also has a built-in incentive mechanism, Miller points out. Those peers that seed files are rewarded with faster downloads, while peers that seed fewer or no files will find that the frequency of file segments they can download from another peer are artificially limited, or ‘choked off’.

This incentive mechanism leaves new peers with a problem: they have nothing to seed, so their downloads may be slower. The BitTorrent protocol uses ‘optimistic unchoking’, in which a random peer is selected for unthrottled downloads, on the assumption that it may pay off.

“Overall, the BitTorrent network consists of volunteers. Perhaps BitTorrent would work even better if you could offer to pay your peers for their service,” said Miller. In such a scheme, a leeching peer without file segments to trade could potentially pay a seeding peer to unchoke it, increasing its download performance, and using the blockchain to track it all.

A fluffier long tail

There’s a nuance here. Popular files such as the latest viral video or Hollywood blockbuster would probably do quite well without a paid quality of service download, as there would be enough seeders to satisfy even a new leecher.

“I think this approach would have the most potential for the ‘long tail’ of files such as personal backups (that only concern one person) or niche files (which, currently, are less likely to have active seeders),” Miller said.

The long tail is a distribution in which a small number of items outrank the rest in popularity (the long tail would be the yellow part in the diagram below).

The Long Tail
The Long Tail

A term highlighted by Wired editor Chris Anderson’s popular book of the same name, it applies to content in the Internet age. A small number of popular mainstream items will be downloaded the most, while other, more obscure content will be viewed by far fewer people. However, there are far more of these less popular items, creating the ‘long tail’.

BitTorrent networks have their own version of the long tail, giving rise to something known as the seeder promotion problem. Seeders often discontinue their file seeding after they have downloaded their own content. While there will always be enough seeders for a popular file, there may be only one or two seeds for that obscure public domain Norwegian documentary on the cultural history of lutefisk that you’ve been dying to watch. If you start leeching from the handful of seeders for that item and they become unavailable, you’ll be stuck without the full file download.

Using a cryptocurrency as an incentive could be a way to ‘fluff out’ the long tail, by encouraging more people to share less popular items. It could reward peers with a form of stored value. They could use in the future to purchase their own priority download status for segments of a different file, or, if the cryptocurrency was traded on exchanges, they could cash out.

Tackling fraudulent peer attacks

There’s another potential use for cryptocurrency technologies in file sharing networks, Miller said: as a form of protection from attack.

Media companies have hired firms to disrupt filesharing networks using a variety of methods, including using fake seeders. These seeders may transmit incomplete blocks, or upload poor-quality or broken files.

“The rating system used by Pirate Bay and other sites is important for combatting this, but it's potentially fragile,” Miller said. “It's possible that if such attacks become much more advanced in the future, then blockchain technology may lead to more robust defenses.”

The blockchain might become a way to store downloads and information about the quality of particular files or peers, for example. An internal cryptocurrency could even be used as a form of reputation system to reward genuine sharers and punish fraudulent ones.

For now, such ideas remain theoretical, and BitTorrent continues along its current successful path without any of these blockchain enhancements. But technology disrupts wherever it can. If the need arises, the technology is certainly there.

Disclaimer: The views expressed in this article are those of the author and do not necessarily represent the views of, and should not be attributed to, CoinDesk.

The Pirate Bay image via Shutterstock.

Disclosure

Please note that our privacy policy, terms of use, cookies, and do not sell my personal information has been updated.

CoinDesk is an award-winning media outlet that covers the cryptocurrency industry. Its journalists abide by a strict set of editorial policies. In November 2023, CoinDesk was acquired by the Bullish group, owner of Bullish, a regulated, digital assets exchange. The Bullish group is majority-owned by Block.one; both companies have interests in a variety of blockchain and digital asset businesses and significant holdings of digital assets, including bitcoin. CoinDesk operates as an independent subsidiary with an editorial committee to protect journalistic independence. CoinDesk employees, including journalists, may receive options in the Bullish group as part of their compensation.


Learn more about Consensus 2024, CoinDesk's longest-running and most influential event that brings together all sides of crypto, blockchain and Web3. Head to consensus.coindesk.com to register and buy your pass now.