ZivoeRewards.sol
Staking for Native Protocol Token(s)
Last updated
Staking for Native Protocol Token(s)
Last updated
Zivoe Finance - Official Documentation
This contract facilitates staking and yield distribution.
This contract has the following responsibilities:
Allows staking and unstaking of modular "stakingToken".
Allows claiming yield distributed / "deposited" to this contract.
Allows multiple assets to be added as "rewardToken" for distributions.
Vests rewardTokens linearly overtime to stakers.
Reward
This struct stores information for reward tokens.
balanceOf() - Returns the amount of tokens owned by "account", received when depositing via stake()
.
getRewardForDuration() - Returns the total amount of rewards being distributed to everyone for current rewardsDuration.
totalSupply() - Returns the amount of tokens in existence; these are minted and burned when depositing or withdrawing.
viewAccountRewardPerTokenPaid() - Returns the last snapshot of rewardPerTokenStored taken for a reward asset.
viewRewards() - Returns the rewards earned of a specific rewardToken for an address.
earned() - Provides information on the rewards available for claim.
lastTimeRewardApplicable() - Helper function for assessing distribution timelines.
rewardPerToken() - Cumulative amount of rewards distributed per LP token.
addReward() - Adds a new asset as a reward to this contract.
depositReward() - Deposits a reward to this contract for distribution.
fullWithdraw() - Simultaneously calls withdraw()
and getRewards()
for convenience.
stake() - Stakes the specified amount of stakingToken to this contract.
stakeFor() - Stakes the specified amount of stakingToken to this contract, awarded to someone else.
getRewards() - Claim rewards for all possible _rewardTokens.
withdraw() - Withdraws the specified amount of stakingToken from this contract.
balanceOf()
Returns the amount of tokens owned by "account", received when depositing via stake()
.
Returns
getRewardForDuration()
Returns the total amount of rewards being distributed to everyone for current rewardsDuration.
Returns
totalSupply()
Returns the amount of tokens in existence; these are minted and burned when depositing or withdrawing.
Returns
viewAccountRewardPerTokenPaid()
Returns the last snapshot of rewardPerTokenStored taken for a reward asset.
Returns
viewRewards()
Returns the rewards earned of a specific rewardToken for an address.
Returns
earned()
Provides information on the rewards available for claim.
Returns
lastTimeRewardApplicable()
Helper function for assessing distribution timelines.
Returns
rewardPerToken()
Cumulative amount of rewards distributed per LP token.
Returns
addReward()
Adds a new asset as a reward to this contract.
Emits the RewardAdded() event
depositReward()
Deposits a reward to this contract for distribution.
Emits the RewardDeposited() event
fullWithdraw()
Simultaneously calls withdraw()
and getRewards()
for convenience.
Emits the Withdrawn() and RewardDistributed() event(s)
stake()
Stakes the specified amount of stakingToken to this contract.
Emits the Staked() event
stakeFor()
Stakes the specified amount of stakingToken to this contract, awarded to someone else.
Emits the StakedFor() event
getRewards()
Claim rewards for all possible _rewardTokens.
Emits the RewardDistributed() event
withdraw()
Withdraws the specified amount of stakingToken from this contract.
Emits the Withdrawn() event
RewardAdded()
Emitted during addReward()
RewardDeposited()
Emitted during depositReward()
RewardDistributed()
Emitted during #getrewardat
Staked()
Emitted during stake()
StakedFor()
Emitted during stakeFor()
Withdrawn()
Emitted during withdraw()
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|