ERC-7753: Algorithmically generated NFT

A non-fungible token standard that uses mathematical algorithms to draw and store images without any servers or storage space.

The current NFT solutions store images on IPFS or third-party servers, consuming storage space and being separate from the blockchain. Our goal is to represent image information using mathematical algorithms stored in smart contracts, tightly integrating with the blockchain. This approach uses no storage space and allows anyone to render the image information at any time based on the algorithm stored in the smart contract.

Here’s an example of using mathematical algorithms to draw dynamic flames.

The proposal doesn’t cover that onchain NFTs using data URIs have existed for some time.

What should be returned by tokenURI?

ERCs don’t need to include admin methods e.g. setTokenAlgorithm

1 Like

Storing SVG files often requires writing a large amount of data, which can significantly increase gas consumption. However, by using mathematical algorithms, a large number of different images can be represented through just a few simple formulas and variables, resulting in minimal storage requirements (only a few formulas and variables). Moreover, representing images through mathematical algorithms has a modular nature, allowing for significant changes to an image by adding, removing algorithms, or altering variables.
I think we could: instead of traditionally using URLs(tokenURI) to point to images, we can switch to pointing to mathematical algorithms.

Have a look at iNFT as a proof-of-concept example that uses a base64 onchain-stored wrapper of IPFS-stored JavaScript that generates SVG tessellations.

Would this solution work for your math as well?

1 Like

I am going to echo @abcoathup’s comment that ERCs shouldn’t include functions that are only going to be called by the contract’s owner. The owner already knows how to interact with their contract, and over-specifying interfaces hurt flexibility.

I’d also suggest renaming the event to AlgorithmChange, and the getter to just algorithmOf to match ERC-721’s naming convention.

1 Like