StakeUpStaking
Overview
StakeUpStaking is a smart contract that allows users to stake SUP tokens in order to receive fees generated from stUsdc.
Contract API
stake
stakefunction stake(uint256 stakeupAmount) external;Stake SUP tokens in the staking contract to earn stUsdc rewards.
unstake
unstakefunction unstake(uint256 stakeupAmount, bool harvestRewards) external;Unstake SUP tokens from the staking contract.
harvest
harvestfunction harvest() external;Claim all stUsdc rewards accrued by the msg.sender
getStakeUpToken
getStakeUpTokenfunction stakupToken() external view returns (IStakeUpToken);Returns the SUP token instance.
getStUsdc
getStUsdcfunction stUsdc() external view returns (IStUsdc);Returns the stUsdc token instance.
claimableRewards
claimableRewardsfunction claimableRewards(address account) external view returns (uint256);Returns the amount of claimable rewards available for an account in terms of stUsdc.
totalStakeUpStaked
totalStakeUpStakedfunction totalStakeUpStaked() external view returns (uint256);Returns the total amount of SUP staked within the staking contract.
getRewardData
getRewardDatafunction rewardData() external view returns (RewardData memory);Returns the global RewardData struct for the staking contract.
/**
* @notice Data structure containing information pertaining to a reward period
* @dev All rewards are denominated in stTBY shares due to the token's rebasing nature
* @param index The last index that the rewards were updated
* @param lastShares The last shares balance of rewards available in the contract
*/
struct RewardData {
uint128 index;
uint128 lastShares;
}getUserStakingData
getUserStakingDatafunction userStakingData(address account) external view returns (StakingData memory);Returns StakingData for a specific account.
/**
* @notice Data structure containing information pertaining to a user's stake
* @dev All rewards are denominated in stTBY shares due to the token's rebasing nature
* @param amountStaked The amount of STAKEUP tokens currently staked
* @param index The last index that the users rewards were updated
* @param rewardsAccrued The amount of stTBY rewards that have accrued to the stake
*/
struct StakingData {
uint256 amountStaked;
uint128 index;
uint128 rewardsAccrued;
}getLastRewardBlock
getLastRewardBlockfunction lastRewardBlock() external view returns (uint256);Returns the last block of the global reward data.
Last updated