0

I have an iOS and Android app with 50k users, 2k daily. Users play games and win prizes. The state of prizes are not on the blockchain since I created the game initially as a non blockchain game. The state (user rewards) is stored in a nosql DB on my server

I'm planning to switch app rewards to an ERC20 token

  1. Based on the crazy gas fees sending ERC20 tokens twice a day may be quite expensive. What are my options here?

  2. What if I deploy the ERC20 and find bugs in it, since the state is immutable how would I go about fixing the bug

  3. What if I need to add additional functionality to the smart contract?

NOTE The apps are 100% Native, and there is currently no official SDK to use for interacting with the smart contracts, so I prefer if the user doesn't have to interact with the smart contract. I'm thinking the users provide their address in the app, and I use that to send them the tokens

2
  • For mobile wallet interaction from mobile app you can use WalletConnect: walletconnect.com Dec 23, 2021 at 15:35
  • You could use a layer2 solution.
    – Ismael
    Dec 26, 2021 at 18:30

1 Answer 1

0

there are several solutions to your issues.

  1. Gas fees
    For this one there is a pretty easy option, if you want to keep it as an ERC20 token you could deploy it on a chain like polygon whos fees are significantly smaller than ETH, you could deploy it on BSC but you would have to make it a BEP20 token (the programmatic implementation are practically the same).

  2. Immutability
    You are correct, a contract can not be changed, this is a great thing but also a dangerous thing for us developers. You should do sufficient testing and potentially pay somebody to audit your contract, there are companies that do this for varying costs. However if you do need to change it down the line then you should write your new contract, and deprecate the previous one giving the exact same balances everyone previously owned in the new one.

  3. New features
    ditto

  4. the note
    This seems doable, i am in no way an app developer but a quick google shows there seems to be some java sdk for web3 (i assume this would work for android), web3 is the thing you should be looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.