Where are NFTs “stored”? Learn more about blockchain storage techniques
Non-fungible tokens (or NFTs) are a form of digital media.
Like other digital media — from words written in cryptocurrency articles to YouTube videos and music on streaming platforms — NFTs, at their most basic, consist of data made up of ones and zeros.
This is important because everything associated with an NFT — from the existing standalone contract to the URL used to view an image — boils down to ones and zeros stored on a computer.
However, not all NFT storage techniques are created equal. Some NFT holders may have no more than a URL or token ID.
Therefore, it is important to take the time to understand how NFT storage works before thinking about buying or creating NFTs.
First, it is necessary to analyze some basic terms:
🖥️ servers – Computers like these may be the ones you are reading this article on. Unlike a regular computer, servers are quite powerful and can run many different programs simultaneously. Basically, NFTs live and are stored on servers.
☁️ Accommodation – Most people don’t manage their own servers, so whether they realize it or not, they depend on someone else to provide them with that service. Hosting refers to a set of services, including storage, that are typically performed on servers. All NFTs are hosted somewhere.
💽 Metadata – Data describing other data. Metadata helps servers find, process and store data more efficiently. NFT metadata describes characteristics (for a NFT or PFP profile picture) such as name, color, size, shape, type of hat, glasses, etc.
#️⃣ hash – It is a cryptographic function that, based on the entered data, gives the same result every time. Hash is often used to encode a lot of information in a verifiable and efficient way. An NFT and all its metadata can be stored in a single hash. For hashing experience go to this hashing generator.
📝 Independent contracts — These are programming instructions that live on the blockchain. They are the foundations of decentralized applications (or dapps), including most NFTs. The rules for issuing and converting NFTs can be found in individual contracts.
Chain storage vs. “off the chain”
On-chain NFT storage means that the entire NFT—the image and all its metadata—exists on the blockchain. On the other hand, NFTs stored “off-chain” means that part or a large part of the NFT is stored off-chain.
On-chain storage is preferred because it means users can verify all aspects of the NFT. However, very few projects opt for this storage method.
One project that opts for on-chain storage is Autoglyphs. The reason is simple — JPEG images contain a lot of data, especially when those images exist in collections in the order of hundreds or tens of hundreds.
As a consequence, most NFT projects choose to store images “off-chain”. Many popular projects such as CryptoPunks and Bored Ape Yacht Club (or BAYC) have opted for “off-chain” storage.
Centralized storage vs. decentralized
In the case of off-chain storage, the NFT’s standalone contract contains information indicating the location of the JPEG image. Generally, a JPEG image and its metadata are stored in a hash.
This hash is used to indicate a centralized or decentralized hosting provider.
Examples of centralized storage vendors include Amazon and Google. Centralized storage service providers run servers that store the ones and zeros that make up NFTs.
The risk with centralized storage providers is that, although unlikely, they may shut down at any time and the owner’s NFT may be lost. All that would be left, in some cases, would be a simple hash that exists in a stand-alone contract.
This is why many projects choose to use decentralized solutions to store their NFTs. The most common solution would be to store the data on the InterPlanetary File System (or IPFS).
IPFS is a distributed peer-to-peer network where files are stored between multiple nodes, making them resilient to single points of failure, such as server problems.
Although NFTs stored in IPFS are not technically stored “on-chain”, they are theoretically more secure because IPFS is censorship resistant; no entity has the power to turn it off.
*Translated by Daniela Pereira do Nascimento with permission decrypt.co.
Want to invest in digital assets but don’t know where to start? Bitcoin Market offers the best and safest trading experience for anyone taking their first steps in the digital economy. Meet MB!