Skip to main content

Events & Tournaments

Tournament execution off-chain, payout settlement on-chain.


Overview​

Events and tournaments in Monsuta Core are designed for a hybrid architecture:

  • Off-chain (Competition module): event orchestration, bracket progression, standings, anti-abuse checks, payout calculation
  • On-chain (Economy module / Prize Pools): escrow custody, final settlement state, winner claims, cancellation refunds

This gives games fast competitive operations without sacrificing trust-minimized prize distribution.


Event Types​

TypeDescriptionTypical Duration
Single EliminationKnockout bracket, one loss = outHours
Double EliminationUpper/lower bracket pathsHours to days
SwissRound-based pairings with no immediate eliminationHours to days
Ranked SprintTime-window leaderboard raceHours to days
Community CupSponsored custom-format eventVariable

Event Lifecycle (Hybrid)​

Draft
-> Registration Open
-> Registration Closed
-> Active (matches played off-chain)
-> Finalizing (standings + payout computation)
-> Finalized Off-chain (attested result)
-> Settled On-chain (submitResults)
-> Claim Window
-> Completed

Cancellation branch:

Created/Registering/Active
-> Cancelled
-> Refunds claimable by depositors

Hybrid Settlement Pipeline​

1) Event engine finalizes bracket/standings off-chain
2) Payout calculator produces winners[] + amounts[]
3) Result bundle is hashed and attested (signed)
4) Bundle is queued for settlement worker
5) Worker validates pool state + signer policy + payout bounds
6) Authorized server submits PrizePool.submitResults(...)
7) Winners claim directly from contract

Attested Tournament Result Flow​

Result Bundle (canonical shape)​

{
"eventId": "weekly-cup-042",
"tournamentId": "tourn-204",
"poolAddress": "0xPoolAddress...",
"winners": [
"0xWinner1...",
"0xWinner2...",
"0xWinner3..."
],
"amounts": [
"3040000000000000000",
"1824000000000000000",
"1216000000000000000"
],
"resultHash": "0xResultHash...",
"nonce": "42",
"expiresAt": "2026-03-07T12:00:00Z",
"attestor": "0xAttestor...",
"signature": "0x..."
}

Required checks before submission​

  • poolAddress exists and maps to expected event
  • Pool status is Active
  • winners.length == amounts.length and both non-empty
  • Winner addresses are unique
  • Every payout amount is non-zero
  • sum(amounts) is within distributable pool limit
  • Signature is valid for expected attestor and non-expired payload

If any check fails, the job should not settle on-chain.


Trust Boundaries​

Off-chain trust assumptions​

  • Match data and standings are computed by game backend authority
  • Anti-cheat/dispute policy is enforced by operator systems

On-chain trust guarantees​

  • Funds are escrowed in pool contract
  • Settlement can only occur through authorized path
  • Winner claims are contract-enforced
  • Refunds are available on cancellation path
  • Lifecycle transitions constrain invalid actions

Sponsors can fund event pools while settlement remains trust-minimized:

  1. Sponsor funds pool
  2. Event runs off-chain
  3. Final results are attested and submitted
  4. Winners claim directly from pool

Sponsors do not manually distribute winner payouts.


Operational Guidance​

For production event pipelines:

  • Use dedicated signing keys for result attestation
  • Keep settlement submitter keys isolated from game-service keys
  • Enforce idempotency keys per (poolAddress, eventId, resultHash)
  • Log every transition from finalization to on-chain settlement
  • Alert on stale active events and near-expiry claim windows

Integration Summary​

Events and tournaments should be treated as:

  • Competition problem off-chain
  • Settlement problem on-chain

That separation is the core of Monsuta’s competitive architecture: off-chain speed, on-chain payout finality.