IAutoStakingV3

Parameter Structs
Functions

Parameter Structs

UserInfo

struct UserInfo {
        uint256 shares; 
        uint256 lastDepositedTime; 
        uint256 tokensAtLastUserAction; 
        uint256 lastUserActionTime; 
        uint256[] rewardPending;
        uint256[] rewardDebt;
    }

Structure that contains info about the user`s deposit and reward in auto staking.

Fields description

Name

Type

Description

shares

uint256

Number of shares for a user

lastDepositedTime

uint256

Keeps track of deposited time for potential penalty

tokensAtLastUserAction

uint256

Keeps track of tokens deposited at the last user action

lastUserActionTime

uint256

Keeps track of the last user action time

rewardPending

uint256[]

Reward that user can claim from each smart lock-farm (each lock-farm corresponds to manual staking reward account)

rewardDebt

uint256[]

Amount of tokens the user has already claimed

Status

Structure that contains auto staking`s status for specified user.

Fields description

Name

Type

Description

token

address

Address of stakings`s token

rewardPerBlock

uint256

Amount of BLUES minted per block (4 secs) for staking

tokensWithCompounding

uint256

Summarized amount of user`s deposited and compounded tokens

tokensAtLastUserAction

uint256

Amount of tokens that user had after last depositt/withdrawal operation

perfomanceFee

uint256

Auto staking`s fee

callFee

uint256

Fee on reward claim for claimer

withdrawFee

uint256

Fee withheld from reward if withdrawing tokens before the withdrawFeePeriod ends

withdrawFeePeriod

uint256

Period after deposit when the fee from reward is withheld

rewardPerClaim

uint256

Amount of tokens received by user that claims tokens for auto staking

userTimeFeeEnd

uint256

Timestamp when withdrawFeePeriod ends

accDeposited

uint256

Summarized deposits and compounds from all the users

Functions

getRewardPerClaim

Returns reward per claim at the time _timestamp.

getStatus

Returns auto staking status for _user at the time _timestamp.

getUserInfo

Returns _user`s auto staking info.

unstakeAvailable

Returns summarized amounts of _user`s deposited and available to claim compounded tokens at the time _timestamp.

totalAssets

Returns summarized amounts of _user`s deposited, available to claim compounded tokens, and locked compounded tokens at the time _timestamp.

earnedSinceLastAction

Returns the amount of tokens that the user earned since the last deposit/withdrawal operation.

deposit

Deposits tokens from msg.sender to auto staking.

withdrawAll

Withdraws all the msg.sender`s deposited and available to claim compounded tokens. Locked compounded tokens are distributed among all the left users.

claim

Compounds all the auto staking rewards and sends back the claim reward to msg.sender.

getPricePerFullShare

Returns the amount of all the autostaking tokens per share at the time _timestamp.

withdraw

Withdraws msg.sender`s tokens and sends them back to him.

Last updated

Was this helpful?