Forkast.News is now Forkast Labs

Filecoin explained: Decentralizing cloud storage for Web 3.0

AWS is down again? Protocol Labs’ Filecoin — an ‘Airbnb for cloud storage’ — is a response to the risks inherent in centralized data storage and cloud giants

This explainer is based on a sponsored video series in partnership with Protocol Labs and Decrypt.

Filecoin is the economic incentive layer to the peer-to-peer decentralized network for sharing and storing of data, Interplanetary File System (IPFS). 

IPFS and Filecoin are created by Protocol Labs, and fueled by CEO Juan Benet’s vision of creating a decentralized and robust foundation to store data. Filecoin, a blockchain built on top of IPFS, has its own native cryptocurrency, FIL, which acts as a payment protocol that connects buyers and sellers of storage in the IPFS ecosystem. It is often referred to as, in reference to Protocol Labs’ fellow Y Combinator alum: “Airbnb for cloud storage.” 

Filecoin gained much media attention in 2017 after raising US$206 million in its initial coin offering (ICO), which back then, was one of the largest ever, plus an additional $52 million in venture funding. Three years later, in October 2020, the network launched its mainnet. Less than a month later, Filecoin’s total network storage power has surpassed 1 EiB (exbibyte), or over 1.1 million TB (terabyte).

To put into context, 1 EiB is enough to store 4,500 copies of Wikipedia, 685,000 years worth of video calls, 19 copies of the entire non-profit digital library Internet Archive, or 290 million Full HD movies. 

Issues with centralized storage

Currently, humans generate around 1.145 trillion MB (megabyte) of data per day. As society relies more and more on the internet to work, study, socialize and shop, data storage and computing needs are expected to increase with the emergence of 5G and other technologies such as internet of things (IoT). 

Even prior to 5G having mass commercial impact, the Covid-19 pandemic of 2020 has played a crucial role in the surge of global cloud consumption. According to technology market analyst Canalys, the global cloud market grew by 33% in Q3 of 2020, which was a US$9 billion year-over-year increase. Amazon Web Services (AWS) currently dominates 32% of the world’s cloud storage market (and has gone down again, causing massive outages across the internet as of publishing time), while Microsoft Azure comes in second, with 19% of the market.  

The risks of storing such massive amounts of data on centralized servers have been on display in recent years. For example, in 2012, major cloud storage provider Dropbox disclosed a data breach that had compromised over 68 million of its user accounts. The stolen passwords and information were put on the Dark Web for sale, in exchange for payment in bitcoin

Recep Tayyip Erdoğan President of Turkey
Turkey ended its ban on Wikipedia in January 2020. Image: Pixabay

More recently, in 2017, the government of Turkey blocked its people’s access to Wikipedia under Turkish Law No. 5651, which allowed the nation to ban access to websites that were considered a “threat to national security.” Turkish nationals trying to access the online encyclopedia — which contained information critical of the Turkish government — were greeted with 404 error codes. In response, hacktivists saved a version of the Turkish Wikipedia and shared it on the IPFS network, which the Erdogan administration could not block due to IPFS’s decentralized nature. Turkey ended its Wikipedia ban in January 2020. 

How does Filecoin work?

As a peer-to-peer network, Filecoin connects two main players: the users and storage providers. 

Unlike a traditional blockchain protocol, miners in the Filecoin network aren’t rewarded FIL for verifying a block’s proof of work. Instead, miners in the Filecoin network have computers with internet connections and available storage for clients to hire. Storage providers are the miners, and are rewarded with FIL for contributing storage to the network. 

The users, on the other hand, are the customers, or individuals in the market that are looking to hire storage from the storage providers that have implemented the Filecoin protocol. 

Storing valuable information on someone else’s computer may seem sketchy at first glance. To ensure that the data being stored by anyone anywhere in Filecoin’s network cannot be accessed by hackers, Filecoin breaks down the data before storing. So, if a malicious actor tries to access a file stored in the Filecoin network, they will only see meaningless pieces of data. 

