What makes Dungeons NFT special?
About Dungeons NFT
Dungeons NFT is a randomised generative dungeon stored on the Ethereum blockchain. Unlike 99% of all other NFT's, Dungeons NFT is generated entirely on-chain with no external storage or 3rd party servers required to host them. So long as the Ethereum blockchain exists, so will Dungeons NFT.
The problem with regular NFT’s
There is a dirty little secret in the world of NFT’s that 99% of buyers have no idea is a problem. The vast majority of NFT contracts only provide one function that controls most of what you see on a secondary marketplace like OpenSea. This function is part of the ERC-721 standard and is called tokenURI.
TokenURI takes a single parameter which represents the numeric id of the NFT that belongs to a user. So if you own NFT with an id of 1000, and view that NFT, OpenSea and any other marketplace will call the tokenURI function passing id 1000 which will return a URL (web address) to the metadata. The only thing the contract contains for every NFT is a single token ID and nothing else.
Here is an example response for a call to TokenURI for the popular Cool Cats NFT project:
What do you notice about the URI that is returned? Well, the URI is https://api.coolcatsnft.com/cat/100. What do you think would happen if the devs of cool cats stopped paying for their web server hosting? The simple answer is that the NFT would no longer have any metadata or images associated with it. Also, the Cool Cats devs could decide to re-roll your NFT and change all of their traits and appearance any time they wished.
Some projects like the Bored Ape Yacht Club go one step further and point the URL they produce to the Interplanetary File System (IPFS).
IPFS is a distributed file system that needs just one copy of the file to exist for it to be served to a user. But if that file goes unaccessed for an extended period of time, then it may be removed from the servers to make space for newer files. Once it is removed from the last server, it is no longer available and the NFT will become inaccessible.
IPFS servers are also not natively accessible by web browsers, so the IPFS links have to be served using an IPFS gateway service like Pinata. If the service becomes unavailable then the content will no longer be available unless the original dev updates the contract to consume a different service.
A better way, on-chain data
There is a very small category of NFT’s that generate the metadata for the NFT and/or the image for the NFT using the Ethereum Virtual Machine (EVM) and return the data directly inline to the browser. This means they need no external services to provide the data and/or image so they will last as long as the Ethereum blockchain exists.
These projects tend to be very expensive to buy. An example of one of those is Autoglyphs, which returns an array of ascii characters directly to the browser from the EVM. Here is an example of an Autoglyph:
This is the lowest price Autoglyph available on OpenSea:
Yes, your eyes are not deceiving you, that is 385 Ethereum or approximately $1.2 million at the current price of Eth. The rarest one is Autoglyph #145 and is listed for 14,500 Eth or roughly $45 million. The main reason for that high price is the rarity of on-chain generation of NFT’s.
If you query the tokenURI for Auoglyphs, what does it return then. Let’s try querying the contract for token ID 100:
So the contract returns a URL that starts with the prefix data:text and is then followed by the actual text output that represents the image of the NFT. That syntax means the content returned is not a URL to an external service, but is the data itself to be displayed by the browser. No external servers or services are required to render this. It will exist forever on the Ethereum blockchain.
But there is no metadata returned with the tokenURI, only a ascii representation of the NFT. Even the dimensions are not defined, so OpenSea has to be specifically coded for the Autoglyphs contract so it can display it correctly.
What about Dungeons NFT?
So back to the original question, what makes Dungeons NFT special? Let’s query the contract for a tokenURI and see what we get back:
So the Dungeons NFT contract returns a base64 encoded JSON data packet that represents the metadata of the NFT and is generated directly by the contract. Autoglyphs and the few NFT contracts that do on-chain generation don't usually return any metadata, they just return a representation of the image. Let’s decode the data returned by Dungeons NFT and see what it contains:
So looking at the base64 data returned from the contract, we can see that the metadata describing the Dungeons NFT is returned inline by the contract and doesn’t point to an external server. What’s more, the image tag in the data is also returned as an inline data type image/svg+xml that is also base64 encoded.
We can decode this data again using the same tool and we get the following:
As you can see, the image returned is a Scaleable Vector Graphics (SVG) rendering of the Dungeon itself which is then rendered by OpenSea without referencing any external servers. Here is how OpenSea renders the above NFT:
The EVM is very limited on the size of a contract and the amount of time a contract function can execute for. It is extremely challenging to do any of this kind of processing within those constraints, and that is what makes Dungeons NFT unique.
Dungeons NFT will last as long as the Ethereum blockchain lasts. Even though I am the developer, I can never change that contract and can never change the metadata it returns. It is completely immutable and in my opinion, that is what makes it valuable and completely unique.
Join us on discord: discord.gg/g74fcrK5