Stacked NFTs - NFTs with quantity - A solution to minting large amount of same
NFTs
#46
markopoloparadox
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Simple Summary
Stacked NFTs allow for light* minting unlimited** NFTs that contain the same data. Besides the light mint, operations like split stack, combine stack are also supported. On Marketplace you can either sell the whole stack (with all the items) or set the stack for sell and allow users to buy from 1 to 1000 NFTs from that stack per tx.
Terminology
In this discussion I will be using the following definition for "stack" (source: WoW):
Here "same items" means NFTs that have the same NFTData.
Rest state: An NFT which is not rented, delegated, listed for sale,...
Motivation:
In video games it's common to see the same item being multiplied and stored inside a stack. This isn't only applicable to games, in the rest of the entertainment industry we can see the same behavior like for theaters or concert tickets. Since this behavior is quite common it would make sense for us to have the same or similar behavior available on our blockchain.
Currently to mint 1 million NFTs you would need to do 500 batched transactions (2k per batch) which would take at least 50 minutes to do it. You can get a similar effect with Stacked NFTs with just two transactions which takes 12 seconds to do it.
Implementation
Extending Basic NFT
Storage
One new storage will be created:
Two existing storage will be updated:
Interface
The following interfaces(extrinsics) will be added:
convert_to_stack
Descriptions: Creates a stack out of an existing NFT. The caller pays the full price for all those NFTs (example: quantity 100 means the user needs to pay 99 x NFT mint fee to treasury.)
Constraints:
split_stack
Descriptions: Splits a stack into two (stacked) NFTs. If one of the split stacks has the quantity 1, it will actually not become a stacked NFT instead it will be a normal one.
Constraints:
combine_stacks
Descriptions: Combines any two (stacked) NFTs into a stacked NFT. The nft_id_1 will become the combined NFT while the nft_id_2 will be destroyed. You can combine any stacked and non stacked NFTs as long as they are the same.
Constraints:
set_stack_size
Descriptions: Increases or deceases the size of a existing stack. If increases then the caller pays for the additional NFTs.
Constraints:
Extending Marketplace
Storage
One existing storage will be updated:
Interface
The following interfaces(extrinsics) will be added:
list_stack (Placeholder name)
Descriptions: It lists a stack to be bought in chunks. The chunk_size represents the maximum amount of NFTs that can be bought in one go. If set to None there is no limit. There is a hard limit that will be set to 1000.
Constraints:
buy_stack (Placeholder name)
Descriptions: Buys quantity number of NFTs from one stack. If
quantity
is larger than 1 the user gets a stacked NFT.Constraints:
Interaction with the rest of the system
The added Basic NFT extension doesn't have a impact on how other extensions (besides collections) and features work. You can normally list/auction an NFT that is stacked and the person who bought that NFT will get the whole stacked NFT. The
list_stack
interface here is only to provide a option to sell chunks of a stacked NFT instead of everything.Additional Information
A stacked NFT with quantity 0 is automatically destroyed.
A stacked NFT with quantity 1 will automatically become a non-stacked NFT (unless the NFT is listed for sale)
Beta Was this translation helpful? Give feedback.
All reactions