$RARE Curation Staking
Last updated
Last updated
Author: SuperRare Labs, koloz
The Staking Registry interface containing all functions, events, etc.
Increase amount staked when a user stakes.
Parameters
Name | Type | Description |
---|---|---|
Decrease the amount staked when a user unstakes.
Parameters
Set staking addresses for a target.
Parameters
Set the default payee.
Parameters
Set the reward swap discount percentage.
Parameters
Set the unstake deflationary percentage.
Parameters
Set the round period length time.
Parameters
Set the ENS reverse registrar address.
Parameters
Set the ENS resolver address.
Parameters
Set the uniswap pool address for the given ERC20 token.
Parameters
Set stakee percentage.
Parameters
Set claimer percentage.
Parameters
Pools to transfer $RARE tokens, usually into pools. This is so users only need to approve the registry when staking or performing reward swaps.
Parameters
Get the address for sending rewards if there are no stakers.
Returns
Get the swap pool address for the ERC20 token.
Returns
Retrieve the address of $RARE.
Returns
Retrieve the address of Wrapped Ethereum.
Returns
Get reward swap discount percentage.
Returns
Get the unstake deflationary percentage.
Returns
Get the stakee percentage.
Parameters
Returns
Get the claimer percentage.
Parameters
Returns
Get the round period length.
Returns
Retrieves the staking info for a given user.
Parameters
Returns
Retrieves the total amount of rare staked by a given user.
Parameters
Returns
Retrieves the total amount of rare being staked on a given user.
Parameters
Returns
Retrieves a list of all the ERC20 staking contracts.
Returns
Retrieves a list of all the users participating in staking.
Returns
Retrieves a list of all the users being staked on.
Returns
Query the users for the following staking addresseses.
Parameters
Bytes32 representation of the role used for setting the staking address of a user.
Returns
Bytes32 representation of the admin role for granting the ability to set amount staked for a single user/total amount staked on a user.
Returns
Bytes32 representation of the role used for updating the amount being staked on a user/amount a user is staking globally.
Returns
Bytes32 representation of the role used for period length, deflationary percentages, and the default payee.
Returns
Bytes32 representation of the role used for updating the ENS resolvers.
Returns
Bytes32 representation of the role used for updating uniswap pools.
Returns
Emitted via {setStakeePercentage} when the stakee update's their percentage.
Emitted via {setClaimerPercentage} when the stakee update's their percentage.
Emitted via {setDefaultPayee} when the defaultPayee is updated.
Emitted via {setDeflationaryPercentage} when the deflationaryPercentage is updated.
Emitted via {setDiscountPercentage} when the discountedPercent is updated.
Emitted via {setPeriodLength} when the periodLength is updated.
Emitted via {setReverseRegistrar} when the ENS reverse registrar is updated.
Emitted via {setResolver} when the ENS resolver is updated.
Emitted via {setSwapPool} when a new swap pool has been set.
Emitted when guarded functions are called by users without the necessary permissions.
Emitted via {setSwapPool} if the pool doesn't match the token and pairs with WETH.
Emitted via {setStakingAddress} if the user already has a staking address.
Emitted when Zero address provided where it is not allowed.
Error emitted in {transferRareTo} when a user performs an action that requires moving $RARE but has not made enough allowance for the registry.
Emitted when a percentage is beyond the specified limit.
Emitted when a Period Length is beyond the specified limit.
A struct holding the information about the target's staking contract.
Target being staked on is omitted as it's the key in the mapping used.
Author: SuperRare Labs, Koloz
The reward accumulator interface containing all functions, events, etc. for accumulating and swapping rewards.
Swap RARE for a discounted price on tokens stored
Parameters
Estimate the discounted $RARE price for a given token.
Parameters
Returns
Error emitted when user doesnt meet the criteria for call.
Error emitted via {rewardSwap} if reward swap doesn't have enough funds to perform the swap.
Error emitted via {rewardSwap} if the rare price is too low to handle the _minAmountOut requirement.
Error emitted via {rewardSwap} if _tokenOut is the $RARE address.
Emitted when an unsupported ERC20 token for reward swapping.
Inherits: IERC20Upgradeable
Author: SuperRare Labs, koloz
The Rare Staking Pool ERC20 (Rarity Pool) interface containing all functions, events, etc.
Allocates rewards for the current round with the given amount.
Parameters
Snapshots the rewards for the current round. Anyone can call this.
Stake $RARE tokens to the target associated with the contract and receive synthetic tokens in return.
Parameters
Unstake by returning synthetic tokens and receiving previously staked $RARE in return.
Parameters
Claim rewards due to the _user for the supplied rounds. Rewards are proportional to the synthetic tokens held during the snapshot associated with each round. Throws if user has already claimed for a given round. Throws if current round is being claimed.
Parameters
Query if a user has claimed their reward for a given round.
Parameters
Query total amount of $RARE a user has staked on this contract.
Parameters
Returns
Query current round. The current round is accumulating rewards.
Returns
Name of the synthetic asset.
Returns
Symbol of the synthetic asset.
Returns
Query the target being staked on by this contract.
Returns
Retrieves a list of all the users that have staked.
Returns
Total rewards available for the supplied round.
Returns
Query rewards for the supplied user address for the round supplied rounds. Does not omit rewards for rounds that have already been claimed. Allows for easier historical lookups.
Parameters
Returns
Query rewards for the supplied user address for the round supplied rounds. Throws if any round has already been claimed.
Parameters
Returns
Calculates the number of sRare yielded from staking.
Parameters
Returns
Calculates the number of rare yielded from unstaking.
Parameters
Returns
Total rewards snapshotted since con.
Returns
List of all rounds with claim associated with them.
Returns
Get the unix creation time of the staking contract.
Returns
Get the unix time of the most recent snapshot.
Returns
Total amount of Rewards claimed.
Returns
Error emitted when user doesnt meet the criteria for call.
Error emitted via {claimRewardsForRounds} if sender has already claimed their reward one of the supplied rounds.
Error emitted via {claimRewardsForRounds} if too many rounds are supplied.
Error emitted via {claimRewardsForRounds} if claiming current round.
Error emitted via {claimRewardsForRounds} if claiming no rounds.
Error emitted via {unstake} when unstaking more synthetic tokens than is in their balance.
Error emitted via {unstake} when the sale return proves greater than the amount staked. This should be impossible.
Error emitted via {addRewards} if adding 0 rewards.
Author: charlescrain
The RewardAccumulator Factory interface containing all functions, events, etc.
Deploys a RewardAccumulator contract.
Parameters
Returns
Set the staking registry address field to be used.
Parameters
Set the RewardAccumulator template address to be used.
Parameters
Retrieve the currently used staking registry address.
Returns
Retrieve the template contract
Returns
Emitted via {deployRewardSwap} when a new RewardAccumulator contract is deployed.
Author: SuperRare Labs, koloz
The Staking Factory interface containing all functions, events, etc.
Deploys a staking contract for the supplied target address. Reverts if address exists.
Parameters
Returns
Set the staking registry address field to be used.
Parameters
Set the rare staking ERC20 template address to be used.
Parameters
Retrieve the currently used staking registry address.
Returns
Retrieve the currently template of the staking ERC20 contract.
Returns
Emitted via {deployStaking} when a new staking contract is deployed.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_staker
address
The user who is staking.
_stakedOn
address
The user who is being staked on.
_amount
uint256
The amount of $RARE that has been staked.
_staker
address
The user who is unstaking.
_stakedOn
address
The user who was being staked on.
_amount
uint256
The amount of $RARE that has been unstaked.
_user
address
Address of the target whose staking address is being set.
_stakingAddress
address
Address of the staking pool contract.
_rewardSwapAddress
address
Address of the reward swap contract.
_payee
address
Address of the account to be the new default payee.
_percentage
uint256
The new discount percentage.
_percentage
uint256
The new deflactionary percentage.
_periodLength
uint256
The new period start.
_reverseRegistrar
address
The new period start.
_resolver
address
The new period start.
_uniswapPool
address
Address of uniswap pool.
_token
address
Address of ERC20 contract.
_stakeePercentage
uint256
The new stakee percentage.
_claimerPercentage
uint256
The new stakee percentage.
_from
address
Address to transfer the tokens from.
_to
address
Address to transfer the tokens to.
_amount
uint256
uint256 amount to transfer.
<none>
address
address to send rewards to.
<none>
address
address of the swap pool associated with the token.
<none>
address
address Address of $RARE (the staking token to be used).
<none>
address
address Address of Wrapped Ethereum.
<none>
uint256
uint256 discount percentage.
<none>
uint256
uint256 deflationary percentage.
_user
address
Address of the user being staked on.
<none>
uint256
uint256 stakee percentage.
_user
address
Address of the user reawards are being claimed for.
<none>
uint256
uint256 claimer percentage.
<none>
uint256
uint256 period length.
_user
address
Address of user being queried.
<none>
Info
Info struct containing name, symbol, and staking address.
_user
address
Address of the user staking.
<none>
uint256
uint256 Amount of rare the user is staking.
_user
address
Address of the user being staked on.
<none>
uint256
uint256 Amount of rare being staked on the user.
<none>
address[]
list of contracts users can use to stake.
<none>
address[]
list of addresses of all the users who are currently staking.
<none>
address[]
list of addresses of all the users who are being staked on.
_stakingAddrs
address[]
Addresses of staking contracts being queried.
<none>
bytes32
bytes32 value of the staking info setter role.
<none>
bytes32
bytes32 value of the staking stat setter admin role.
<none>
bytes32
bytes32 value of the stat setter role.
<none>
bytes32
bytes32 value of the staking config setter role.
<none>
bytes32
bytes32 value of the ens setter role.
<none>
bytes32
bytes32 value of the swap pool setter role.
_tokenOut
address
Address of the ERC20 to pay out with. If null address, then uses ETH.
_minAmountOut
uint256
Min amount one is willing to receive for the _rareIn.
_rareIn
uint128
The amount of RARE one is looking to trade.
_tokenOut
address
Address of the ERC20 token to be swapped for.
_rareAmountIn
uint128
uint128 amount of RARE to trade for the _tokenOut.
<none>
uint256
uint256 amount of _tokenOut for the _rareAmountIn.
_donor
address
Address of the account donating the $RARE.
_amount
uint256
Amount of $RARE being staked.
_amount
uint256
Amount of $RARE being staked.
_amount
uint256
Amount of synthetic tokens to unstake.
_user
address
Address of user to claim on behalf of.
_rounds
uint256[]
List of uint256 round Ids to claim a reward for.
_staker
address
Address of user being checked.
_round
uint256
The round being checked for.
_user
address
Address of staker.
<none>
uint256
uint256 Amount of $RARE staked.
<none>
uint256
uint256 Claim round id.
<none>
string
Name of the synthetic asset.
<none>
string
Symbol of the synthetic asset.
<none>
address
Address of target being staked on;
<none>
address[]
list of addresses of all the users who are being staked on.
<none>
uint256
uint256 Amount of $RARE tokens allocated as rewards for round.
_user
address
Address of the user to get rewards.
_rounds
uint256[]
List of uint256 round ids to look up the rewards.
<none>
uint256
uint256 Amount of $RARE tokens rewarded.
_user
address
Address of the user to get rewards.
_rounds
uint256[]
List of uint256 round ids to look up the rewards.
<none>
uint256
uint256 Amount of $RARE tokens rewarded.
_totalSRare
uint256
Current supply of sRare.
_stakedAmount
uint256
Amount of RARE being staked.
<none>
uint256
uint256 Amount of synthetic tokens one would get for staking {_stakedAmount} given a totalSupply of {_totalSRare}.
_totalSRareByUser
uint256
Current balance of sRARE held by the given user.
_totalRareStakedByUser
uint256
Total Amount of RARE staked by the given user.
_unstakeAmount
uint256
Amount of sRare being traded in.
<none>
uint256
uint256 Amount of $RARE tokens one would get for unstaking {_unstakeAmount} given {_totalSRareByUser} and {_totalRareStakedByUser}.
<none>
uint256
uint256 Amount of $RARE tokens allocated as rewards.
<none>
uint256[]
uint256[] claim round ids.
<none>
uint256
uint256 unix creation time of the contract.
<none>
uint256
uint256 unix time of the most recent snapshot.
<none>
uint256
uint256 amount of rewards claimed.
_stakingAddress
address
Address of staking contract.
<none>
address payable
address Address of the RewardAccumulator contract.
_stakingRegistry
address
Address of the new staking registry contract.
_rewardTemplate
address
Address of the RewardAccumulator template.
<none>
address
address Address of the staking registry contract.
<none>
address
address Address of the template.
_user
address
Address of the target to deploy staking contract for.
<none>
address
address Address of the staking contract.
_stakingRegistry
address
Address of the new staking registry contract.
_rareStakingTemplate
address
Address of the staking ERC20 template.
<none>
address
address Address of the staking registry contract.
<none>
address
address Address of the staking ERC20 template to be used.