Economy Module
Token staking, prize pool custody, and revenue routing infrastructure.
Purpose
The Economy module provides the financial infrastructure layer. It handles:
- Prize Pools — trustless custody and distribution of competition rewards
- Staking — configurable multi-model staking engine for any ERC-20 or NFT
- Treasury — automated revenue routing from multiple sources to multiple destinations
These components work independently. A game can use prize pools without staking, or staking without treasury routing.
Components
| Component | Description | Doc |
|---|---|---|
| Prize Pools | Trustless custody of tournament and competition rewards | Prize Pools → |
| Staking | Configurable staking with multiple reward models | Staking → |
| Treasury | Revenue routing and fund allocation | Treasury → |
Token Independence
All economy module contracts accept token addresses as parameters:
// Prize Pool supports any settlement token
constructor(address _settlementToken, address _gameplayToken) { ... }
// Staking supports any staking target
function configurePool(
address _stakingToken, // what users stake (ERC-20 or ERC-721)
address _rewardToken, // what users earn
uint256 _rewardRate // reward per epoch
) external onlyOwner { ... }
// Treasury routes any ERC-20
function setAllocation(
address _token,
uint256 _prizePoolPercent,
uint256 _stakingPercent,
uint256 _operationsPercent,
uint256 _reservePercent
) external onlyOwner { ... }
Nothing in the Economy module is hardcoded to a specific token. Token choice is a deployment-time configuration decision.
Architecture
Revenue Sources Treasury Destinations
═══════════════ ════════ ════════════
Tournament Fees ──────┐
│ ┌──────────────┐
Marketplace Fees ─────┼────────►│ Treasury │────► Prize Pool Funding
│ │ Router │
Craft/Upgrade Fees ───┤ │ │────► Staking Rewards
│ │ configurable │
Sponsor Deposits ─────┘ │ allocation │────► Operations
│ per-token │
│ │────► Reserve/Buyback
└──────────────┘
When to Use This Module
| Your Situation | Components |
|---|---|
| Game with tournaments that pay real prizes | Prize Pools |
| Want to let players stake tokens or NFTs | Staking |
| Need automated revenue splitting | Treasury |
| All of the above | Full Economy module |
| Game with no economic features | ❌ Not needed |