← Back home

Hosting and Incentives

11 March, 2020 - 3 min read

Welcome to this week's installment of the tech update. We're going to continue our trend of answering your questions, so post in the comments below if you're curious about something.

This week's question comes from our good friend Anonymous:

In short, yes and yes. In longer, let's break this down into two parts: how content is hosted on LBRY, and how you're rewarded for hosting.

Hosting

This is the easy part: LBRY really does work very much like Bittorrent, and uses the same technology under the hood. We have a global Kademlia distributed hash table (DHT) that clients use to find hosts (our word for seeders) for the content they want to download. Every file published to LBRY is broken up into small pieces called blobs. Each blob has a hash that uniquely identifies it. The DHT is a mapping of blob hashes to the hosts that have that blob available for download. At the data layer, publishing a file is just a matter of breaking that file into blobs and announcing those blobs to the DHT.

When you download a file, you look up the blobs in the DHT, find the hosts that have those blobs, and download from those hosts directly (all this is just like Bittorrent). Once you have a blob, you also become a host for it. That is, you announce to the DHT that others can download the file from you. That's the magic of a peer-to-peer network: it is supported by the people who use it, no centralized servers necessary. That said, centralized servers can certainly improve the performance of the network. For example, Bittorrent uses tracker and search engines to help you find and download files faster. In our case, we run servers to rehost content. This is especially useful for client without a stable internet connection (e.g. laptop users publishing from a coffee shop).

If you want to really dig into the details, check out Data section of the LBRY spec.

Incentives

One of our biggest additions to Bittorrent is the ability to pay the participants of the peer-to-peer network for providing the services that the network needs. Similar to how a blockchain pays miners to mine blocks, we can pay hosts to host content.

To our great shame, payments for hosting have been on the back burner so far. But its on our roadmap now, and we're very excited to move it forward. Our long-term dream is a system that has strong proofs of content availability and micropayments for every byte of data transferred. However, we're big on shipping fast and iterating, so our MVP will be much closer to what Anonymous suggested: simply tracking how much you download and paying the host at the end.