When good NFTs go bad
We sampled almost 500,000 NFTs and found about 20% of them were broken
In a previous post, we talked about how to correctly structure NFT metadata and media to prevent NFTs from “going missing” or being altered after minting. This is not a trivial or a new problem — as outlined in this Verge article from 2021, your expensive investment in NFTs could simply evaporate if the links between the NFT blockchain contract and your artwork break.
A well-constructed NFT will not have these issues — the creator will store the metadata and media on the immutable IPFS system, and use a pinning service like alwaysNFT.cloud to ensure that these files don’t “age out” of IPFS. Unfortunately, far too many NFT creators don’t follow these practices.
We recently loaded about half a million NFTs as part of alwaysNFT.cloud testing. We found that about 20% of these NFTs had bad or expired links. What’s worse, some of the NFTs that work today might break in the future as data in IPFS ages out in the future.
In the remainder of this post, we’ll discuss some of the ways that NFTs fail. It’s a bit technical, and if you don’t feel like reading the details we’d quite understand. But if you own NFTs we’d encourage you to create a free alwaysNFT.cloud account — we’ll scan your NFTs and detect any broken links. We’ll also “pin” your NFT media and artwork so it won’t age out in the future.
The gory details
Let’s look at some of the ways in which NFTs can lose track of their assets. There can be many issues, but the main issues we see are:
- tokenURIs that do not resolve to a valid address.
- tokenURIs that resolve to a “stale” IPFS address.
- tokenURIs that resolve to a currently valid address but one that might fail in the future
The tokenURI
is broken (and not on IPFS)
The tokenURI
is a link returned by the smart contract that reveals the token’s metadata. We talked about the tokenURI
in our last post. Losing the metadata is even worse than just losing the image that is linked in the metadata since we no longer have any idea where the image may have lived in the past.
Sometimes we can’t find the metadata because of the tokenURI
points to a broken link. For instance, consider the Super Kongz
token (KONGZ
). About 17,000 of these have been minted on the Polygon network.
When you search the tokenURI
for one of these tokens, you get a URL like this:
https://nftapimetadata.herokuapp.com/api/superkongz/3427
Oh Oh! This is NOT an IPFS link, so the creators of the token or the owners of nftapimetdata.herokuapp.com
could change the metadata at any time (Turning your rare Super Kongz into a flea or something). ‘
But even worse, when we visit that link we see that the link goes nowhere:
The nftapimetadata.herokuapp.com
application is no longer functioning and consequently, all the KONGZ
tokens are now useless. There’s no real good solution here — the creator of the token simply should have used IPFS to store the metadata and not some potentially ephemeral web address.
The tokenURI has “aged out” of IPFS
Even when the tokenURI
points to an IPFS address, it's possible that we still can’t get to the metadata. This can happen if a file in IPFS “ages out” over time. As we discussed in a previous post, data in IFPS will not stay there forever, unless someone either “pins” it, or it is accessed so frequently that it stays in the system.
For example, about 6,000 Bullied Bearz
were minted on the Polygon chain, they have tokenURIs
that look something like this:
http://ipfs.io/ipfs/QmW9RgRmUGHPtMGhfzjWPj9G2BgfGqnpaEuvJ9EkpEFsJk/1010
Some of the URIs can be retrieved. For instance, here is token 6433:
But others just can’t be found, such as token 16930:
The issue here is that the token creator apparently hasn’t pinned the metadata using an IPFS pinning service like alwaysNFT.cloud. It’s possible that the tokens were pinned in the past, but they don’t appear to be pinned now.
IPFS Gateway issues
Sometimes NFT creators use “gateway” IPFS addresses. Gateways direct to IPFS servers run by a specific company. IPFS gateways are a Good Thing — we offer our own gateway at https://alwaysNFT.app/ipfs . However, if you use a gateway address as your permanent tokenURI
or image
link then you are screwed if that gateway goes away or malfunctions.
For example, Shadow Caked Apes
have an image URL that looks something like this:
https://s-village.com/ipfs/
QmUL1dHBJpbSMi8qXgRNMqRYLJMP2FmMFTFp1vu3vbeBuN/1010.json
That gateway link works OK, but weirdly, the media is not available from a generic IPFS lookup:
We’re not entirely sure what is going on here. https://s-village.com/ipfs looks like an IPFS gateway in some respects, but won’t serve general IPFS links. Furthermore, the links served up by https://s-village.com/ipfs can’t be found on the IPFS network.
Regardless of how s-village.com is implemented, it’s dangerous to use a Gateway address in an NFT, because you don’t know for sure that the gateway will function in the indefinite future. If s-village.com closes down, then the NFTs that link to it will become invalid.
Always use public IPFS links for NFT metadata rather than gateways addresses which can’t be guaranteed to remain in place forever
Don’t get us wrong — IPFS gateways are great because they provide very quick access to IPFS servers that actually store the media. But using them for NFT tokenURIs
or media
links is not a good idea, because the gateway may disappear in the future.
We can find the metadata, but not the image
Failure to find NFT metadata is a catastrophic error since it prevents you from even having the faintest idea of where your artwork might be. But even when the metadata can be found, sometimes the resulting image
URL can not be reached.
Perhaps the most common scenario is an IPFS reference that is no longer held on the IPFS network. For instance, KONG tokens provide us with an image URL like this
https://ipfs.io/ipfs/QmXp1KjrTtR9oVNZxhKjzMFXWtgoyTM6ZJyFEXodzgEZQ1/2911.png
But when we follow that link there is (no longer) anything there:
It seems that this file has aged out of IPFS. At some point in the past, the artwork was on IPFS, but because no one pinned it to a pinning service like alwaysNFT.cloud, it aged out of IPFS and now cannot be found.
Here today, gone tomorrow
Sometimes we find image links that are valid, but not on IPFS. For instance, LV Ape tokens
have links like this:
Today, this link correctly (I assume) resolves to an LV Ape
:
This link works today but it could be gone in the future. Even worse, this link could point to something else in the future. The creator of the art could remove the art from that link and substitute something else.
All NFT image links should point to IPFS locations to prevent loss or substitution of media
There are a million ways to die in the NFTverse
We’ve looked at a few of the most common errors we encounter when trying to read NFT metadata and images. The variation in the quality and integrity of NFTs is amazing. Even when it appears that a great deal of effort and imagination has gone into the NFT artwork, the underlying NFT construction can be very unsound.
We recently processed about 498,000 NFTs as part of some testing we were performing on alwaysNFT.cloud. Of those NFTs:
- about 76,000 had
tokenURI
addresses that could not be resolved and as a result, we could not obtain token Metadata. - A further 4,600 had broken paths for the image URI.
- Almost 19,000 had IPFS links to media that could not be resolved.
Those figures are pretty frightening! They suggest that roughly 20% of NFTs are broken.
So what can we do about it?
If you are a creator, you should follow the best practices outlined in our previous post: make sure you use IPFS for metadata and media, and make sure you pin your IPFS files using a service like alwaysNFT.cloud.
If you are an owner, you should check as best you can before you buy an NFT that its metadata is correctly configured. https://checkmynft.com/ can help if you are buying an Ethereum NFT. For existing NFTs, we suggest you create a free account on alwaysNFT.cloud and scan your NFT portfolio. We’ll tell you which NFTs are good and which are not so good, and we’ll pin all the media and metadata we find. You’ll at least know that NFTs that are in good shape today will be in good shape tomorrow!
alwaysNFT.cloud protects NFT metadata and media by permanently pinning off-chain NFT files to the immutable IPFS platform. For the first time, NFT owners can protect themselves against rug-pulling and loss of artwork by pinning their portfolio using alwaysNFT. NFT creators can use alwaysNFT to ensure that their NFT media and metadata never “goes missing” and thereby protect their royalty revenues.
Sign up for a free alwaysNFT account today at alwaysNFT.cloud