NFT storage: How NFT artwork can literally "disappear" if you're not careful
1516277203659
Dec 05, 2022
by Guy Harrison
CEO at alwaysNFT.cloud & CTO at ProvenD

We all know – or think we know – that an NFT represents an indivisible and programmable piece of digital property. Over the past few years, the NFT market has progressed from zero to a 40 billion-dollar-a-year industry.

Eventually, we believe that NFTs will transform the world by allowing blockchain transactions to be associated with digital or real-world assets. But for now, the NFT market is dominated by the acquisition and trading of digital art and collectibles. Even in the current "crypto winter", NFT sales exceed 100 million dollars per day, and individual NFTs regularly sell for more than a million dollars.

How an NFT connects to digital assets

Newcomers to the NFT space are often surprised to find that not all of an NFT resides on the distributed ledger. In fact, the ledger entry that represents a specific NFT will usually have a "pointer" to a metadata document that resides somewhere else on the internet. For example, consider this NFT issued by the Hedera team and celebrating Christian Hasker, CMO at Hedera:

Christian-NFT

Figure 1 A Hedera NFT on the HashAxis exchange

On the marketplace, we see the digital artwork, a description of the NFT and maybe other attributes denoting rarity and value. But if we look at this NFT on the Hedera ledger, we don't see any of these things.

Figure2

Figure 2 Hedera NFT on the ledger

All we really have is the name and symbol of the NFT and this weird "Metadata" field. What on earth is bafkreiepyxh6uxzhg2aqwmtes2rwbuikb7zyrzdcmbd5lcijuvx2eyocfi ?

How it works is that this Metadata address (called a Content Identifier or "CID") references a document on the InterPlanetary FileSystem (IPFS). Documents in IPFS are referenced by a hash value of their contents, which means that the contents can never change (because if the contents change, so does the hash and, therefore, the link). If we want to look at the contents of the Metadata for this token, we, therefore, need to look at it on IPFS. 

Let's look at the Metadata at https://ipfs.io/ipfs/bafkreiepyxh6uxzhg2aqwmtes2rwbuikb7zyrzdcmbd5lcijuvx2eyocfi:

Screen Shot 2022 08 23 at 2 36 38 pm

Figure 3 The NFT metadata on IPFS

This "metadata" includes the long English description of the token and some other details. Most significantly, it includes the "CID" of the image, which is also stored on IPFS. So if we now follow that link https://bafybeifrn4dvlybxg4oyzz63ohtqkdjdbx6hi2pubvty5v4fb7irfbvota.ipfs.dweb.link/:

Figure4

Figure 4 The NFT image on IPFS

Voila! We have found the image. As you can see, an NFT is not a single entry on a blockchain or ledger – it's actually composed of three distinct elements.

An NFT is made up of three elements

So it turns out that an NFT is comprised of three separate items: the NFT entry itself stored on the ledger, the metadata file usually stored on IPFS and the image file, also held on IPFS. The following diagram illustrates these components:

Figure5

Figure 5 The three components of an NFT

Why you should care about NFT storage

Hedera Token Service and IFPS together provide a strong foundation for NFTs, so why should you care about how it works under the hood?

It's important to understand that although data on IPFS is immutable (it cannot be changed), files on IPFS are not necessarily permanent. Files stored on IPFS can and often do disappear. Files put into IPFS will eventually "age out" of the system over time unless they are either frequently accessed or "pinned" permanently into one or more IPFS servers. If the person who creates the IPFS server fails to pin the data to a public 24x7 server, then eventually, your Metadata and artwork will disappear. In a recent scan of more than 400,000 NFTs, we found that in almost 20% of cases, the Metadata and artwork could not be found. Hedera NFTs may be less error-prone than those built on blockchains, but we're still seeing errors in about 7.6% of the Hedera NFTs we've scanned to date.

Let's look at an example of such an NFT failure. Let’s say I, as an NFT creator, create a new collection called “Alien Birds”. Each of the tokens has a unique AI-generated alien bird. For each token, I first load the image into IPFS, getting a “CID” that identifies my immutable image:

Code Snippet Background
> ipfs add image1.jpg
added QmT4G9WJsXmRkXRBnUf4h1Nptdr46tXx8aNaqe8sekWWeX image1.jpg
 16.43 KiB / 16.43 KiB

I then create a metadata file that includes an image to this IPFS image address:

