IMinterV3

Parameter Structs
Functions

Parameter Structs

FarmInfo

struct FarmInfo {
        uint256 multiplier; 
        uint256 rewardPerBlock;
        uint256 accDeposited;
        uint256 deposited;
        uint256 earned;
        uint256 totalReward;
        address token;
        address farm;
    }

Struct that contains all the information about the user`s farm/staking.

Fields description

Name

Type

Description

multiplier

uint256

Multiplier for minted tokens for farm/staking

rewardPerBlock

uint256

Amount of tokens minted for farm per block (4 secs)

accDeposited

uint256

Accumulated farms`s tokens deposited from all the users

deposited

uint256

Amount of token deposited by the specified user

earned

uint256

Amount of BLUES that user can claim

totalReward

uint256

Amount of BLUES minted, but locked and could be claimed after new TVL goal is reached (see whitepaper)

token

address

Farm`s/staking`s stake token

farm

address

Farm`s/staking`s contract address

UserReferralInfo

struct UserReferralInfo {
        bool isReferrer;
        address referrer;
        address[] referrals;
        uint256 earnedRef;
        uint256 receivedRef;
    }

Struct that holds user`s info about participating in the referral program.

Fields description

Name

Type

Description

isReferrer

bool

Indicates whether the user is someone`s referrer or not

referrer

address

Address of the user`s referrer. Zero address (0x000โ€ฆ) if the user has no referrer

referrals

address[]

Addresses of all the user`s referrals. Empty array if the user has no referrals

earnedRef

uint256

Amount of tokens that user has earned as referral

receivedRef

uint256

Amount of tokens that user has earned as referrer

Functions

getStatusStaking

function getStatusStaking(address _user, uint256 _timestamp) external view returns (FarmInfo[] memory)

Returns _user`s info across all the protocol`s stakings at the time _timestamp.

getStatusFarms

function getStatusFarms(address _user, uint256 _timestamp) external view returns (FarmInfo[] memory)

Returns _user`s info across all the protocol`s farms at the time _timestamp.

getFarms

function getFarms() external view returns (IEarningV2[] memory)

Returns all the protocol`s farms.

getStakings

function getStakings() external view returns (IEarningV2[] memory)

Returns all the protocol`s stakings.

getTvlLevels

function getTvlLevels() external view returns (uint256[] memory)

Returns protocol`s TVL goals.

getAprWeights

function getAprWeights() external view returns (uint16[] memory)

Returns protocol`s tokens minting among reward accounts (see whitepaper) distribution (multiplied by 1e4).

getUserReferralInfo

function getUserReferralInfo(address _user) external view returns(UserStats.UserReferralInfo memory)

Returns info about _user`s participating in the referral program.

devPull

function devPull() external

Mints BLUES that dev has earned to specified dev address.

earnsAsReferrer

function earnsAsReferrer(address _user, uint256 _timestamp) external view returns (uint256 earned, uint256 pendingReward, uint256 referralsCnt)

Returns info on how much tokens _user earns as referrer.

Parameters

Name

Type

Description

_user

address

Address of user

_timestamp

uint256

Timestamp to get info for

Return values

Name

Type

Description

earned

uint256

Amount of tokens that _user has already earned as referrer

pendingReward

uint256

Amount of tokens earned as referrer that _user can claim

referralsCnt

uint256

Amount of _user`s referrals

earnsAsReferral

function earnsAsReferral(address _user, uint256 _timestamp) external view returns (uint256 earned, uint256 pendingReward)

Returns info on how much tokens _user earns as referral.

Parameters

Name

Type

Description

_user

address

Address of user

_timestamp

uint256

Timestamp to get info for

Return values

Name

Type

Description

earned

uint256

Amount of tokens that _user has already earned as referral

pendingReward

uint256

Amount of tokens earned as referral that _user can claim

earnsFromReferralProgram

function earnsFromReferralProgram(address _user, uint256 _timestamp) external view returns (uint256 earned, uint256 pendingReward, uint256 referralsCnt)

Returns info on how much tokens _user earns as referrer and referral summarized.

Parameters

Name

Type

Description

_user

address

Address of user

_timestamp

uint256

Timestamp to get info for

Return values

Name

Type

Description

earned

uint256

Amount of tokens that _user has already earned as referrer and referral summarized

pendingReward

uint256

Amount of tokens earned as referrer and referral that _user can claim

referralsCnt

uint256

Amount of _user`s referrals

registerReferrer

function registerReferrer() external

Registers msg.sender as referrer.

registerReferral

function registerReferral(address refCode) external

Registers msg.sender as referral with refCode as address of the referrer. Referrer should be registered as referrer, otherwise the transaction is reverted.

isReferrer

function isReferrer(address user) external view returns(bool)

Returns true if the user is registered as a referrer, false otherwise.

getUserReferrer

function getUserReferrer(address user) external view returns(address)

Returns the address of the user`s referrer. If the user has no referrer zero address (0x000โ€ฆ) is returned.

untilNextDecrease

function untilNextDecrease() external view returns (uint256 timeUntilNextsDecrease)

Time in seconds until the next decrease of BLUES minted amount.

getEpochsCount

function getEpochsCount() external view returns (uint8 epochsCount)

Returns the count of TVL goals.

Last updated