What is MoneyPot?

  1. Architecture
    1. Users
    2. Controllers
    3. Experiences
  2. In a nutshell
    1. User POV
    2. Game dev POV

MoneyPot is a crypto casino where game developers can create their own games.

For players:

  • Unique games created by independent developers
  • Crypto deposits and withdrawals backed by Uniwire

For game developers:

  • 50/50 profit share with the casino
  • Build on top of our game server

Architecture

Users

Users register accounts on MoneyPot.com. They have an email address and they can deposit and withdraw crypto currencies to and from the casino.

Controllers

Users can create Controllers which are basically a type of programmatic bot with API access to its own balance and currency transfers.

A game server is a @moneypot/hub server that uses a controller’s API key to manage player balances and transfers across any number of experiences on the casino.

If you want to build a game server, see Controller dev

Experiences

An experience is a game frontend that’s tied to a single controller and an iframe URL.

Every experience on the casino has a url like /play/dan/dice which renders a page that iframes the experience iframe URL: <iframe src="{iframeUrl}?userToken=<JWT>"></iframe>.

The experience frontend then sends the userToken to its own hub server, and the hub server exchanges the userToken with the casino to authenticate the user.

When a player puts money into an experience, what’s really happening is that they are creating a transfer from their balance to the controller’s balance that’s tagged with the experience ID.

In a nutshell

User POV

Here’s how MoneyPot works in a nutshell from the player’s perspective:

  1. Player1 visits a user-created game like /play/dan/pachinko which iframes a game frontend that talks to a game server
  2. Player1 puts 100 HOUSE tokens into the game and now has a 100 token balance in the game
  3. Player1 plays the game and wins 50 HOUSE tokens
  4. Player1 withdraws 150 HOUSE tokens back to their casino balance

Game dev POV

Here’s that scenario from Dan’s perspective, a game developer:

Simple example
  1. Dan (user) creates a Controller DanController1 (a bot with API access)
  2. Dan extends our @moneypot/hub game server with custom game logic and database tables
  3. Dan creates a Javascript frontend
  4. Dan creates an Experience on moneypot.com with DanController1 as its controller and https://dan-pachinko.example.com as its iframe URL
  5. Player1 visits the experience at /play/dan/pachinko, puts money into the game, and plays the iframed game.
More detailed example (Click to expand)
  1. Dan (user) creates a Controller named DanController1 that can be thought of as a programmatic user with API access to its own balance
  2. Dan launches his own instance of our @moneypot/hub game server at https://dan-hub.example.com and configures it to use DanController1’s API key for moneypot.com.
    • Dan could create game-specific API methods, but he doesn’t have to since the hub server comes with a generic bet method.
  3. Dan creates a React frontend at https://dan-pachinko.example.com configured to use https://dan-hub.example.com/graphql’s GraphQL API, and he builds the pachinko game frontend
  4. Dan creates an Experience on moneypot.com with DanController1 as its controller and https://dan-pachinko.example.com as its iframe URL
  5. Player1 visits /play/dan/pachinko which loads https://dan-pachinko.example.com?userToken=<JWT> in an iframe. The pachinko frontend sends ("https://moneypot.com", <JWT>) to the hub server which responds that the user is authenticated.
  6. Player1 uses the casino’s Put button to put 100 HOUSE tokens into the game
  7. Dan’s hub server sees that DanController1 received a transfer for 100 HOUSE tokens, it uses the casino API to claim the transfer, and then it credits Player1 with +100 HOUSE tokens in its own hub.balance database table
  8. Player1 plays the game and wins +50 HOUSE tokens in the hub database.
  9. Player1 uses the casino’s “Take” button to request that pachinko’s controller (DanController1) send them 150 HOUSE tokens.
  10. Dan’s hub server sees the take request on the casino API and creates a transfer from DanController1 to Player1 on the casino.