Skip to content

Prime leaderboard storage

Storage layout for the PrimeLeaderboard contract

// Individual deposit record for LIFO tracking (declared in IPrimeLeaderboard)
struct Deposit {
uint128 amount; // Amount deposited
uint64 timestamp; // Deposit timestamp
uint64 _reserved; // Reserved for future use
}

Base multiplier (1.0x) scaled by 1e18

uint256 BASE_MULTIPLIER

Maximum deposits per user (DoS protection). Constant, set to 30.

uint256 MAX_DEPOSITS_PER_USER

Scaling factor for calculations (1e18)

uint256 EXP_SCALE

User’s deposit stack (LIFO order, index 0 = oldest). Holds the Deposit records described above.

mapping(address => IPrimeLeaderboard.Deposit[]) _depositStacks

User’s total staked XVS

mapping(address => uint256) totalStaked

Multiplier tier duration thresholds, in seconds. Default [30 days, 60 days, 90 days].

uint256[] _multiplierDurations

Multiplier values corresponding to each tier (scaled by 1e18). Default [1.3e18, 1.6e18, 2.0e18].

uint256[] _multiplierValues

Address of the PrimeV2 contract

address primeV2

Whether staker initialization is complete (prevents further initialization calls)

bool stakersInitialized

Reserved storage for future upgrades.

uint256[45] __gap