As the Chia ecosystem matures and NFT galleries and projects begin to appear, its important to know how one of the backbones to the ecosystem really works, and not the myths around it. IPFS is a protocol that many NFTs point to as their underlying asset. And most people feel that this means the file is hosted on a blockchain and immutable. Nothing could be farther from the truth.
I don’t want to get too deep into the architecture of how IPFS works, but I do want to run through it a little bit. IPFS is a distributed file system similar to a BitTorrent swarm but with no central tracker, simply a Distributed Hash table (DHT) hosted by nodes with the IPFS nodes and Content IDs (CIDs, we will get to these later). It uses Merkle trees to form blocks that identify the files, which is where I think the confusion with traditional blockchains comes from, but it is not a blockchain. Git also uses Merkle trees to organize releases and ensure that different branches don’t accidentally get switched and to maintain integrity up and down the tree.
To get onto the IPFS network you can put up a node, using instructions here, and begin hosting files. When you put a file onto IPFS you create the CID for it mentioned earlier, which is a complicated set of hashes based on where the file is located and some other metadata that points to your file. That file can then stay hosted on your node alone, or it can be distributed among many nodes. This is where it is like BitTorrent. Just because a file is available “on BitTorrent” it doesn’t mean there are any seeders or that any of it permanent. IPFS is like this. The address/CID is permanent, to a degree, as it gets passed around the DHT tables but the underlying asset, or file, that the IPFS address points to can be lost as easily as any file on a random webserver. The Chia Plot could be an IPFS node and files hosted here could be IPFS addresses, and it wouldn’t make them any more permanent than they are now.
IPFS on the blockchain
There is a mechanism that purports to use “blockchain technology” to ensure persistence of data, where actual files are written to storage assets distributed around a cryptocurrency network where participants have an incentive to host your data on IPFS for as long as possible, and that is FileCoin. This is probably more robust than a random web server run by some random software project hosted in AWS, but it is by no means permanent. Lots of blockchains have gone defunct in the past, and there is no reason to think that FileCoin will be immune to this possibility.
Many NFT projects leverage FileCoin to give their users the feeling of permanence, and even more broadly use an IPFS address to give the illusion of reliability. But I argue the usage of IPFS does more to obfuscate the real permanence of NFT-secured assets. There is a well known secret that many NFT projects simply use random web file storage to host their images, and that those could go away at any time. The solution to the “savvy” is to only buy NFTs that are hosted on IPFS links. But those people do not know, or are not made aware that those could be the exact same web server. FileCoin hosted storage, and there are tools to make it easy to host NFT assets on FileCoin, might be one of the easier ways to provide some reliability for NFT storage but it is far from perfect.
Problems with IPFS as permanent storage
Honestly it might as well be a .torrent file that points to a reliable IP address hosting the DHT table for the files you want to host. Its a little bit more elegant than that, but it really does boil down to the same thing. No matter what you do with the storage someone has to host it, physically, somewhere. There might be layers of incentives provided to ensure that the storage stays up, but it still needs to be on a hard drive somewhere connected to the internet. Even when a file is hosted on FileCoin you are reliant on the FileCoin nodes its hosted on not to go dark during a bear market, and for the FileCoin team not to create a catastrophic error during an update, and the IPFS gateways that are used to access your files stay up. There are a lot of centralized points of failure here for a decentralized file storage system.
How you can avoid being fooled
From what I can tell, there is no easy way to determine how a file on IPFS is being hosted without running your own IPFS node and using that software to do a lookup of the hash. Once you have a node up you can use the following code to find who has certain chunks stored. It is not even foolproof as it will only list out what nodes are hosting the file that your node can find. However, these files do not distribute automatically and hosting a file is an active process, as is pushing it to new nodes.
ipfs dht findprovs $CHUNK_HASH
Each NFT marketplace should show you the address where an NFT is located. To see where they are on OpenSea, the biggest NFT marketplace right now, you can follow this guide. Amusingly if you follow this process for the current top NFT project, Mutant Ape Yacht Club, you will find that they don’t even use IPFS but a centralized web server relying on centralized DNS and a centralized TLS certificate.
Even if you are storing your data on FileCoin you aren’t really accessing it from there when reading the NFT. While a file might be “backed” on FileCoin, transacting with that network requires fees and apparently unsealing a file to read can take hours because of verifications. So what they have is FPS, or FileCoin Pinning Services, that host files for you like IPFS. So basically just IPFS nodes that grab stuff off FileCoin and host it for a price.
This is all starting to feel like centralized storage with extra, expensive and complicated, steps. And the worst part is that people are putting huge amounts of money into NFTs where they are simply files on a file server somewhere and a person somewhere ultimately controls that. This is even beyond the risk that the NFT marketplace or gateways simply remove your file from the directory.
So what does this all mean?
Basically NFTs are no more permanent than any other part of the web. They use fancy, useful technology to obfuscate the fact that unless you are hosting the file that your NFT represents yourself you are beholden to others. Right now an NFT hosted using FileCoin has as good a chance as anything of sticking around. But, like everything else in this world it comes down to trust. Do you trust that the entity that created your NFT has put the effort in to ensure reliable access? Do you trust that FileCoin won’t shut down? These are questions you need to ask yourself when buying into an NFT project. The space is new right now, and don’t be fooled by an IPFS address into thinking that means your asset is permanently ensconced in an immutable blockchain.