Token Exchange

Our token exchange dashboard allows the users to perform make a deposit (convert on-chain tokens into in-app tokens) and make a withdrawal (convert in-app tokens into on-chain tokens).

Overview

Each publisher is provided with access to a token exchange dashboard wherein authenticated users can perform token deposits (convert on-chain tokens into in-app tokens) or withdrawals (convert in-app tokens into on-chain tokens).

Note that this dashboard is a template, we can re-design accordingly to match the publisher's website.

  1. This panel shows you the list of NFTs that are currently in your wallet, along with its XR (exchange rate). NFT’s can have a XR value based on their rarity. An NFT with a higher XR gives the user a better conversion rate between in-game to on-chain token conversion

  2. This panel shows you with a summary of the deposit and withdrawal transaction

  3. This panel shows you your current in-game and on-chain currency

  4. This panel allows you to switch between two transaction modes: deposit and withdrawal

  5. This is an input box wherein you can enter the amount of tokens you want to deposit or withdraw

  6. This panel shows you the amount of tokens that you will receive after an exchange

  7. This panel shows your token exchange history

Deposit

When you make a deposit, you convert on-chain tokens into in-game tokens. The following applies:

  • The default exchange rate is 1 (100%). For example, if a user deposits 1000 on-chain tokens, the user will receive 1000 in-game tokens

  • There is no limit when depositing - a user can exchange as many on-chain tokens as they need for in-game tokens

Withdrawal

When you make a withdrawal, you convert in-game tokens into on-chain tokens. The following applies:

  • There are two types of exchange rates that can be applied:

    • The first is a fixed rate that does not depend on the NFT equipped at the time of conversion

    • The second is a variable rate that depends on the rarity of NFT equipped at the time of conversion

  • For example, let's say that the exchange rate is 25% and a user does not equip a NFT at the time of conversion

    • When the user attempts to withdraw 1000 in-game tokens, then they will only receive 750 on-chain tokens

    • However, if the user equips an NFT and the NFT rarity’s rate is 10, then when attempts to withdraw 1000 in-game tokens, then they will receive 900 on-chain tokens

  • It is possible to make it mandatory/optional for users to equip an NFT when withdrawing in-app tokens

  • Daily, weekly and monthly withdrawal limits can be set to preserve the integrity of your token ecosystem

    • This can apply to NFTs being used in withdrawals too

Summary

  • When a user makes a deposit, our backend sends a deposit confirmation notification to the game, only if the user succeeds in executing the transaction using our smart contract

  • When a user makes a withdrawal, the exchange can only be made if the user’s in-game token balance is sufficient

    • The withdrawal will only commence once a notification has been received from the game that the in-game token balance has been reduced according to the withdrawal request

  • If a transaction fails due to issues related to network connectivity, a notification will be sent to the game to reimburse the user’s in-game tokens

  • All pending token exchanges are executed one at a time in sequential order

Last updated