IPFS & Filecoin: Decentralized Storage
Lesson by Uvin Vindula
The InterPlanetary File System (IPFS) is a peer-to-peer protocol designed to fundamentally change how data is stored and retrieved on the internet. Instead of requesting files from a specific server (location-based addressing), IPFS uses content-based addressing — you ask the network for a specific piece of content by its unique cryptographic hash, and any node that has it can serve it to you.
How IPFS Works
Traditional web URLs point to a location: https://server.com/file.pdf tells your browser to fetch a file from a specific server. If that server goes down, the file is gone — even if thousands of copies exist elsewhere. IPFS flips this model:
- Content addressing: Every file gets a unique identifier (CID — Content Identifier) based on its cryptographic hash. The same file always produces the same CID, regardless of where it's stored.
- Distributed hash table (DHT): The network maintains a distributed index that maps CIDs to the nodes storing them.
- Peer-to-peer retrieval: When you request a CID, the nearest node with that content serves it. Multiple nodes can serve different chunks simultaneously, like BitTorrent.
- Deduplication: Since identical files share the same CID, the network naturally eliminates redundant copies, saving storage.
Filecoin: Adding Economic Incentives
IPFS alone doesn't guarantee data persistence — nodes can choose to stop hosting content at any time. Filecoin, created by the same team (Protocol Labs), adds an economic layer on top of IPFS:
- Storage market: Users pay storage providers in FIL tokens to store their data for a guaranteed period.
- Proof of Replication: Storage providers must cryptographically prove they are actually storing unique copies of the data.
- Proof of Spacetime: Providers must continuously prove the data remains stored over time — they can't just store it momentarily and delete it.
- Retrieval market: A separate market for quickly serving stored data to users who request it.
Real-World Applications
IPFS and Filecoin are already being used in production. NFT metadata is commonly stored on IPFS to ensure artwork remains accessible even if the original marketplace disappears. Wikipedia has been archived on IPFS, making it accessible in regions where it's censored. Decentralized applications (dApps) host their front-ends on IPFS so they can't be taken down by any single entity.
For Sri Lankan developers and entrepreneurs, IPFS offers a way to build applications that are resilient to infrastructure failures and censorship. A news platform hosted on IPFS, for example, could continue operating even during government-imposed internet restrictions.
Key Takeaways
- •IPFS uses content-based addressing — files are identified by their cryptographic hash, not their location
- •Filecoin adds economic incentives to IPFS with Proof of Replication and Proof of Spacetime
- •Content on IPFS can be served by any node that has it, eliminating single points of failure
- •NFT metadata, Wikipedia archives, and dApp front-ends are already using IPFS in production
- •IPFS-hosted applications are resilient to censorship and infrastructure failures
Quick Quiz
Question 1 of 3
0 correct so far
How does IPFS identify files differently from the traditional web?