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

function stake(uint256 stakeupAmount) external;

Stake SUP tokens in the staking contract to earn stUsdc rewards.

unstake

function unstake(uint256 stakeupAmount, bool harvestRewards) external;

Unstake SUP tokens from the staking contract.

harvest

function harvest() external;

Claim all stUsdc rewards accrued by the msg.sender

getStakeUpToken

function stakupToken() external view returns (IStakeUpToken);

Returns the SUP token instance.

getStUsdc

function stUsdc() external view returns (IStUsdc);

Returns the stUsdc token instance.

claimableRewards

function claimableRewards(address account) external view returns (uint256);

Returns the amount of claimable rewards available for an account in terms of stUsdc.

totalStakeUpStaked

function totalStakeUpStaked() external view returns (uint256);

Returns the total amount of SUP staked within the staking contract.

getRewardData

function 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

function 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

function lastRewardBlock() external view returns (uint256);

Returns the last block of the global reward data.

Last updated