Internal Functions

The EGL Voting contract contains multiple internal functions. These include:

internalVote:

function _internalVote(
    address _voter,
    uint _gasTarget,
    uint _eglAmount,
    uint8 _lockupDuration,
    uint _releaseTime
) internal

Records the details of the vote for a given address and sets up the relevant data structures

Emits Vote event

internalWithdraw:

function _internalWithdraw(
    address _voter
) internal returns (uint totalWithdrawn)

Removes the vote for a given address and calculates any rewards due

Emits Withdraw event

issueCreatorRewards:

Calculates the creator rewards for the reward epoch and transfers the rewards to the creatorRewardsAddress

Emits CreatorRewardsClaimed event

calculateBlockReward:

Calculates the potential block reward of the block that would be claimed by the miner of the block.

Emits BlockRewardCalculated event

calculateSerializedEgl:

Calculates the current serialized EGL. The serialized EGL value is used when calculating how many BPT's have been release as well as in the calculation of creator rewards

Emits SerializedEglCalculated event

calculateCurrentPoolTokensDue:

Calculates the number of pool tokens due based on the current serialized EGL

calculateBonusEglsDue:

Calculates the number of bonus EGL's due to Genesis participants based on their contribution in Genesis

calculateVoterReward:

Calculates the reward due to the voter based on their vote parameters

Emits VoterRewardCalculated event

calculatePercentageOfTokensInCirculation:

Calculates the percentage of token in circulation give the total number of tokens

Last updated