I have written an ERC20 smart contract where I have a onlyOwner mint function where only the owner is allowed to mint tokens and I also have a public mint function where users can able to mint specific amount of tokens as per the work they have done.
Here there's a vulnerability in my code where users who have not done any tasks can also be able to claim tokens since this is a public function.
Here is the detailed flow of my application
Users login to my application
They watch my TV for certain time
Will be rewarded some amount of tokens as per the time they have watched
Users can now be able to claim the rewards by paying gas fees (This is the only place where users directly interact with the blockchain).