0

Problem is minting of tokens in random order. I would like to hear more about drawbacks of these approaches:

Having:

  • 10.000 NFT collectibles
  • amongst them there are rare ones
  • images are clearly showing this rarity
  • metadata + images are revealed after sell-out

1/ Effortless way is to save metadata+images to ipfs in randomized order [3856, 17, 6668, 735..] but with sorted ids as 1 .. 10000. I don't like the fact that operators know exact location of rare ones, and that makes me uneasy.

2/ Mint starts in order 1 .. 10000, metadata is not uploaded yet. After sell-out, contract method using ChainLink VRF is called, and it generate random numbers which assign rarity to tokens with these ids. Then metadata is uploaded to ipfs, then reveal. I don't like that ipfs CID update, though.

3/ Also ChainLink VRF, but in every call of mint function. Might get expensive with pricing = 2 LINK / token.

I understand that no solution is perfect, but is there any better way to go when minting tokens in random order?

 

EDIT: I ended up using slightly different solution, described it here: repository

1 Answer 1

1

You can go for option 3, but use a single call to chainlink and then expand the random number for each token number. Thanks how I did it in the Wavelength contract here: https://etherscan.io/address/0x68930072647a0d79e601d5ee3914833ae9148247#code

Relevant line is 2423. Hope that helps.

3
  • That way the numbers are not predictable by users or the project team. I used the plant seed function after it sold out and it saved a ton of link.
    – Fatlion
    Commented Feb 17, 2022 at 11:54
  • Exactly the same thing I ended up with. Nice thinking, although had some problem explaining people why have I done this because they even couldn't understand they might be bad players :D
    – wtdmn
    Commented Feb 19, 2022 at 23:59
  • Hi, @Fatlion, I've been reviewing your contract and the getSeed function in line 2423 but I don't understand how it is related to minting each token. I see that plantSeed starts the Chainlink VRF process by calling requestRandomness and the corresponding fulfillRandomness sets the state variable baseSeed to the random number returned by Chainlink but I can't see how all the pieces fit together. Is this supposed to be a mint in two steps with users minting first and some time later the owner triggering a reveal by calling a function? Could you please add some more details?
    – Mentakatz
    Commented Aug 7, 2022 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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