Blueshift Docs
  • Introduction
    • What is Blueshift?
    • Blueshift token (BLUES)
    • Blueshiftโ€™s audit
    • Fees
  • Getting started
    • How do I connect wallet?
      • Configuring MetaMask
    • How to transfer ADA from Cardano to Milkomeda network?
    • How to transfer Cardano Native Tokens (CNTs) to Milkomeda network?
    • How to transfer ALGO from Algorand to Milkomeda A1 network?
    • How do I trade on Blueshift?
      • ๐ŸŽ“ Swap tutorial
    • How do I provide liquidity (get LP tokens)?
      • ๐ŸŽ“ Add liquidity tutorial
    • How do I withdraw liquidity?
      • ๐ŸŽ“ Withdraw tutorial
    • How do I use farms ?
  • Product concept
    • ๐Ÿ”ฅ Swap Cross-Chain/Local
    • Portfolios
      • Single token invest
    • Farming
    • Yield pools
      • Auto HODL BLUES Pool
    • Smart minting system
    • Referral program ๐Ÿ”ฅ
    • Cardano Wrapped Smart Contracts
  • TECHNICAL REFERENCE
    • Smart contracts overview
    • Blueshift contracts addresses
    • Interface specifications
      • IBlueshiftRouter
      • IBlueshiftArbitrageRouter
      • IOracle
      • IPortfolio
      • IMinterV3
      • IEarningV2
      • IStakingV2
      • IAutoStakingV3
  • Community
    • Telegram (Off. group)
    • Telegram (Chat)
    • Twitter
Powered by GitBook
On this page
  • Parameter Structs
  • UserInfo
  • Status
  • Functions
  • getRewardPerClaim
  • getStatus
  • getUserInfo
  • unstakeAvailable
  • totalAssets
  • earnedSinceLastAction
  • deposit
  • withdrawAll
  • claim
  • getPricePerFullShare
  • withdraw

Was this helpful?

  1. TECHNICAL REFERENCE
  2. Interface specifications

IAutoStakingV3

Parameter Structs

UserInfo

Status

Functions

getRewardPerClaim

getStatus

getUserInfo

unstakeAvailable

totalAssets

earnedSinceLastAction

deposit

withdrawAll

claim

getPricePerFullShare

withdraw

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

struct Status {
        address token;
        uint256 rewardPerBlock;
        uint256 tokensWithCompounding;
        uint256 tokensAtLastUserAction;
        uint256 performanceFee;
        uint256 callFee;
        uint256 withdrawFee;
        uint256 withdrawFeePeriod;
        uint256 rewardPerClaim;
        uint256 userTimeFeeEnd;
        uint256 accDeposited;
    }

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

function getRewardPerClaim(uint256 _timestamp) external view returns (uint256)

Returns reward per claim at the time _timestamp.

getStatus

function getStatus(address _user, uint256 _timestamp) external view returns (Status memory)

Returns auto staking status for _user at the time _timestamp.

getUserInfo

function getUserInfo(address _user) external view returns (UserInfo memory)

Returns _user`s auto staking info.

unstakeAvailable

function unstakeAvailable(address _user, uint256 _timestamp) external view returns (uint256)

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

totalAssets

function totalAssets(address _user, uint256 _timestamp) external view returns (uint256)

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

earnedSinceLastAction

function earnedSinceLastAction(address _user, uint256 _timestamp) external view returns (uint256)

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

deposit

function deposit(uint256 _amount) external

Deposits tokens from msg.sender to auto staking.

withdrawAll

function withdrawAll() external

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

claim

function claim() external

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

getPricePerFullShare

function getPricePerFullShare(uint256 _timestamp) external view returns (uint256)

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

withdraw

function withdraw(uint256 _amount) external

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

PreviousIStakingV2

Last updated 2 years ago

Was this helpful?