I'm creating a game and I'm having a doubt about how I can work safely minting the coins. Taking AxieInfinity as a basis, you play and win the SLP, at some point you can redeem the SLP for your wallet, my question is being in this process. How could I implement something like that? I ask this because on the off-chain side (my database) I would have an X value of the currency that I could redeem, when my player redeems I need to take an amount from my ERC20 and transfer to him, the doubt is in this process , how to make ? and how to do it safely?
Does anyone have an example or something to guide me in this?