Skip to main content

Competition Engine

Framework for structured competitive play: seasons, leagues, rankings, and events.


Purpose

The Competition module provides the data structures, lifecycle management, and on-chain settlement patterns for organized competitive play. It handles:

  • Seasons — time-bounded competitive periods with tracked rankings
  • Leagues — skill-based tiers that segment the player population
  • Leaderboards — real-time and historical ranking systems
  • Events — one-off or recurring competitions outside the seasonal structure

All matchmaking and gameplay resolution happens off-chain on the game server. The competition module defines how results are structured, tracked, and settled when economic finality is needed.


Module Architecture

┌─────────────────────────────────────────────────────────────┐
│ GAME SERVER │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌───────────┐ │
│ │ Season │ │ League │ │ Leader- │ │ Event │ │
│ │ Manager │ │ System │ │ board │ │ Manager │ │
│ │ │ │ │ │ Tracker │ │ │ │
│ │ start/ │ │ promote/ │ │ ELO/ │ │create/ │ │
│ │ end/ │ │ relegate/ │ │ points/ │ │finalize/ │ │
│ │ finalize │ │ place │ │ rank │ │schedule │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬──────┘ │
│ │ │ │ │ │
│ └──────────────┴──────────────┴──────────────┘ │
│ │ │
│ settlement payload │
└──────────────────────────────┼───────────────────────────────┘

┌──────────▼──────────┐
│ Settlement Chain │
│ │
│ • Prize pool │
│ distribution │
│ • Achievement │
│ minting │
│ • Season results │
│ recording │
└─────────────────────┘

Components

ComponentDescriptionDoc
Seasons & LeaguesTime-bounded competitive periods with tiered skill bracketsSeasons & Leagues →
LeaderboardsReal-time and historical ranking systems with multiple scoring modelsLeaderboards →
EventsOne-off competitions, tournaments, and special formatsEvents →

Key Properties

PropertyDetail
Server-authoritativeAll match results determined by game server, not blockchain
Off-chain trackingLeaderboards and rankings maintained in server database
On-chain settlementOnly season-end distributions, prizes, and achievements go on-chain
Configurable formatsSupports any competitive structure — round-robin, Swiss, bracket, etc.
Token-agnosticEntry fees and prizes can use any ERC-20 or native token

Data Flow: Season Lifecycle

1. Season configured (parameters set by game operator)


2. Season opens (players begin competing)
│ matches played, results recorded off-chain

3. Season ends (server stops accepting matches)


4. Server calculates final standings


5. Server submits results to chain
│ (ranked list, achievement qualifiers)

6. Prize pool distributes rewards
│ (winners call claim())

7. Achievement NFTs minted for qualifiers
│ (server signs, player mints)

8. New season configured → repeat

When to Use This Module

Your SituationUse Competition?
Multiplayer skill-based game with seasons✅ Full module
Casual game with occasional tournaments✅ Events only
Game with ranked matchmaking✅ Leagues + Leaderboards
Single-player game with no competitive element❌ Not needed
PvE game with leaderboards only✅ Leaderboards only