Play To Earn (P2E) Wallet for Game Developers

Question

I want players to be take items drops (not NFT regular items) to a merchant NPC. The merchant will take hand out a token.

Overview

There are a few ways to build a crypto game.

  1. All data is on chain. This includes all logic and items.
  • Pros: Completely decentralized. Follows the web3 ethos.
  • Cons: Very costly for the player. Every data update must be a transaction and will be slow.
  • Pros: Can build more web2 friendly games (FPS, MMO, MOBA) with high throughput.
  • Cons: Not completely decentralized.

Solution

Because there are some off-chain and on-chain logic, we need a wallet that connects web2 to web3. One possible solution is to create a server side wallet.

Creating the Wallet

Since there are many backend game servers written in different languages, the idea is to:

  • Create a generic RESTful API layer. This allows any server to interact with it by using GET and POST requests.
  • An authorization layer. Only servers with the apiKey can send tokens.
  • EVM agnostic. Wallet can interact with multiple blockchains.
  • Simple deployment (see below).

Repo

https://github.com/Next-Wallet/next-wallet

How to run a server side wallet locally.

How to deploy a server side wallet (free)

Example

Conclusion

Many dapps today combine off-chain and on-chain data. This is also true for web3 games. It’s not be practical to store all game data on chain. Only store what is of value. The rest should have some server logic. And that server logic can interact with a server wallet.

Photo by Florian Olivo on Unsplash

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store