stCredits_points
Deployed program (coming soon)
AleoStaking incentivizes users to lock their stCredits into the AleoStaking Points program by rewarding them with Points. These points are earned based on the amount of stCredits locked and the duration of the lock-up period. The longer the lock-up period and the larger the amount of stCredits locked, the higher the points accumulates.
It's worth noting that the AleoStaking Points is one implementation of the Spectre Points in the AleoStaking product. That is to say, the portion of the points that users earn from AleoStaking is a part of the total points of Spectre.
Mappings, Structs and Records
All the mappings can be read publicly, either by the user or by the programs.
total_supply
Returns the total supply of AleoStaking Points. The only valid key is 0u8
.
account
Returns the amount of AleoStaking Points that the account owns.
states
Returns the state of the user. The state includes the total locked stCredits, the block height at which the last settlement was made, the inviter, and the inviter of the inviter.
inviters
Return the user address by the invite code.
invite_codes
Return the invite code by the user address.
invite_code_counter
Returns the invite code incrementer which is used to generate the invite code.
paused
Whether the program is paused or not.
Transitions
lock
Lock user's stCredits into the program to get points, with an optional invite code. For a new user, the invite_code
points to the user's inviter. And if invite_code
is empty (zero), the caller's inviter and the inviter of inviter will be both none. If the user is not new, invite_code
must be empty (zero).
unlock
Unlock user's stCredits and settle points.
settle
Settle points for the user at current block height.
Admin Transitions
The following transitions can only be called by the admin. The admin should be an administrator program, which is managed by the Spectre Governance.
pause
Pause the liquid staking pool.
unpause
Unpause the liquid staking pool.
Last updated