We built our NFTs for eternity — and here’s how you can do it, too

How to create most resilient NFTs on Ethereum, IPFS and the Arweave permaweb

Rov3r
mars26
5 min readMay 5, 2021

--

*

Non-fungible tokens are indestructible proofs of ownership. Holding an NFT proves to anyone that you are the person owning — for example — the specific NFT #123 together with its attached piece of art, unique traits and other features.

But, not all NFTs are created equal. In fact, some NFTs are built so weak that they can literally be rug-pulled:

Other NFTs, however, are said to be built to last and as persistent as an Ethereum transaction itself.

To understand the differences and see how to build a NFT that lasts, let us dig into the decisions we made for our NFT design.

The challenge of NFT resilience

Our goal, naturally, is to build Mars NFTs that last for eternity. Images, traits and features should be available well into the future. No person should be able to delete or change them, a bankruptcy of some random cloud company shouldn’t take the NFTs down.

So how can we achieve that?

NFTs usually consist of 2 parts: The smart contract on Ethereum which stores a link to metadata and the actual metadata such as pictures and traits.

And here comes the problem: If metadata is stored solely on centralized servers, NFTs might go offline together with those servers.

Our solution is the following:

  • NFT smart contracts are stored on the Ethereum blockchain, the blockchainest blockchain of all blockchains ;)
  • The contract itself stores a hash over all NFT metadata, the provenanceHash, proving the immutability of all metadata and their randomized initial sequence
  • IPFS hashes are written into the NFT contract itself
  • Metadata and imagery stored on cloud storage and pinned to IPFS
  • Metadata and imagery stored on the Arweave permaweb which nodes also pin the data on IPFS

The contract code is public and verified on Etherscan (address), which guarantees that the smart contract does indeed behave the way you expect it to. The contract itself stores a hash over all NFT metadata, the provenanceHash, proving the immutability of all metadata and their randomized initial sequence.

You can verify this by yourself by concatenating all NFT metadata IPFS v0 CIDs in their initial sequence and hashing the concatenated string using SHA2–256. Note that we hashed the CIDs in their base58 representation (starting with Qm…).

We will also write all IPFS hashes into the NFT contract itself. This way even the link between the smart contract and the stored data is as resilient as possible. The contract is waiting for this information to be added from us when we have the ~20 ETH for it. Not a lot of projects do this as it is expensive, but we think it’s worth it.

Now let’s take a look at what storing data on IPFS and Arweave actually means for our NFTs.

IPFS is awesome, because it enables anybody to access a piece of content that’s stored in a decentralized manner via one single link. The link includes the content’s Content-Identifier (CID) no matter which and how many servers the files are stored on. Check out the metadata stored for one of our NFTs here.

Storing our NFTs on IPFS therefore increases resilience against servers going offline. Even if one server with NFT data should go offline, other servers will keep the file available at that same URL. This process of offering a file to be accessed via IPFS is called ‘pinning’ and we pin our images and metadata via IPFS. You can do it, too!

However, it is not guaranteed for files on IPFS to stay online forever, because at this point IPFS lacks the economic incentive for pinning — pinners don’t earn money by pinning our NFTs on IFPS.

And that’s where Arweave comes into play.

The Arweave Permaweb

Arweave is a protocol built specifically for permanent data storage. Whereas IPFS builds a layer for accessing files, Arweave builds the long-term storage itself and it also pays nodes for holding data, in our case NFT images and metadata.

Now Arweave has a great new feature: It lets you deploy your images and other NFT metadata on the Arweave permaweb and at the same time have Arweave nodes pin your content to IPFS. In our case, this enables us to not only have Mars26 pin the metadata to IPFS, but let other Arweave nodes do the same. Double insurance on data storage.

Read more about this feature of Arweave read here:

Learn how to use Arweave here:

And if you are curious on current Arweave deployment costs you can check:

You can also check our NFTs’ storage permanence rating at Check My NFT. To check Mars NFTs, however, you need to wait until we added the IPFS hashes into the contract as mentioned above. The upside for waiting is that Mars NFTs will get the strongest rating.

That’s why we are confident that our Mars NFTs will stay accessible even long after humans have already settled Mars. We hope you can learn from our example and are happy to answer any of your questions in our chat:

*Today’s featured image shows the Alga crater. This crater is thought to have deposits of impact glass that may have preserved ancient biosignatures, if those existed during the impact that created the crater. From observations here on Earth, researchers know that impactite preserves signs of life on Earth. Therefore we hope to be able to inspect it closely and see whether life existed on the planet. NASA has more interesting information and pics.

--

--