RE: steem-python for dummies #8 - Calculating post rewards

You are viewing a single comment's thread from:

steem-python for dummies #8 - Calculating post rewards

in utopian-io •  7 years ago 

Hi
I'm porting "Post Reward" algorithm to android. I'm using SteemJ.
My problem is that the results were 1 000 000 times bigger than showing by Steemit page.

val steemJ = SteemJ()
val blog = steemJ.getBlog(AccountName("..."), 0, 10.toShort() )
val rewardFund = steemJ.getRewardFund(RewardFundType.POST)
val rewardBalance = rewardFund.rewardBalance.amount;
val recentClaims = rewardFund.recentClaims;
val base = steemJ.currentMedianHistoryPrice.base.amount
val foundPerShare = rewardBalance.toFloat() / recentClaims.toFloat()
for (i in blog) {
    val payout = i.comment.voteRshares * foundPerShare * base

}
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!