Prime storage
PrimeV2StorageV1
Storage layout for the PrimeV2 contract with leaderboard-based Prime token distribution
BNB PrimeV2 only. This is the direct PrimeV2StorageV1 layout from the implementation used at block 118,364,540; upgrade review must also include inherited storage and the proxy's exact implementation. Source: PrimeV2Storage.sol.
Solidity API
struct Market {
uint256 supplyMultiplier;
uint256 borrowMultiplier;
uint256 rewardIndex;
uint256 sumOfMembersScore;
bool exists;
}struct Interest {
uint256 accrued; // Accrued rewards pending claim (reset to 0 on claim)
uint256 score; // User's score in this market
uint256 rewardIndex; // Last recorded reward index
uint256 lifetimeAccrued; // Monotonic running total of all rewards ever accrued to this
// user in this market; never decremented on claim. Lets the
// off-chain cycle pipeline compute per-cycle earnings as the
// diff between two snapshots.
}isPrimeHolder
Whether a user holds a Prime token
totalTokens
Total count of Prime tokens
tokenLimit
Maximum number of Prime tokens allowed
markets
Mapping of vToken to its market configuration
interests
Mapping of vToken -> user -> interest info
_allMarkets
Internal array of all Prime-participating markets. This field is stored between interests and vTokenForAsset.
vTokenForAsset
Mapping of underlying token to vToken address (used to check if an asset is part of Prime markets)
alphaNumerator
numerator of alpha. Ex: if alpha is 0.5 then this will be 1
alphaDenominator
denominator of alpha. Ex: if alpha is 0.5 then this will be 2
primeLiquidityProvider
The address of the PrimeLiquidityProvider contract
oracle
The address of the ResilientOracle contract
corePoolComptroller
Address of the core pool comptroller contract
unreleasedPLPIncome
Unreleased income from the PLP per token that has already been accounted for — either indexed into rewardIndex for Prime holders, or recorded in undistributedReward while the market had no scored members
undistributedReward
Income accrued while no scored members existed in the market. Tracked per underlying so governance can reclaim the slice via sweepUndistributed without touching user-owed funds.
isScoreUpdated
Mapping to check if an account's score was updated in a round
nextScoreUpdateRoundId
Current score update round ID
pendingScoreUpdates
Number of pending score updates in the current round
primeLeaderboard
Address of the PrimeLeaderboard contract for permissionless eligibility checks
mintThreshold
Minimum Prime Score required for permissionless Prime minting
mintDeadline
Unix timestamp after which permissionless minting is closed (0 = no deadline)
__gap
Reserved storage for future upgrades.
Last updated

