The Elegance of the NFT Provenance Hash solution
For all those who have wondered what the NFT Provenance Hash is and how it works, this article is for you.
The NFT space has seen considerable growth in the past few months, with successful NFT collections reaching all-time highs. This has led to an explosive growth in the number of upcoming projects coming up. For both aspiring and long-term NFT enthusiasts, there is an increasing need to be able to discern the good projects from the bad.
For a typical NFT drop, NFTs within the collection come with different traits and rarities, with some being ultra rare or even legendary. NFTs with higher tiers of rarity are hence worth much more than the more common versions. Fair distribution and transparency is hence extremely important during the NFT launch, as this directly impacts the confidence and value of the NFT collection post-mint. The NFT Provenance Hash, done correctly, ensures the fairness of a project’s NFT distribution during and post mint.
Personally, I do believe that the Bored Ape Yacht Club implementation of the NFT Provenance Hash solution is the gold standard. Click here to see it on their website!
What is an NFT Provenance Hash?
To understand the NFT Provenance Hash, we must first understand the problems that it was developed to solve. When minting NFT collections, the order in which the NFT tokens are assigned to the NFT artwork and metadata is important. If the order of assignment (Token 1 to Image 1… Token n to Image n) is hidden prior to the mint, NFT buyers have no guarantee that the projects will not manipulate the assignment post-mint for their own benefits. Yet, if the NFT Token URI is set to the final list of metadata and images, savvy NFT buyers will be able to see the metadata and images for the entire collection even before the mint is completed. This allows them to target mint around a range of numbers to try and get the collection’s rarest NFTs.
This poses a paradoxical problem to the developers. How can we protect the NFT metadata during launch, and prove that the Token assignment was truly fair post-mint?
- NFT projects should not release the final Token URI until the final NFT has been minted, to prevent savvy snipers from acquiring the best ones in the collection.
- Developers need a way to prove that the order of the Token Image and metadata was set pre-mint, and was not manipulated.
- Developers need to generate a fair random number post-mint to start the distribution of the NFT from that number.
This is where the Provenance Hash comes in.
Hashing the Images
So what is a hash? A hash is simply a one-way conversion of data to a string, that is extremely difficult to reverse(read here for how much time it takes to brute force a 256 Hash). Think of it as a giving a piece of data a unique fingerprint!
You can use the fingerprint to match it to a person who gives you their fingerprint, but you cannot derive how this person looks like simply from having his fingerprint. In this same way, we can:
- Generate a hash from an image which cannot be reverse engineered.
- Prove that the hash belongs to the original image if we have the original image.
Image to Hash demonstration
First, we read our image as a string. I’ll be using art from my upcoming NFT collection, Tasty Toastys as examples.
Next, we use a SHA-256 hashing algorithm to generate a hash of our image, using the bytes data of our image.
Voila! We have our first Image fingerprint!
But that’s not all!
Hashing the Hashes
We can go one step further, and create a hash of the hashes, to prove that the order of the images have been predetermined on the creation of the hash. We can achieve this by combining the hashes of the images in a sequential order, and hash this new string! The order is immutable since changing the order in which the hashes were combined will result in a different hash. We call this final hash the Provenance Hash.
Hashes to Hash demonstration
For Images 1 to N, we can generate all their individual hashes:
Next, we combine the hash strings of each image in the correct sequence.
Combined Hash String:
We then hash this new string to create our provenance hash!
Basket 1 Provenance Hash:
If we changed the order we sequenced the NFT images, we will get a totally different Provenance Hash.
Combined Hash String:
Basket 2 Provenance Hash:
With the provenance hash, NFT projects can prove to the community that the NFT images and metadata were pre-determined beforehand, without having to expose their metadata before launch!
Last but not least, developers can prove that the starting number used to begin assigning tokens to their images was not manipulated. We can do this in the minting smart contract. By taking the block number of the last minted NFT in the collection, and dividing it by the total supply of the NFT and taking the remainder, we can generate a number that cannot be manipulated by the developers. Buyers have no incentive to manipulate this number as well, since the starting sequence of the NFT Images and metadata are unknown to them.
One thing to note is that the Provenance Hash should be released prior to the launch of the mint, so that it is clear that the order of the images and metadata were determined before token ids were distributed to the buyers. If the provenance hash is disclosed post-mint, this means that it is possible that the order was determined post-mint.
The NFT Provenance Hash solution is able to solve the paradoxical needs of a successful NFT drop; ensure image and metadata privacy during launch, and ensure post-mint transparency and fairness in the distribution.
A simple and elegant solution indeed.
Why this matters
- For NFT buyers, it is important to see if upcoming projects will be implementing this. Implementing the Provenance Hash solution is a public commitment to fairness and transparency.
- For NFT projects, doing a Provenance Hash will increase buyer confidence and clear any potential doubts that the distribution of the NFTs was manipulated or unfair.
I hope that this article has helped you understand the NFT Provenance Hash better, and builds awareness and transparency in the NFT community moving forward.
Also, remember to follow me on Medium as I will be writing more about the NFT space in the coming weeks!
- Copy Trading | Crypto Tax Software
- Grid Trading | Crypto Hardware Wallet
- 10 Best Books on Crypto |5 Best Crypto Bots in the UK
- Koinly Review | Binaryx Review | Hodlnaut vs CakeDefi
- MoonXBT vs Bybit vs Binance |Hardware Wallets
- Huobi Trading Bot |How to buy ADA |Geco.One Review
- Binance vs Bitstamp | Bitpanda vs Coinbase vs Coinsbit
- Crypto Telegram Signals | Crypto Trading Bot
- Best Crypto Exchange | Best Crypto Exchange in India
- Best Crypto APIs for Developers
- Best Crypto Lending Platform
- An ultimate guide to Leveraged Token