Diagram demonstrates how Filecoin works
This diagram illustrates how the Filecoin network operates. Image: Filecoin

An agreement between a user and a storage provider is called deals. In the Filecoin network, there are two notable types of deals, storage and retrieval deals. As the names suggest, a storage deal occurs when a miner has received data from the client to store, while retrieval deals occur when miners withdraw data from the network. 

When a storage deal is agreed upon, miners must continuously prove that they are acting in good will by storing clients’ data. Filecoin’s consensus mechanisms play critical roles in removing third parties. In order to prove to the network that storage of data is occurring as outlined by the initiated deal between client and miner, Filecoin verifies storage data through “proof of replication” (PoRep) and ”proof of spacetime” (PoST). 

In PoRep, the storage provider generates a unique encoding of data, which is designed to occur slowly. After encoding, storage providers are challenged to prove that a unique encoding of data exists in the storage. And so, as the encoding sequence is designed to occur gradually, a swift response from the storage provider means that the data has been encoded and the client’s data is safely stored. However, if the storage provider fails to respond quickly, it would mean that the storage provider has generated a new encoding and is not acting in good faith. 

Once a deal between a user and storage provider is initiated, miners prove that the data is continuously being stored (sealing) in the storage through PoSt. Random miners are selected to prove random data still exists in the storage. 

IPFS and Filecoin

As mentioned earlier, IPFS enables users to share and store verifiable data through a distributed file system on a peer-to-peer network. 

The current structure of the internet is based on location-based addressing. For users to access content, users must provide the location of the content, or the domain name. The issue presented by the current model is that, because content is stored on centralized servers, users can lose access to content if the address is blocked by a government or server host. 

To solve this issue, IPFS abandons location-based addressing and adopts content-addressed data. Instead of providing the address of the contents, users provide what content they want to access. In IPFS, contents are translated into unique hash codes, which act as a built-in security mechanism to verify contents. When a user provides the hash code of the content, the user can then download the content from what is available in the decentralized IPFS network. 

Up to this point, IPFS can be comparable to how the peer-to-peer file sharing network BitTorrent operates. Like BitTorrent, the IPFS network does not have a built-in incentivization mechanism. Files in the IPFS network can also become inaccessible when nodes go offline. 

Filecoin solves this issue by incentivizing nodes to participate in long-term storage of verifiable information. It does so by creating a marketplace for decentralized storage. Although users do not need to use Filecoin to access contents stored in the IPFS network, all Filecoin nodes are IPFS nodes. The two protocols are independent but complement each other. 

Filecoin applications and competition

Filecoin’s mainnet launch also comes with a variety of large-scale applications that were once Web 2.0-oriented, such as video streaming and social networks, to now become fully Web 3.0-native applications.

An example of Filecoin’s potential application is Starling, which would add a verification layer using cryptographic techniques to Filecoin’s decentralized storage network. Starling, which is still under development and not yet officially launched, would use the Filecoin network to store information  on the network for long term preservation. Filecoin’s ability to provide permanence and check the appropriate storage of data can also allow other important information from being deleted or censored from the internet. Starling’s ability to preserve data and provide assurances about its provenance could be a potential counter to the rising trend of deepfakes, which has been expanding to video and audio content.  

Another Filecoin application is Livepeer, a decentralized video storage and live streaming protocol built on the Ethereum blockchain. Filecoin enables video content storage and delivery, and allows content creators to access low-cost storage that doesn’t rely on revenues from advertisers, as video storage and streaming services like YouTube and Twitch do. 

Although Filecoin is a popular and revolutionary protocol that provides data storage and memory for the Web 3.0 ecosystem, it is not alone in the decentralized cloud storage industry. Its competitors include Sia, Storj and Swarm, which also use blockchain technology to create decentralized data storage markets.