Skip to main content

Security Model

Trust boundaries, threat model, and security guarantees of Monsuta Core.


Trust Boundary Summary

┌──────────────────────────────────────────────────┐
│ TRUSTED (Server-side) │
│ │
│ • Game server decides match outcomes │
│ • Server calculates rewards │
│ • Server manages inventory state │
│ • Server signs claim data │
│ │
│ Players trust the game operator for gameplay │
│ fairness, just like any multiplayer game. │
│ │
└───────────────────────┬──────────────────────────┘

economic settlement boundary

┌───────────────────────▼──────────────────────────┐
│ TRUSTLESS (On-chain) │
│ │
│ • Smart contracts hold funds │
│ • Rewards are claimable by winners │
│ • Developer cannot redirect prize pools │
│ • Bridge requires oracle consensus │
│ • Claimed status is immutable │
│ │
│ Players do NOT need to trust the game operator │
│ for payouts, ownership, or token custody. │
│ │
└───────────────────────────────────────────────────┘

Key Insight: The game server is trusted for gameplay, but the blockchain removes the need to trust the developer as a financial custodian.


Threat Model

Threat 1: Game Server Manipulation

ThreatA compromised game server submits false match results
ImpactIncorrect rewards distributed
MitigationServer-side result validation, replay logging, audit trails
Residual riskThe game operator must be trusted for gameplay correctness
NoteThis is the same trust model as every competitive game

Threat 2: Oracle Collusion (Bridge)

ThreatOracle operators collude to forge bridge attestations
ImpactUnauthorized token minting on Avalanche
MitigationMulti-oracle threshold signatures (configurable threshold)
Contract refFadedMonsutaTHC.solrequire(valid >= threshold)
Current configThreshold = 1 (testnet), should be ≥ 3 for production

Threat 3: Replay Attack (Bridge Claims)

ThreatAn attacker replays a valid claim transaction
ImpactDouble-minting of bridged tokens
Mitigationclaimed[claimHash] mapping prevents re-use
Contract refFadedMonsutaTHC.solrequire(!claimed[claimHash])
Additionalsigned[td.id][signer] prevents per-oracle replay

Threat 4: Expired Claim Exploitation

ThreatAttacker uses an old signed packet after the window expires
ImpactStale claims processed
Mitigation30-day expiry enforced in verifySigData
Contract refrequire(block.timestamp < td.ts + 30 days)

Threat 5: Wrong Chain Submission

ThreatAttacker submits WAX→BSC data to the Avalanche contract
ImpactToken minting on wrong chain
MitigationthisChainId checked against packet's chainId
Contract refrequire(thisChainId == td.chainId, "wrong chain")

Threat 6: Prize Pool Rug

ThreatDeveloper drains tournament prize pool
ImpactPlayers and sponsors lose funds
MitigationPrize pool contract has no admin withdrawal for prize funds
Design ruleOnly verified winners can call claim()

Threat 7: Client-Side Cheat

ThreatModified game client sends fabricated game actions
ImpactUnfair match outcomes
MitigationServer-authoritative architecture
Design ruleClient sends inputs, server resolves all state transitions

Smart Contract Security Properties

Bridge Contract (FadedMonsutaTHC.sol)

PropertyImplementation
No admin mintingTokens only created via claim() with signatures
Oracle thresholdConfigurable, must meet threshold valid sigs
Domain separationDOMAIN_SEPARATOR prevents cross-contract replay
No selfdestructContract cannot be destroyed
Stuck token recoverytransferAnyERC20Token() — owner only, cannot withdraw THC itself
Ownership transferTwo-step: transferOwnership() + acceptOwnership()

WAX Contract (teleporteos)

PropertyImplementation
Deposit-before-teleportUsers must transfer tokens before initiating teleport
Oracle registrationOnly contract owner can add/remove oracles
Oracle deduplicationEach oracle can only sign/approve once per teleport
Cancellation windowUnclaimed teleports can be cancelled after 30 days
Confirmation thresholdORACLE_CONFIRMATIONS required before token release

Oracle Network

Architecture

WAX Blockchain ──── event ────► Oracle 1 ──► signs attestation
Oracle 2 ──► signs attestation
Oracle N ──► signs attestation


Signatures stored on
WAX (teleports table)


Player calls claim()
on Avalanche with
sigData + signatures


Avalanche contract
verifies threshold
reached, mints tokens

Oracle Responsibilities

DirectionOracle listens toOracle acts on
WAX → AvalancheWAX logteleport events via Hyperion/SHIPSigns the teleport data, stores sig on WAX
Avalanche → WAXAvalanche Teleport events via WS/RPCCalls received() on WAX with confirmation
Avalanche claimsAvalanche Claimed eventsCalls claimed() on WAX to mark as complete

Security Recommendations

  • Production threshold: ≥ 3 oracles required (currently 1 for testnet)
  • Oracle key management: Hardware wallets or KMS for oracle signing keys
  • Oracle diversity: Run oracles on separate infrastructure providers
  • Monitoring: Alert on unusual bridge volumes or unsigned teleports
  • Rate limiting: Cap maximum transfer per epoch to limit damage from compromise

For Integrating Games

Games adopting Monsuta Core inherit these security properties:

  • Prize pool custody — funds are never held by the game server
  • Bridge security — token migration uses oracle consensus, not admin keys
  • Replay protection — built into all claim contracts
  • Server authority — your game server remains the arbiter of gameplay

Games are responsible for:

  • Game server security — hardened infrastructure, access control
  • Result integrity — anti-cheat, replay validation
  • Key management — securing any server-side signing keys
  • Oracle operation — if running their own bridge instance