Token Lottery is a game that tests the overall strength of players' luck and input. The user obtains a corresponding number of codes by investing a certain number of tokens. The system obtains a winning number according to the smart contract, and the user with the winning number is the winner. The game sets up a prize pool, and the player will have a lottery number for every 1token paid in the prize pool; the more the lottery number, the higher the chance of winning the prize! And users can participate multiple times. When the prize pool is sold, the only winner is calculated based on the smart contract. Under normal circumstances, the game needs to reach the prize pool limit before it can end, but usually there will be no other players to join for a long time, so in order to avoid never ending, the game adds a timed termination mechanism: if the interval between two user input tokens exceeds 12 hours, the game is over.