I want to deploy a smart contract (ERC20) for the game, so the purpose is to keep points.
- when someone enters the game, we will ask for some crypto coin (ex. ETH) and give some of our own points
- while playing the game, the user will earn some points.
- Then that user can get crypto coins (ex. ETH) from that points.
I can write a smart contract to manage points. But I wonder if I can have a function to exchange our points to existing crypto coins (ex ETH) inside of our smart contract.
Does someone know the right way to do it?