What is the best practice for storing NFT data and metadata?

3 minute read

Where do all those Marmot and Chia Friends NFTs of yours get stored? What happens if you host your NFT images on your website www.nft.com/cool.JPEG and project website goes offline?

As an NFT creator, you will have to consider how and where you will store your beloved NFT collection data and metadata long-term. When your server goes offline so will your JPEGs. Just because you minted on a blockchain doesn’t mean the data is stored permanently. Going forward NFT creators will have to change how and where the data resides for the security and permanence of those NFTs.

Best practices for storing NFT images and metadata

First, let’s define the best practices for NFT collections:

Rating Storage System Storage Providers
Best Combination of Arweave and IPFS Multiple ;)
Better Arweave ardrive.io
Good IPFS NFT.storage, Brave, Filecoin … etc
Worst Project website hosted Geocities, Bluehost, AWS … etc

For most projects, IPFS is likely good enough, especially in the beginning. For Chia NFT collections, you can always add more URIs for your data later so starting with IPFS is fine and easy to do.

The “best” in this case is simply a combination of services because you never when one system goes offline.

(Update: 2022-08-12) You should be aware that uploading to IPFS has a slight drawback compared to traditional web hosting. When hosting on your own website the files are generally immediately available. If you use CDN for speeding up the sharing then you are aware there’s a time needed to distribute the data across the world. Similarly, with IPFS you have to give the nodes to actually store the data and make it available across the network.

Here’s one approach you could take when using IPFS:

  1. Add the data to IPFS
  2. Wait 24 hours
  3. Start minting

I’ve seen marketplaces fail to load the data from IPFS when the IPFS pin happened within the same hour as the minting. An alternative is to use your website hosting as the first URI to resolve the resources faster.

How is data stored on IPFS?

If you understand how BitTorrent works with peers and seeders then you already know how IPFS works. IPFS protocol was based on the idea of sharing files peer-to-peer where someone has to host the data (seeder).

The peers then connect to the nodes and retrieve the data. The data seeders are incentivized via payouts from Filecoin system and this is why https://NFT.storage can provide their services for free.

They also provide multiple ways to upload data to IPFS via their website, standalone app, and API.

Read more on NFT.storage hosting free here. Here’s a snippet:

Filecoin storage providers commit their hard drive capacity to the Filecoin network and earn significant block rewards for doing so. This translates into real-world profits for storage providers, which incentivizes them to continue committing additional hard disk space to the Filecoin network. However, when storage providers are storing data from Filecoin users, their likelihood of winning block rewards goes up by a big factor 一 10x! Because NFT.Storage participates in the Filecoin Plus program, all data uploaded through the service is eligible for this 10x reward multiplier.

How is data stored on Arweave?

Arweave is more like a blockchain called blockweave and is attempting to become a defacto in perma-store systems. They have a bold claim too: Arweave enables you to store documents and applications forever.

An explanation from their website:

Just as a blockchain is a linked collection of blocks containing transactions, a blockweave – specifically designed for the Arweave protocol – is a set of blocks that contain data, linking to multiple previous blocks from the network. This data structure allows the network to an enforce that miners provide a ‘Proof of Access’ (PoA) to old data in order to add new blocks.

Unlike in a traditional blockchain, where miners are forced to expend electricity in order to earn tokens, in the Arweave network miners are also encouraged to replicate valuable data (the information stored in the network) in order to gain tokens. This mechanism offsets the value that is normally wasted in blockchain networks, with useful, energy efficient storage of data.

What is the best?

Perhaps Chia DataLayer will be part of that answer. I believe the real answer is a combination of good technologies. Chia’s CHIP-0007 NFT standard allows multiple sources of NFT data and metadata in URIs which allows you to host on multiple storage providers.

Conclusion

As a creator, you’ll face some less than fun questions about minting your NFT project. Hopefully, this helps push you forward with your NFT project by using IPFS first and then Arweave later. Now go out there and create something beautiful!