VotingKSP
This contract is responsible for the ecosystem behavior related to staking KSP. Voting rights (vKSP) are issued according to the staking quantity and period, and 40% of the daily KSP mining quantity is distributed to staking participants. (KSP distribution for staking participants may be changed through governance voting)
Code
Github Link: (Will be updated after official launch)
Address
Events, Read-Only Functions, and State-Changing Functions
Events
LockKSP
event LockKSP(address user, uint lockPeriod, uint KSPAmount, uint totalLockedKSP, uint unlockTime);Event log of KSP staking
Parameters
user: user addresslockPeriod:4 months : 10,368,000
8 months : 20,736,000
12 months : 31,104,000
x8 : 1,555,200,000
KSPAmount: Number of KSPtotalLockedKSP: Total number of staked KSPunlockTime: Available unstaking time (timestamp)
UnlockKSP
event UnlockKSP(address user, uint vKSPAmount, uint KSPAmount);Event log of KSP unstaking
Parameters
user: user addressvKSPAmount: Number of vKSPKSPAmount: Number of KSP
UnlockKSPUnlimited
Event log that occurs when unstaking vKSP x8
Parameters
user: user addressvKSPBefore: The amount of vKSP heldvKSPAfter: Amount of vKSP held after unstakingKSPAmount: Amount of KSP stakedunlockTime: Available unstaking time (timestamp)
RefixBoosting
Event log of staking period is changed
Parameter
user: user addresslockPeriod: periodboostingAmount: Number of vKSP after period changedunlockTime: Available unstaking time (timestamp)
ChangeMiningRate
Event log of daily KSP distrivution rate changed
GiveReward
Event log of when mined KSP is claimed and distributed
Compound
Event log of when mined KSP restaking.
The compound amount can be entered in integer units
The amount minus the compund amount from the mined amount is returned to the wallet.
Read-Only Functions
balanceOf
Number of vKSP tokens held by each address
getCurrentBalance
Number of vKSP tokens held by each address recent snapshot
getUserUnlockTime
Possible time of unstake
lockedKSP
Number of KSP tokens stakes
mining
KSP distribution rate
It is a value between 0 and 10000, in units of 0.0001%
snapShotBalance
Number of vKSP tokens held by each address and snapshot
snapShotCount
Number of snapshot index each address
getPriorBalance
Historical user vKSP holdings per block
Parameter
user: user addressblockNumber: prior blockNumber
snapShotBalance
Historical vKSP holdings each address
Parameter
user: user addressindex: index
State-Changing Functions
lockKSP
Method for KSP staking
The amount can be entered in integer units
unlockKSP
Method for KSP unstaking
Unstaking is only possible during the unstaking period.
unlockKSPUnlimited
Method for unstake KSP x8
Changed to x4 staking from execution
refixBoosting
Method for KSP staking period change
claimReward
Method that a user calls to claim the claimable KSP
compoundReward
Method for mined KSP staking
Can be called when the reward is 1 KSP or more
It is possible to stake in integer units, and the rest is to the wallet address.
Last updated