# Fair Launch - FutureHash Lottery

MouseDev previously introduced a method for generating NFTs using random numbers, and we are extremely grateful for his work, which allows us to continue moving forward on the shoulders of giants!

Based on his concept, we introduce a new protocol: the FutureHash Lottery Protocol — utilizing future block hashes as a random number generator in the lottery process. This protocol aims to solve the issue of fair launch and distribution of Memecoins and NFTs.

### **The traditional hash-based random number generation method has the following problems:**

* Manipulation: While mechanisms are designed to prevent bot operations, the use of block hash data and partial number calculations can still potentially be exploited by bots with significant computational resources for prediction.
* Complexity and verification challenges: The method can be overly complex for average users, with many random number verification methods being off-chain and difficult for the general user to verify and comprehend.
* Efficiency issues due to one valid mint per block, especially in high-demand scenarios.

### **The FutureHash Lottery Protocol offers new improvements:**

* Using future block hash data: Users mint lottery tickets and commit to using data from the third block in the future, which is unknown at the time of commitment, ensuring that the data used for the draw is also unknown at the time of minting.
* Increasing the number of winners per block: The number of winners is determined by a random number between 1-6, generated using future block hash data. This means that 1-6 winners will be produced for the corresponding draw block, increasing the odds of winning while ensuring randomness.
* Introducing the concept of 'lucky block explosions': When the number of participants in a draw is less than the number of winners, users will receive bonus tickets. For example, if the future data hash generates 6 random winning tickets, but only 3 users are participating in the draw, each user will receive 3 additional winning tickets on top of their initial ticket.

### FutureHash protocol

1. 100% pure on-chain random number generation

random number is generated based on the hash value of the fourth future block and the difficulty of the fifth block. The random number is then deduced into two random numbers:

* The number of winning tickets in the block, which is between one and six.
* The pick of winning tickets within the total number of tickets in the block.

The winning tickets are determined based on these two numbers.

2. Lucky block explosions

A. If the total number of tickets submitted by the participants in each block is less than the number of winning tickets, someone will get lucky and get picked multiple times for the wins.

B. If the participant's ticket is located exactly in the middle or the end, and the pick is equal to the half of the number of total tickets in the block, they will win some lucky tickets.

### **Example:**

Imagine you're participating in a mint on the Nullity platform using this new method. You won't know what NFT you will receive or whether you'll win, as it depends on the data of a future block. Only when that block is generated will you know the appearance of your NFT or if you've won. It's like reserving a surprise box that can only be opened at a future time to discover its contents. This method ensures each NFT/ticket is unique and unpredictable, maintaining market fairness and excitement.

Nullity introduces the new FutureHash Lottery Protocol on Avalanche, following this process when users mint tickets on Nullity:

**Submission Phase:**

* Users submit transactions to participate in the draw.
* This submission is merely a commitment to participate in a draw determined by future block data.

**Waiting for Block Generation:**

* The system waits until the specified future three blocks are generated.
* During this waiting period, participants cannot know the upcoming block data.

**Random Number Generation:**

* As soon as the specified block is generated, its block hash is used as a random number generator.
* Calculation rule: Random data for a commitment made in the first block is generated by the hash of the data from the fourth block plus the current block's difficulty.
* This hash is unique and impossible to predict.

**Drawing:**

* Winners are determined based on the generated block hash.
* Calculation rule: The remainder of the random number divided by the number of participants in that block determines the winning participant.
* This process is automatic, and all participants can verify the fairness of the results.

**Reveal and Prize Collection:**

* The winning results are revealed, and winners can collect their rewards.
* The results are public, ensuring transparency and verifiability.

**Conclusion:**

* The FutureHash Lottery Protocol, by using future block data, ensures the randomness and unpredictability of the drawing process, thereby enhancing fairness and security. Moreover, since the results depend entirely on blockchain data, this method also offers high transparency and credibility.
