Anish-Agnihotri / MultiRaffle

NFT distribution with (1) randomized, multi-winner raffles and (2) bulk on-chain metadata generation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential gas war / unfairness when claiming low tokenId

ARR4N opened this issue · comments

_safeMint(msg.sender, nftCount + 1);

What do you think about _safeMint(msg.sender, ticket[i]) instead? Currently, if there's any value in a low tokenId then there's an incentive for gas wars / people gaming the system, but if you stop tracking nftCount and instead issue the shuffled position then that's negated.

If it calls _safeMint(msg.sender, ticket[i]) instead, we can even skip the subsequent randomness requests from Chainlink and drop Metadata right?

Let's say it is your typical 10,000 profile pictures project hosted on IPFS under a single URL. By using ticket[i] as the token ID, even if all the collection metadata is revealed before the raffle happens, is it safe to say that it does not matter because raffleEntries will be shuffled anyway?

Wouldn't that cause issues with the enumeration of tokens, if there were gaps between token ids as someone can forget or intentionally never mint their NFTs?