Mining algorithm
Mining in our system requires two real-time data fields, lastTokenId and lastTokenHash. The lastTokenId represents the total number of items mined in this collection, and the lastTokenHash refers to the hash recorded during the last mining event. The calculation for these is as follows:
To compute the current mining difficulty based on the latest tokenId, our system evaluates the 'generation' of the token. The difficulty level increases with the number of tens in the exponential growth of the tokenId. Here's how we determine the generation of a token:
Once we get the token generation, then calculate the Difficulty:
After determining the Difficulty, the mining process is successful once a nonce is found that, when hashed, is less than this difficulty threshold. The hash is computed using the user's wallet address, the latest hash, and the nonce, as illustrated in the initial hashing process. This approach ensures a dynamic and scalable mining difficulty that adapts as more tokens are generated, thereby maintaining the system's balance and fairness.
Last updated