ID selection
Pulling IDs from the pool array
Joint404FIFO :
This version implements a First-In-First-Out (FIFO) system, where the first NFT ID to enter the system is the first to exit. It currently tracks IDs in a fixed-size array with indexes for reading and writing, looping continuously without the need to reset IDs, thus optimizing gas usage. Enhanced security measures include the absence of a contract owner, ensuring funds in the vault remain secure with no way for the deployer to remove them.
Joint404FILO :
Following the First-In-Last-Out (FILO) principle, this version efficiently manages NFT IDs; Currently using a fixed array structure with pointers, we optimize for gas usage by avoiding the need to reset IDs as they are pulled. In some instances, such as in Liquidity Pool (LP) scenarios where tokens must be purchased on a DEX to unlock IDs deposited earlier in the array, NFTs held deeper in the stack are revealed as the price increases.
Joint404Hash :
Here we utilize a pseudorandom number hashed from a combination of values such as the block hash, user wallet, and timestamp, to select a random ID from the pool. While susceptible to potential manipulation by validators, it offers a free and instantaneous pseudorandom option for devs who prioritize convenience and low shuffle costs for their users.
Joint404VRF :
With Verifiable Random Function (VRF) technology, we can leverage trusted oracles for secure and tamper-proof random number generation. While users will likely need to pay a fee to obtain these random numbers in a timely manner, alternative low cost methods might include sharing a VRF number across multiple users, possibly using the Witnet oracle. Chainlink VRF is the standard currently and has the best reputation for minimizing the risk of validator hacks and manipulation, instilling confidence in users regarding the fairness of the shuffle.
Last updated