1

Some of my friends and I are designing a blockchain game and I have a question for you that I hope you experienced friends can help me with.

My first question is about the architecture and implementation of the project, honestly, because my friends only know game programming, we could not use the SDKs of web 3 development platforms such as Moralis, etc., for this reason, the game development team is involved in working with Web 3 and the complications of this issue, we decided to implement an API on the team's site to communicate with Web 3, I implemented the API, and the game development team through WebSocket with the API that I implemented to communicate with Web 3 It communicates and sends transactions to the blockchain through API.

My first question is, is it correct that we put an API as an interface between the end user of the game and Web 3?

My second question is about the wallet, currently the game is designed in such a way that after the player installs the game on his mobile phone, when he registers in the game, an in-game wallet is created for the user, and after that two The security password is obtained from the user, these two passwords are used to encrypt the user's private key, so that the first password is for the encryption key and the second password is for IV, finally the encrypted text of the private key is stored in the database.

I wanted to ask if creating an internal wallet in the game and obtaining two security passwords for encryption is correct? Or should the user's main wallet be used to connect to the game, that is, services such as WalletConnect should be used to connect the user's wallet to the game?

Thank you for your friendly advice

1 Answer 1

1

You can interact with the smart contracts in whatever way you'd like, just note that regardless of how you interact with them, you will always need a contract address and an abi.

I don't have any experience when it comes to creating internal wallets, but I think it would be best for your team to focus on other aspects of your game instead of spending too much time setting that up when there are many good options that are already "battle-tested" for you to use.

Also when it comes to private keys, you have to be careful how you implement the wallet because user's funds are directly at risk if there is a bug that exposes them to anyone.

Users will likely want reassurance that the developers of the protocol can't see their private keys at any point as well, for example, see this note from Vanity-ETH.

enter image description here

If you look at some of the Web3 games currently out, we can view what wallet connecting provider they use.

  1. Alien Worlds uses Cloud wallet
  2. Ethernaut uses Metamask
  3. Crypto Kitties uses Metamask
  4. Wolf Game also uses Metamask
1
  • 1
    Thank you very much for your help, you helped me a lot
    – Ali
    Commented Sep 12, 2023 at 8:40

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.