2.
Participating in the Game
Preparation: Open the MetaMask plugin, connect to a network that supports the DeLotGame contract, and confirm that there is sufficient ETH in the wallet. Transfer: Click the "Send" button, enter the DeLotGame contract address in the "Recipient" field, and set the amount of ETH to transfer. Input data: Click "Advanced Options", and in the "Data" field, enter the guessed data in HEX format (composed of valid characters 0 - 9, a - f, with a length not exceeding 16 bytes) as the guessing characters. Confirm the transaction: After checking that the transfer information is correct, click "Confirm" to complete the transfer. The contract will record and process the relevant data. (II) Winning Mechanism Target block number: After each transfer with valid HEX data, the contract will calculate a target block number (i.e., the first block number ending with zero after the block number where the transfer occurs). Hash value judgment: When the current block number exceeds the target block number and the difference between the two is within 256 blocks, the contract will obtain the hash value of the target block. Winning condition: If the hash value is valid and the last character of the hash value is included in the data of the previous transfer, it is considered a win.
Reward Calculation: The formula for calculating the reward amount is (amount of ETH transferred last time * 16) / length of data transferred last time. Currently a commercial payout of 0.9x is used. If there is insufficient ETH balance in the contract, the entire balance will be paid out as a reward.