Points caps allow you to set limits on the number of points users can earn from specific events, providing granular control over your reward system.

Overview

Our points capping system offers two types of caps:

  1. Daily Cap: Limits the points a user can earn from an event per day.
  2. All-Time Cap: Sets a maximum limit on the total points a user can earn from an event over the entire campaign.

These caps are configurable per event and client season, offering flexibility in reward distribution.

How It Works

When a user performs an action that earns points:

  1. The system checks if the action would exceed the daily or all-time cap.
  2. If either cap would be exceeded, the points are adjusted to meet the cap.

This ensures that users cannot exceed the specified limits while still rewarding their participation up to the cap.

Configuration

Caps are set using the following structure:

{
  "event_name": "eth_bridge_limit",
  "daily_cap": 200,
  "all_time_cap": 5000
}
  • event_name: The event to which the cap applies
  • daily_cap: Maximum points earnable per day (or empty string for no limit)
  • all_time_cap: Maximum total points earnable (or empty string for no limit)

Implementation Details

Our system uses advanced SQL queries to efficiently apply these caps in real-time. We handle complex scenarios such as:

  • Partial point awards when nearing a cap
  • Accurate tracking across time zones
  • Seamless integration with existing point calculation logic