---
# System prepended metadata

title: Solana Token exchange Withdraw Diagram

---


###### tags: 'Catheon Gaming Token exchange'

[TOC]

---

# Solana Token exchange Withdraw Diagram


```plantuml

participant "Game" as game
participant "Backend" as role1
participant "Frontend" as role2
participant "Exchange Contract" as contract

role2 -> role1 : Get contract with multi signer - Amount: 10000, NFT: Owned NFT
role1 -> role1 : Validation Request (Daily, Weekly, Monthly widrawable amount, NFT required check)
role1 -> role1 : Calculate In-game token amount
role1 -> role2 : Response Contract(On-Chain amount, In-game amount, xr, nft)
role2 -> contract : Processing Token Exchanging
contract -> role2 : Return TxID
role2 -> role1 : Confirm Transaction(TxID)
role1 -> role1: Fetch Transaction(TxID)
role1 -> role1: Validate Transaction(Fetch value: On-chain amount, in-game amount, xr, nft)
role1 -> game: Notify Game balance change (decrease in-game amount)
game -> role1: Return result
role1 -> role1: If the result true, set the confirm flag to true
role1 -> role2: Return Token Exchange Success


