Skip to main content

System Architecture

A complete high-level overview of Monsuta Core's data flow, deployment topologies, and modular integrations.


The Separation of Powers

Monsuta Core is built on a fundamental architectural divide: separating the game's actual state and latency-sensitive logic from its verifiable economic settlement.

  1. The Game Server commands all authority over matchmaking, mechanics, inventory states, and rankings. It is built in traditional server technologies (Node.js, Go, standard databases).
  2. The Blockchain acts purely as a financial and administrative root of trust. It holds prizes, facilitates crafting conversions, validates staking, and secures cross-chain telemetry.

You should never write a smart contract to move a player character, and you should never write a database row to permanently securely custody another human's funds.


High-Level Topology

                  ┌────────────────────┐
│ GAME CLIENT │
│ (Web / Unity) │
└─────────┬──────────┘

WebSocket / REST (Real-Time Input)

┌─────────▼──────────┐
│ GAME SERVER │
│ (Authoritative) │
└─────────┬──────────┘

Asynchronous SDK (Settlement)

┌───────────────────┴────────────────────┐
│ │
┌───────▼────────┐ ┌───────▼────────┐
│ Avalanche │ │ Legacy Chains │
│ C-Chain │ ◄── Oracle Network ──►│ (e.g., WAX) │
│ (Settlement) │ │ (Origin) │
└────────────────┘ └────────────────┘

Component Responsibilities

Game Client

The client acts strictly as a dumb presentation layer. It contains zero authority over state or mechanics, making game clients natively secure against fabricated actions. It only reaches out to a web3 wallet when interacting with the on-chain settlement layer, such as paying tournament entry fees or claiming staked rewards.

Game Server

The game server is universally trusted for operational execution, similar to standard competitive titles.

  • Compiles matchmaking queues and player ratings.
  • Resolves inputs, latency handling, abilities, and combat damage.
  • Verifies and coordinates the issuance of EIP-712 achievement attestations.
  • Generates exact payout configurations for prize pools.

The Settlement Layer (Smart Contracts)

Monsuta Core decomposes its settlement layer into modular EVM-compatible contracts (Solidity). A game integrating the system only needs to deploy the components it actively uses.

ContractPatternPurpose
PrizePoolFactory.solUUPS UpgradeableDeploys un-ruggable ERC1967 proxy components to hold funds for distinct tournaments.
NFTStaking.solUUPS UpgradeableHandles epoch-based Merkle distribution for staking rewards so assets never leave player custody.
CraftingRecipes.solUUPS UpgradeableTranslates off-chain progression or burns raw components to directly mint on-chain items.
AchievementsRegistry.solUUPS UpgradeableCryptographically verifies and stores server-issued attestations for player milestones.
FadedMonsutaTHC.solOracle ConsensusBridging protocol managing fungible token burns/mints across diverse networks.
NFTBridge.solVault EscrowLocks origin NFTs securely so they can be bridged dynamically without irreversible burning.

Core Operations

Tournament Payout Flow

Monsuta Core automates the handoff between gameplay logic and final economic settlement.

  1. A tournament initializes its own proxy PrizePool contract on Avalanche.
  2. Players or external sponsors deposit entry fees directly into this trustless vault.
  3. The server watches the contract state to ensure entry fees are paid prior to matchmaking authorization.
  4. Matches process entirely off-chain, free of latency or gas fees.
  5. Once the server resolves final tournament standings, it interacts with the SDK to invoke the submitResults() transaction.
  6. The PrizePool permanently finalizes the payouts. Over the next 30 days, verified winners initiate a simple claim() to withdraw their exact rewards directly to their wallets.

Cross-Chain Bridge Flow

Legacy bridging relies heavily on mint/burn loops. Because Monsuta Core manages complex game NFTs holding intricate progression metadata, the bridge functions on a sophisticated Vault mechanism.

Tokens or NFTs originated on legacy chains (like WAX) are seamlessly transited to high-performance networks (like Avalanche) via an independent Node.js oracle system.

  1. A player deposits their NFT into the origin chain's locked vault contract.
  2. The nft-oracle-wax.js service detects the operation. It queries the legacy asset protocol, translates the metadata payload, and prepares an execution signature.
  3. The player broadcasts the signature to Avalanche, minting an ERC-721 equivalent.
  4. If the player ever migrates back, the Avalanche token is sequestered, and the original legacy chain vault is gracefully unlocked.