Skip to main content

Treasury Layer

Revenue routing engine for fund allocation across prize pools, staking, and operations.


Purpose

The treasury layer is the economic routing system for Monsuta Core. It exists because:

  • Multiple revenue sources feed into the system (entry fees, sponsor deposits, marketplace fees)
  • These funds must be allocated to different destinations (prize pools, staker rewards, operational costs)
  • The allocation rules must be transparent and configurable
  • No single entity should have unilateral control over all treasury funds

Architecture

                    INFLOW SOURCES
══════════════

Entry Fees ───────────────┐
Marketplace Fees ─────────┤
Sponsor Deposits ─────────┤
Bridge Fees (future) ─────┤

┌──────▼──────┐
│ TREASURY │
│ CONTRACT │
│ │
│ Routes │
│ funds per │
│ allocation │
│ rules │
└──────┬──────┘

┌─────────────┼─────────────┐
▼ ▼ ▼
┌────────────┐ ┌──────────┐ ┌───────────┐
│Prize Pools │ │ Staking │ │Operational│
│ │ │ Rewards │ │ Fund │
│ tournament │ │ pool │ │ │
│ funding │ │ funding │ │ dev costs │
│ │ │ │ │ infra │
└────────────┘ └──────────┘ └───────────┘

Treasury Allocation

Configuration

{
allocation: {
prize_pools: 50, // % of inflow directed to prize pool funding
staking_rewards: 30, // % to staking reward pool
operational: 15, // % to operational wallet
reserve: 5 // % held in reserve buffer
},

distribution_frequency: "weekly", // how often accumulated funds are routed

operational_wallet: "0xABCD...",
reserve_wallet: "0xEF01...",

// Override rules
sponsor_deposits: {
// Sponsor deposits bypass allocation — 100% goes to specified pool
routing: "direct_to_pool"
}
}

Allocation Rules

SourceDefault RoutingOverride Available?
Entry feesSplit per allocation configYes
Marketplace feesSplit per allocation configYes
Sponsor deposits100% to specified prize poolNo — intentional
Bridge fees100% to operational fundYes
Direct donationsSplit per allocation configYes

Why sponsor deposits bypass allocation: Sponsors fund a specific event. Routing their deposit through the general treasury would break their expectation that 100% goes to the pool they chose to fund.


AVAX Inflow Handling

How AVAX Enters the System

Player pays 2 AVAX entry fee


Contract receives 2 AVAX

├── 1.0 AVAX → Prize Pool (50%)
├── 0.6 AVAX → Staking Rewards (30%)
├── 0.3 AVAX → Operational (15%)
└── 0.1 AVAX → Reserve (5%)

Immediate vs Batched Distribution

ModeHow It WorksTrade-off
ImmediateEvery deposit triggers allocation on receiptHigher gas, simpler logic
BatchedFunds accumulate, distributed on scheduleLower gas, requires keeper

Recommendation: Batched distribution with a weekly keeper job, unless the game has very low transaction volume.


THC Distribution (Optional)

The treasury can optionally manage THC distribution for:

  • Season rewards
  • Event bonuses
  • Promotional distributions

THC Source

THC for distribution can come from:

SourceMechanism
Pre-minted reserveTHC minted at deployment, held by treasury
Bridge inflowTHC bridged from WAX, held by treasury
Buy-and-distributeTreasury uses AVAX to acquire THC, then distributes

THC Distribution Rules

{
thc_distribution: {
season_reward_pool: 100000, // THC allocated per season
event_bonus_cap: 10000, // max THC per event

distribution_method: "claim", // "claim" or "push"
// claim: players call claim() on contract
// push: server sends THC proactively (costs gas)

cliff: 0, // no cliff — immediately claimable
vesting: 0 // no vesting — full amount at once
}
}

Contract Interface

interface ITreasury {
// Receive funds
function deposit() external payable;

// View allocation
function getAllocation() external view returns (
uint8 prizePoolPercent,
uint8 stakingPercent,
uint8 operationalPercent,
uint8 reservePercent
);

// Distribute accumulated funds (keeper or admin)
function distribute() external;

// Sponsor direct deposit to a specific pool
function fundPool(uint256 poolId) external payable;

// Admin: update allocation (timelock recommended)
function updateAllocation(
uint8 prizePoolPercent,
uint8 stakingPercent,
uint8 operationalPercent,
uint8 reservePercent
) external;

// View
function pendingBalance() external view returns (uint256);
function totalDistributed() external view returns (uint256);
}

Security Considerations

RiskMitigation
Admin changes allocation maliciouslyTimelock on updateAllocation() (e.g., 48hr delay)
Operational wallet drainedMulti-sig wallet, spending limits per epoch
Reserve never used, just accumulatesPeriodic review, community visibility into balance
THC distribution exceeds budgetHard cap enforced in contract: thc_distributed <= season_pool

Integration Guide for Other Games

Step 1: Define Your Revenue Streams

List all sources of value entering your game economy:

  • Entry fees?
  • Marketplace commissions?
  • Subscription fees?
  • Sponsor deposits?

Step 2: Set Allocation Percentages

Decide how revenue is split:

  • What percentage funds competitions?
  • What percentage rewards stakers?
  • What covers operational costs?
  • Is there a reserve?

Step 3: Deploy Treasury Contract

  • Set initial allocation percentages
  • Configure distribution frequency
  • Set operational and reserve wallet addresses
  • Optional: add timelock for allocation changes

Step 4: Connect Revenue Sources

  • Entry fee contracts route payments through the treasury
  • Marketplace contracts send commissions to the treasury
  • Sponsor deposits bypass to direct pool funding

Step 5: Monitor

  • Track total inflow vs allocation vs distribution
  • Ensure reserve does not grow disproportionately
  • Adjust allocation based on economic health metrics