RE: New Blurt Frontend https://blurt.buzz

You are viewing a single comment's thread from:

New Blurt Frontend https://blurt.buzz

in blurtopian •  4 years ago 

image.png

Hi @ericet I see you added the voting value feature.how did you really calculated that?
I am able to get recent_claims,reward_balance and myvests
but can not figure it out whats the term for getting the voting value.
Can you elaborate please?

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 BLURT!
Sort Order:  
  ·  4 years ago  ·  

That's what i used to calculate the vote value.
P.S: it's just estimate

export const calculateVoteValue = (
  vests,
  recentClaims,
  rewardBalance,
  vp = 10000,
  weight = 10000,
) => {
  const vestingShares = parseInt(vests * 1e6, 10);
  const power = vp * weight / 10000 / 50;
  const rshares = power * vestingShares / 10000;
  return rshares / recentClaims * rewardBalance/2;
};