golos.publication
smart contract implements logic to calculate all the necessary payments for the post and put the actual calculation results on the website. This logic is based on processing of actual data taken from messages that are received from Event Engine. The calculation results are modified after each received message from Event Engine in real time and depend mainly on such parameters as a size of the reward pool, a number of current publications, as well as «weight» of each voting user.golos.publication
smart contract as an event. Information about this event is sent to Event Engine. Then this information is sent to Golos application.rewardweight
, poststate
, poolstate
and votestate
.rewardweight
event structure contains data about a paid share of reward for a post.message_id
— identifier of the post. rewardweight
— the paid share (in percent) of reward for the post taking into account the imposed fine. rewardweight
takes the value of 100 %. Otherwise, for each extra publication, the author will be dynamically charged a fine in the amount of from 0 to 100 %. Accordingly, the value of rewardweight
for each extra publication will be reduced by the amount of the fine.rewardweight
event is dispatched only in case of a penalty, at 100 % reward it is not dispatched.poststate
event structure contains data about current state of a post.message_id
— identifier of the message. netshares
— amount of funds, which will be taken from the rewards pool as a total fee for the post (this parameter is calculated as a sum of positive voteshares
values of all votes). voteshares
— a share of reward for the post is related to a separate vote. The separate vote value is calculated as multiplying a number of vesting by a weight of voting account. This parameter can take both positive and negative values. The sign «-» is assigned to «downvote» vote while the sign «+» is assigned to «upvote» one.sumcuratorsw
— total weight of all curators votes at the current time.sharesfn
— value calculated by the reward function (mainfunc
) applied to the netshares
message.poolstate
event structure contains data about current rewards pool.created
— the pool creation time (a pool selected by this time). msgs
— a number of messages awaiting rewards from the pool created
. funds
— a number of tokens in the rewards pool. rshares
— total rshares
value of all posts in the pool. rsharesfn
— total sharesfn
value of all posts in the pool. votestate
event structure contains data about current post voting results.voter
— account name (a user) who votes for the message. message_id
— identifier of the message. weight
— a vote weight (in percent) of the account voter
. curatorsw
— a «weight» of the curator. rshares
— parameter used in calculating rewards for a post. The parameter is calculated as multiplication of voting account's vesting by a vote weight in percentages (rshares = eff_vesting * weight / 10000
). This parameter can take both positive and negative values.The vote of «downvote» corresponds to a negative value. payout
— resulting total amount of reward for the post at the time of receiving data from Event Engine. reward_weight = rewardweight::reward_weight
— a weight of reward for a post. funds = poolstate::state.funds
— total number of tokens in the reward pool. sharesfn = poststate::sharesfn
— a share of tokens that allocated in the rewards pool to be used for reward for the post (this parameter depends on a weight of the post). rsharesfn = poolstate::state::rsharesfn
— number of tokens that allocated in the rewards pool to be be spent on reward for all posts (parameter depends on total weight of all posts). reward_weight
shows the share of author's fee for the publication, taking into account possible penalty imposed on this publication. By default, the number of publications per day should not exceed four. For exceeding this amount the author is charged a penalty. By default, the reward_weight
value is calculated using the formulapostbw_charge
component is the battery charge. Each use of the battery changes the charge by 100 %. The charge is restored completely, if within twenty-four hours from the previous posting no new post is created.payout
with using the formula (1), it is necessary to use data obtained from Event Engine only at the same time point.curators_prcnt
independently during the post creation. If the author does not specify this parameter, the min_curators_prcnt
value is taken from the pstngparams
table as this parameter. This value means minimum possible share allocated to curators from total rewards for the post.curation_payout
— resulting total amount of fee to curators for the post at the time of receiving data from Event Engine, curators_prcnt
— share (in percent), deducted to curators, of the total reward for the post; payout
— total amount of reward for the post, calculated by the formula (1). curator_rewardⱼ
fee allocated to individual curator j
it is recommended to use this formulacuration_payout
— total amount of fee to curators for the post, calculated by the formula (2). curatorswⱼ = votestate::curatorswⱼ
— a weight of a positive vote j
of the «upvote» type. weights_sum = poststate::weights_sum
— total weight of all positive votes of the «upvote» type. (curatorswⱼ / weights_sum)
— a share allocated to j-th
curator of the total fee of all curators. vote_event
structure..sumcuratorsw
, but it does affect the value of curatorsw
of a separate vote. The residual amount in the form of «surrender» will be returned back to the rewards pool for posts. This residual amount unclaimed_rewards
is calculated by the formulacuration_payout
— total amount of fee to curators for the post, calculated by the formula (2). ∑(curator_rewardⱼ)
— total fee amount of all curators, calculated by the formula (3). j-th
beneficiary, it is recommended to apply the formulaben_rewardâ±¼
— amount of reward to j-th
beneficiary.payout
— total amount of reward for the post, calculated by the formula (1). curation_payout
— total amount of fee to curators for the post, calculated by the formula (2). (payout - curation_payout)
— total amount of rewards allocated to beneficiaries and author. weightⱼ
— a weight of reward allocated to j-th
beneficiary. This percentage value is set by the author at the time of posting. beneficiaries
of the table message
. There is an array containing names and percentage deductions.ben_payout_sum
allocated to beneficiaries is calculated by the formulaauthor_reward
— amount of reward to author of the post.payout
— total amount of reward for the post, calculated by the formula (1). curation_payout
— total amount of fee to curators for the post, calculated by the formula (2). ben_payout_sum
— total amount of payments to beneficiaries, calculated by the formula (6). token_payout
in real time mode, it is recommended to use the formulapayout
— total amount of reward for the post, calculated by the formula (1). tokenprop = post::tokenprop
— percentage of tokens in rewards. vesting_payout
reward is