Code Snippet Background
> > cat >metadata.json <<!
{
    "image":"ipfs://QmT4G9WJsXmRkXRBnUf4h1Nptdr46tXx8aNaqe8sekWWeX",
    "description":"alien Birds is a collection of 1000 alien birds"
}
!
 
ipfs add metadata.json
added QmQuMho1tgBH4RcbGE9KrLjxPUQnzwcjM8i77WmaXQpfES metadata.json
 141 B / 141 B

Finally, I create the NFT specifying the IPFS address of the JSON file as the metadata for the token:

Code Snippet Background
const MetaDataLink = ‘QmQuMho1tgBH4RcbGE9KrLjxPUQnzwcjM8i77WmaXQpfES’;
 
    const mintTokenTx = await new TokenMintTransaction()
        .setTokenId(tokenId)
        .setMetadata([Buffer.from(MetaDataLink)])
        .freezeWith(client);

In real life, I’d automate all of these steps so that I can bulk mint large numbers of tokens, but these three steps must be completed for each token that I mint.

You as an ardent NFT collector, love my Alien Birds, so you buy 3 tokens. You can see them in all their glory in your HashPack wallet:

Figure 6 Alien Birds

Figure 6 Alien Birds collection in HashPack

Cool! But a few days later you look in your wallet and find that some of the birds have disappeared:


Figure 7 Missing alien Birds

Figure 7 Missing Alien Birds!

What's going on here?   Very simply, although I added the images and metadata to IPFS, I never “pinned” the files to a pinning service.  As a result, the images simply “aged out” of my local IPFS node, and from all the other nodes on the network as well.  Those NFTs are now probably worthless!

The alien bird images might still be on the creator's desktop, in which case you might be able to complain and have the images re-instated.  But for the time being – and perhaps forever, this NFTs artwork has vanished.

NFT storage best practices for creators

IPFS is the gold standard for NFT metadata and media storage because links in IPFS are totally immutable – we know for sure that once the link is attached to the NFT, the file on the other end of that link can't be changed.  And we definitely want NFTs to be immutable; no one wants to buy a Mona Lisa NFT only to find that after purchase, the image turns into a picture of the creator's cat!  

However, IPFS on its own is not enough;  there needs to be a mechanism in place to ensure that images on IPFS don't simply fade away if they are not accessed.  For developers creating NFTs, a variety of services exist to perform this task.  For instance, Pinata.cloud provides a subscription service that "pins" content to their IPFS servers.  There are also fully distributed solutions such as https://nft.storage/ and https://crust.network/ that store data on distributed IPFS servers which are rewarded with cryptocurrency rewards for storing data. 

If you are an NFT creator and using IPFS for metadata and media storage, it's absolutely essential that you use one of these services.  If you don't, you risk your NFTs failing in the future, with a consequent impact on your royalty and sales revenue. 

What about NFT owners?

If you are an NFT owner, you should be very concerned that your NFT images are stored permanently.  Unfortunately, when you buy an NFT, there's no way to know if the NFT creator used a pinning service and, therefore, no way to be sure that your expensive NFT artwork won't simply disappear in the future. 

Consequently, if NFT owners want to protect their NFTs, they should arrange for the media and metadata to be pinned to an NFT storage solution.  Until recently, this has been largely impractical because there's been no way to automatically pin all the assets associated with the NFTs in a specific wallet. 

Recently, we launched alwaysNFT.cloud to address this issue.  With AlwaysNFT, an NFT owner simply registers their wallet address with us, and we automatically load all the Metadata and images for all the NFTs in that wallet to our distributed IPFS servers.  It's quick, safe, and free for up to 100 NFTs. 

Supporting the Hedera NFT ecosystem 

We are delighted to announce support for Hedera NFTs and the HashPack wallet in the current release of AlwaysNFT.  Hedera joins Ethereum, Polygon, Flow, and Solana as our supported NFT platforms. 

Hedera NFTs are a relatively small portion of the overall NFT marketplace but are growing fast.  We're impressed by Hedera's low carbon footprint and predictable transaction fees.  Furthermore, Hedera's strength in the enterprise blockchain market positions them well for a future in which NFTs are used not just for collectibles and digital art but also to orchestrate transactions for both real-world and digital assets.  We hope we can contribute to this evolution by protecting the off-chain media associated with Hedera NFTs.

Guy Harrison is CEO at alwaysNFT.cloud, the first owner-oriented NFT storage solution.  He can be reached at [email protected] or at @alwaysnftcloud on Twitter.