Skip to main content

Earnings System

Revenue sharing system with withdrawal and analytics

This section

Earnings System

Revenue from paid events is split between the event creator and the server. Creators can track earnings and withdraw funds through their dashboard.

How It Works

  1. A player pays the entry fee to join a paid event
  2. The revenue is split according to configured percentages
  3. Creator's share is recorded in the earnings system
  4. Creator can withdraw earnings to their bank account

Earnings Dashboard

The creator dashboard includes a full earnings panel:

  • Stats Cards: Total earnings, available balance, and growth percentage
  • Revenue Chart: 7-day area chart showing daily revenue (powered by Recharts)
  • Withdrawal Form: Enter amount and withdraw to bank
  • Transaction History: Last 50 transactions with type, amount, and description

The dashboard auto-refreshes every 10 seconds to keep data current.

Withdrawal Rules

  • Minimum withdrawal amount is configurable
  • Cooldown period between withdrawals prevents abuse
  • Balance is validated with a single optimized SQL query
  • Funds are added directly to the player's bank account

Configuration

OptionDefaultDescription
Config.Features.EnableEarningstrueEnable the earnings system
Config.Earnings.CreatorPercentage80% of revenue going to the creator
Config.Earnings.AdminPercentage20% of revenue going to the server
Config.Earnings.MinWithdrawAmount100Minimum withdrawal amount
Config.Earnings.WithdrawCooldown3600Seconds between withdrawals (1 hour)
Config.Earnings.AutoPayoutfalseAutomatically pay out after event ends