Origin-Byte / nft-protocol

Sui NFT Smart contracts maintained by the Origin Byte team
Other
147 stars 67 forks source link

Minting of NFTs to the Launchpad - Gas costs accrued by the Deployer #43

Open joaoaccaldeira opened 2 years ago

joaoaccaldeira commented 2 years ago

It is rather inefficient to make it so that the module publisher is the one to mint all the collection NFTs to the Launchpad, as the gas costs for a collection 1k, 5k, 10k, would simply be too expensive to be paid by one single entity.

In Solidity, the minting of an NFT is made by each address that wishes to do so and I do believe this should be the case in your NFT standard.

nmboavida commented 2 years ago

Hey João, this is an interesting proposal indeed. Are you able to describe in more detail how this process would work from your point of view?

We have considered doing it in the way you've described, however if we expose a function for anyone to perform the initial mint, the function caller will ultimately have control over what metadata gets minted onto the NFT. So if I am an NFT Creator, how would I maintain control over what NFTs exist in my collection (from a point of view of that data contained within them)?

I believe our Loose NFT implementation can help reducing the costs, in that in this implementation only the Data objects are minted by the Creators, whilst the NFTs themselves can be minted thereafter by the buyers. So if a Collection has 100 distinct data objects, the Creators would only have to mint 100 objects, and buyers could come in after and mint thousands or hundreds of thousands of NFTs that point to those data objects.

Looking forward to hear your thoughts on this and to explore your point of view further.

joaoaccaldeira commented 2 years ago

I've been thinking about this for a while and I think that for the majority of the projects, creators will simply use the URL metadata for their NFTs. It's very likely that this will be the case in Sui (at least during the first months), as well as it is in Aptos and of course in all the EVM chains.

For people who want to use the standard NFT implementation, I think the standard way to go about it would be for the creator to set a "baseURL" for the Unique NFTs. Each unique NFT has an index and all you need to do then is append the index of that unique nft to the URL string of that NFT.

Basically like this: baseURL = "ipfs//QmVnu7JQVoDRqSgHBzraYp7Hy78HwJtLFi6nUFCowTGdzp" (set by the creator) URL_of_uniqueNFT_with_index_5 = "ipfs//QmVnu7JQVoDRqSgHBzraYp7Hy78HwJtLFi6nUFCowTGdzp/5.json"

This way the logic is still set by the creator and then each user can mint the NFTs themselves, which means we don't have the gas problem I referred to earlier.

nmboavida commented 2 years ago

Hey João, thanks for the detailed write-up, it is really helpful! We have decided to rearrange our NFT release flow to accomodate this use case, as well as some others we haven't accomodated so far. You can see the release flows we are considering in the following issue.

We appreciate the feedback, we will be implementing this release flow in the upcoming iteration, feel free to provide further feedback on it whenever you see fit 👍