What is the size limit for on-chain NFTs? How much space do they take approximately?

1
0

How much Data/Size Limit should I be aiming for when going for On-Chain NFTs? E.g. Autoglyphs, How much storage space are these NFTs taking approximately?


To post an answer, please !

1 answer

34 views

Really good question! In short, different on-chain NFTs are made differently. Autoglyphs were one of the most inefficient on-chain NFTs created, where the data for every Autoglyph NFT was stored individually by every user minting, causing the amount of gas consumed by each transaction to be about 2.5 million gas - compare that to an average NFT mint that would cost anywhere from 50,000-200,000 units of gas! ​ https://etherscan.io/tx/0xede9c79fee3218a588fedcb31d6e40bc2571ed7fc7d88d1ce62c76112eab9655Screen Shot 2022-07-05 at 9.26.02 PM.png​ Conversely, more 'modern' on-chain NFTs typically store all the data for various traits/layers for generating complete NFTs upfront, meaning developers have to pay some fairly hefty fees to store all the data themselves, but then no one minting has to pay anything to mint an NFT. ​ All the logic for rendering the complete NFT is then done in a free-to-call read-only function, which uses a small 'seed' string that's saved at the time of minting every new NFT to determine which specific pre-saved on-chain layers to combine together to render the official NFT someone minted. ​ A good example of this is ChainRunners, where you can see transactions to mint, while on the high end still, only cost 200,000 units of gas - more than 90% less than minting an Autoglyph! ​ https://etherscan.io/tx/0x8b1fd9e3a991d7854951fcd0ea23f0126e80b43662064558ff946461d4281fc9Screen Shot 2022-07-05 at 9.30.37 PM.png​ And yet this still all truly on chain. You can see the original on-chain rendering contract that stored all the data for the NFTs here: https://etherscan.io/address/0xfDac77881ff861fF76a83cc43a1be3C317c6A1cC ​ And you can see the developers made 8 calls to the contract to store all the data for the NFTs on-chain (SVG layers), with the calls totaling 77,742,367 units of gas, which consumed 7.5 ETH worth of gas at an average gas price of around ~90 gwei. ​ Certainly not cheap, but way cheaper than everyone having to pay an insane amount of gas themselves to store that data on chain! ​ As for how much data was stored on chain with all those transactions - it was somewhere in the range of ~600 KB (you can copy and save all the input data seen in each transaction and save it and see how many KB it consumes, e.g. the input data from one of their transactions here: https://etherscan.io/tx/0x3e99dd411754285fd6723d48acb1af31bd3cdf7170210d8238655a605aa87bd4). Pretty expensive to store data on Ethereum! :) ​ Hope that helps! Of course, you can store much less data than this if you want to have fewer traits for a generative NFT collection on-chain, or much more than this if you want to have more traits, or more complex traits. All up to you!

2
0

Not the answer you're looking for? Browse other questions tagged #NFTs or ask your own question.