Using IPFS in your NFT project
← Back to Blog

Using IPFS in your NFT project

December 20, 2022

It is important to all NFT creators that their files are secure and verifiable, and today we will be discussing how you can use IPFS (InterPlanetary File System) to protect your work.

The problem of NFT storage

When it comes to using the Ethereum blockchain, you are charged gas fees to mint, transfer or buy NFTs. This gas fee means you are paying the network to take care of the computing for you. On top of that, storing your data on the blockchain can also be very expensive. To avoid this massive financial burden, most NFTs are stored as metadata that refers to an image off the blockchain where the actual file is. In simple terms, think of when you share a link with somebody, that link itself isn't the place you want them to visit, it only points the direction to it. This saves storage space as a full PNG of an NFT might be 4 MB but its metadata is only about 800 bytes. However, a new issue arose from this data solution, which is that people started to create scams (known as rugpulls in the NFT space).

Scammers could launch an NFT project, upload images of their artwork to a storage provider and give it any title they want along with a link to that image in the NFT metadata. The problem would be that after the sale of the NFTs, the project owner or storage provider could remove the image at any time making the NFT useless. Even worse than that the image could be replaced with a random one, if they were using art that didn't belong to them. Since there are no laws or regulations governing this, you would be out of luck if you paid for something and didn't receive it. This is where the solution of IPFS came into play.

Why is IPFS the solution?

To understand how IPFS works, you should first understand how file sharing works. The conventional way of sharing files over the internet is through centralized servers. Twitter is a great example of this, when you send a tweet, the data is sent to Twitter’s servers. When other users click to see this tweet, the server passes that information to them.

IPFS is a decentralized network of nodes that share content with each other. So if Twitter were to run on IPFS rather than centralized servers, each user would have their own IPFS node that would upload data to the network. If someone wanted to view this data, it would be passed from node to node. So rather than a single company holding and owning all the data, everyone owns their own data.

IPFS & NFTS

When you share a file on IPFS, the file is run through a cryptographic algorithm that creates a unique identifier called the Content Identifier (CID for short). This CID plays a huge part in how IPFS works and operates. The content of your file determines the CID, making each one unique. Changing an image by just one pixel will produce a new CID. Because of this unique identifier, the content now becomes verifiable. So if we return to our example earlier with the scammers NFT project, they would not be able to change the image after the sale as it would have a different CID. By merging this with blockchain technology, your NFT art is now publicly verifiable and can’t be changed. This creates legitimacy and trust for NFT creators and their community and use of the CID makes it easier for content to be portable and addressable.

To take the element of security a step further collectors can use Pinata. By using the CID from their NFT metadata and pinning it to their Pinata account, extra security is created. If the project owner for whatever reason stops pinning the data on their end, the NFT will persist from the collector's end. In this way, the collector has the power to truly own their data.

How creators can use IPFS without code

Pinata allows creators to upload their original content on IPFS through an app and is automatically pinned to IPFS along with a unique CID. Another feature of Pinata is that it allows creators to share their content. Dedicated Gateways is a hyperspeed bridge between IPFS and a website that enables the sharing of content along with a custom domain to match the creators brand.

There are also free options available, like nft.storage which is run by Protocol Labs. It's completly free, and you can upload up to 31 GB of files at once. However, support is slow and it doesn't have premium options like dedicated gateways.

We hope you have a clear idea of how IPFS can help NFT creators protect their content, distribute it and reach a wider audience.

Feeling inspired?Launch your NFT today.

Prototype, generate and launch your collection with the most powerful no-code NFT toolkit.

Sign up for free
App screenshot