gns
dai
accDaiPerToken
gnsBalance
stakers
unlockManagers
rewardTokens
rewardTokenState
userTokenRewards
userTokenUnlockRewards
stakerInfos
constructor
initialize
owner and initializes dai and gns state variables
initializeV2
dai as a reward token (old stakers.debtDai, unlockSchedules.debtDai and accDaiPerToken are deprecacted now) Necessary to call right after contract is updated because otherwise distributeRewardDai() reverts.
onlyAuthorizedUnlockManager
owner and unlockManagers can create both types for anyone.
onlyRewardToken
_token not configured as a reward token
notInCooldown
setUnlockManager
_manager is _authorized to create vests for other users.
Emits {UnlockManagerUpdated}_
addRewardToken
owner.
setDelegatee
_token to _delegatee. _token must be a valid reward token.
unlockedGns
_schedule at _timestamp. Includes already claimed GNS tokens.
releasableGns
_schedule at _timestamp. Doesn’t include already claimed GNS tokens.
owner
isRewardToken
_token is a listed reward token.
distributeReward
_amountToken of _token (valid reward token) from caller to this contract and updates accRewardPerGns.
Note: accRewardPerGns is normalized to 1e18 for all reward tokens (even those with less than 18 decimals)
Emits {RewardDistributed}_
harvestToken
_token rewards. _token must be a valid reward token.
harvestTokenFromUnlock
_token rewards for vests _ids. _token must be a valid reward token.
harvestTokenAll
_token rewards and pending rewards for vests _ids.
harvestTokens
harvestTokensFromUnlock
_ids for all supported reward tokens.
harvestTokensAll
_ids for all supported reward tokens.
compoundGnsRewards
harvestDai
harvestDaiFromUnlock
_ids.
harvestDaiAll
_ids.
harvestAll
_ids for all supported reward tokens (+ old DAI rewards).
stakeGns
_amountGns from caller.
Emits {GnsStaked}_
unstakeGns
_amountGns from caller.
Emits {GnsUnstaked}_
claimUnlockedGns
_ids.
createUnlockSchedule
_staker given _schedule input parameters. Restricted with onlyAuthorizedUnlockManager access control.
Emits {UnlockScheduled}_
revokeUnlockSchedule
_id for _staker. Sends the unlocked GNS to _staker and sends the remaining locked GNS to owner. Only callable by owner.
Emits {UnlockScheduleRevoked}_
pendingRewardToken
_token rewards (precision depends on token) for _staker.
pendingRewardTokens
_staker’s pending rewards (precision depends on token) for all supported tokens.
pendingRewardTokensFromUnlocks
_staker’s pending rewards (precision depends on token) from vests _ids for all supported tokens.
pendingRewardDai
_staker’s pending old dai rewards (1e18 precision).
pendingRewardDaiFromUnlocks
_staker’s pending old dai rewards (1e18 precision) from vests _ids.
totalGnsStaked
_staker's total non-vested and vested GNS staked (1e18 precision)
getUnlockSchedules
_staker's vests.
getUnlockSchedules
_staker's vest at _index'
