This contract is responsible for the ecosystem behavior related to staking MESH. Voting rights (vMESH) are issued according to the staking quantity and period, and 40% of the daily MESH mining quantity is distributed to staking participants. (MESH distribution for staking participants may be changed through governance voting)
Events Read-Only Functions State-Changing Functions
Events
LockMESH
Copy event LockMESH(address user, uint lockPeriod, uint MESHAmount, uint totalLockedMESH, uint unlockTime);
Event log of MESH staking
Parameters
MESHAmount
: Number of MESH locked b
totalLockedMESH
: Total Number of staked MESH
unlockTime
: Available unstaking time (timestamp)
UnlockMESH
Copy event UnlockMESH(address user, uint vMESHAmount, uint MESHAmount);
Event log of MESH unstaking
Parameters
vMESHAmount
: Number of vMESH
MESHAmount
: Number of MESH
UnlockMESHUnlimited
Copy event UnlockMESHUnlimited(address user, uint vMESHBefore, uint vMESHAfter, uint MESHAmount, uint unlockTime);
Event log that occurs when unstaking vMESH x8
Parameters
vMESHBefore
: The amount of vMESH held
vMESHAfter
: Amount of vMESH held after unstaking
MESHAmount
: Amount of MESH staked
unlockTime
: Available unstaking time (timestamp)
RefixBoosting
Copy event RefixBoosting(address user, uint lockPeriod, uint boostingAmount);
Event log of staking period is changed
Parameter
boostingAmount
: Number of vMESH after period changed
ChangeMiningRate
Copy event ChangeMiningRate(uint _mining);
Event log of daily MESH distribution rate changed
GiveReward
Copy event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);
Event log of when mined MESH is claimed and distributed
Compound
Copy event Compound(address user, uint reward, uint compoundAmount, uint transferAmount, uint mintAmount);
Event log of when mined MESH 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 vMESH tokens held by each address
getCurrentBalance
Number of vMESH tokens held by each address recent snapshot
getUserUnlockTime
lockedMESH
Number of MESH tokens stakes
mining
It is a value between 0 and 10000, in units of 0.0001%
snapShotBalance
Number of vMESH tokens held by each address and snapshot
snapShotCount
Number of snapshot index each address
getPriorBalance
Copy function getPriorBalance(address user, uint blockNumber) public view returns (uint)
Historical user vMESH holdings per block
Parameter
blockNumber
: prior blockNumber
snapShotBalance
Copy function snapShotBalance(address user, uint index) public view returns (uint)
Historical vMESH holdings each address
State-Changing Functions
lockMESH
Copy function lockMESH(uint amount, uint lockPeriodRequested) public
The amount can be entered in integer units
unlockMESH
Copy function unlockMESH() public
Method for MESH unstaking
Unstaking is only possible during the unstaking period.
unlockMESHUnlimited
Copy function unlockMESHUnlimited() public
Method for unstake MESH x8
Changed to x4 staking from execution
refixBoosting
Copy function refixBoosting(uint lockPeriodRequested)
Method for MESH staking period change
claimReward
Copy function claimReward() public
Method that a user calls to claim the claimable MESH
compoundReward
Copy function compoundReward() public
Method for mined MESH staking
Can be called when the reward is 1 MESH or more
It is possible to stake in integer units, and the rest is to the wallet address.