VotingRewardToken
This contract is responsible for the ecosystem behavior related to staking RewardToken. Voting rights (vRewardToken) are issued according to the staking quantity and period.
Code
Github Link: (Will be updated after official launch)
Address
Events, Read-Only Functions, and State-Changing Functions
Events
LockRewardToken
event LockRewardToken(
address user,
uint256 lockPeriod,
uint256 rewardTokenAmount,
uint256 totalLockedRewardToken,
uint256 totalLockedvRewardToken,
uint256 unlockTime
)Event log of RewardToken staking
Parameters
user: user addresslockPeriod:4 months : 10,368,000
8 months : 20,736,000
12 months : 31,104,000
unlimited : 1,555,200,000
rewardTokenAmount: A Number of RewardTokentotalLockedRewardToken: Total number of staked RewardTokentotalLockedvRewardToken: Total number of users' vRewardTokenunlockTime: Available unstaking time (timestamp)
UnlockRewardToken
event UnlockRewardToken(address user, uint256 vRewardTokenAmount, uint256 rewardTokenAmount);Event log of RewardToken unstaking
Parameters
user: user addressvRewardTokenAmount: Number of vRewardTokenrewardTokenAmount: Number of RewardToken
UnlockRewardTokenUnlimited
event UnlockRewardTokenUnlimited(
address user,
uint256 vRewardTokenBefore,
uint256 vRewardTokenAfter,
uint256 rewardTokenAmount,
uint256 unlockTime
);Event log that occurs when unstaking vRewardToken unlimited
Parameters
user: user addressvRewardTokenBefore: The amount of vRewardToken heldvRewardTokenAfter: Amount of vRewardToken held after unstakingrewardTokenAmount: Amount of RewardToken stakedunlockTime: Available unstaking time (timestamp)
RefixBoosting
event RefixBoosting(address user, uint lockPeriod, uint boostingAmount, uint unlockTime);Event log of staking period is changed
Parameter
user: user addresslockPeriod: periodboostingAmount: Number of vRewardToken after period changedunlockTime: Available unstaking time (timestamp)
ChangeMiningRate
event ChangeMiningRate(uint _mining);Event log of daily RewardToken distribution rate changed
GiveReward
event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);Event log of when mined RewardToken is claimed and distributed
Compound
event Compound(address user, uint reward, uint compoundAmount, uint transferAmount, uint mintAmount);Event log of when mined RewardToken restaking.
The compound amount can be entered in integer units
The amount minus the compound amount from the mined amount is returned to the wallet.
Read-Only Functions
balanceOf
Number of vRewardToken tokens held by each address
getCurrentBalance
Number of vRewardToken tokens held by each address recent snapshot
getUserUnlockTime
Possible time of unstaking
lockedRewardToken
Number of RewardToken tokens stakes
mining
RewardToken distribution rate
It is a value between 0 and 10000, in units of 0.0001%
snapShotBalance
Number of vRewardToken tokens held by each address and snapshot
snapShotCount
Number of snapshot index each address
getPriorBalance
function getPriorBalance(address user, uint blockNumber) public view returns (uint) Historical user vRewardToken holdings per block
Parameter
user: user addressblockNumber: prior blockNumber
snapShotBalance
function snapShotBalance(address user, uint index) public view returns (uint) Historical vRewardToken holdings each address
Parameter
user: user addressindex: index
State-Changing Functions
lockRewardToken
function lockRewardToken(uint amount, uint lockPeriodRequested) publicMethod for RewardToken staking
The amount can be entered in integer units
unlockRewardToken
function unlockRewardToken() publicMethod for RewardToken unstaking
Unstaking is only possible during the unstaking period.
unlockRewardTokenUnlimited
function unlockRewardTokenUnlimited() publicMethod for unstake RewardToken unlimited
Changed to x4 staking from execution
refixBoosting
function refixBoosting(uint lockPeriodRequested)Method for RewardToken staking period change
claimReward
function claimReward() publicMethod that a user calls to claim the claimable RewardToken
compoundReward
function compoundReward() publicMethod for mined RewardToken staking
Can be called when the reward is 1 RewardToken or more
It is possible to stake in integer units, and the rest is to the wallet address.
Last updated