# ID selection

## 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://joint404.gitbook.io/untitled/variations/id-selection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
