How to Connect

NFTs are back in the news

In a recent interview on The Joe Rogan Experience, Elon Musk had a couple of opinions about NFTs (non-fungible tokens). He is quoted saying, “The funny thing is the NFT is not even on the blockchain - it’s just a URL to the JPEG … You should at least encode the JPEG in the blockchain. If the company housing the image goes out of business, you don’t have the image anymore.” Did Musk pull the rug out from under the NFT ecosystem?

Not really.

First and foremost: it is crucial to note that not all NFTs are primarily about the image. In many cases, the value of an NFT is the token and its smart contract — the onchain component that can prove ownership, provenance, and authenticity. This is especially true for NFTs that represent "Real World Assets" (RWAs) or a warrant where the token is a digital representation of something that exists off-chain. NFTs are a medium and art/collectibles is only one of many use cases. It is essential that we do not tie the longevity of an image to the purpose of NFTs as a medium. With this in mind, let’s dig into the question of what does onchain mean?

What does it mean to be onchain?

To understand Musk's point, we need to delve into what it means for something to be "onchain." In the simplest terms, being onchain means that the data (in this case, the artwork associated with an NFT) is stored directly on the blockchain. This is significant because the blockchain is immutable and decentralized, ensuring that the data cannot be altered or lost due to the failure of a single point, like a company server.

In the case of NFTs, tokens are typically governed by smart contracts that outline what the token is and how it can be used. These contracts then point to or reference the appropriate image for the tokens. This means that even if a token is onchain, it might be referencing an image stored somewhere else. Due to the size of image files and the cost of storage on blockchains like Ethereum, many NFTs are not fully onchain. Instead, they often store the image on a centralized server or a decentralized file storage system like IPFS (InterPlanetary File System), with the blockchain retaining only a reference to the image. Let us examine the various storage options:

  • Server Hosted: This is the most centralized form of storage. If the server goes down or the company goes out of business, access to the image could be lost.

  • Decentralized Storage Networks: Services like IPFS allow for decentralized storage, reducing the risk of loss but not eliminating it, as the permanence of the file depends on it being 'pinned' by nodes in the network. Another DSN, Arweave takes this a step further by permanently uploading content to what they call the blockweave at lower cost than direct onchain storage.

  • Onchain: Storing data directly on blockchains like Ethereum or Bitcoin is the most secure method, but also the most expensive and least scalable option. Bitcoin Ordinals are a newer innovation that facilitates the creation of NFTs on the Bitcoin blockchain by uploading content into transaction data. For the EVM and other smart contract blockchains, there are two approaches to encoding an image onchain:

    • 01: Storing Entire Images On-Chain: This method involves encoding the image into bytes and storing it within the smart contract. This method is highly secure and decentralized but is usually impractical due to high costs and the large amount of data required for images, especially as the resolution and quality increase.

    • 02: Vector Graphics as Smart Contract Code: This less conventional approach uses vector graphics, which are defined by mathematical equations rather than pixel data, requiring significantly less storage. These equations are embedded within the smart contract, which can render the image dynamically upon request. This method is space-efficient but limited to simpler graphics.

Each of the image storage methods discussed have trade-offs in terms of cost, efficiency, and complexity. The choice of method would depend on the specific requirements of the NFT and the balance between decentralization, permanence, and practicality. From our perspective, a DSN like IPFS is more than sufficient for the majority of utility use-cases and Arweave (still a DSN) is a viable option for longevity of art and collectibles. Onchain is certainly the gold standard and can still be the target for any NFT use-case, it just isn’t as cut and dry as an NFT being 100% onchain or worthless. A primary takeaway from this is that due diligence on art storage/format should be part of any NFT buying decision. As blockchain technology evolves, we may see new methods emerge that offer improved ways of interacting with images onchain.

Jonah Kitay
Jonah Kitay

CEO & Co-Founder of NiftyLabs

More Blogs