How to make a currency system?
I’ve been working on a custom currency system by Python for my Discord bot. It looks legit, but I don’t know if it is secure. It has anti-copying money so users earn fair and square. It works like this:
Whenever a user wants a money, he uses the /addcoin function to add money to his account. /addcoin requires a code, so he must mine for the code, which is the input of the SHA256 hash (shown in /coin). If it is correct, he gets a dollar and the system adds his ID to a file. After that, the system automatically renews the code, making the last code unusable. This means he can’t use it again. Don’t worry, the project is hosted locally by a computer, a raspberry pi, smth like that, so the files will be safe.