Adding Downvote Mana Bar in Account and Witness Information Pages

in busy •  15 days ago 

Since HF21, the downvote bar comes for free with 25% of the voting bar.

Each user now has a mana pool specifically for down votes. This pool is 25% of the upvote mana pool. Downvotes will consume this mana first before consuming regular mana. When voting, 1/50th of the remaining mana is used for a 100% vote. The same math is used for downvote mana but multiplied by 4 because the downvote mana pool is 25% the size of the normal mana pool. The maximum of these values is used. When both mana pools are at 100%, the values are the same. When downvote mana runs out normal mana is used in the same manner as the current behavior.

I have added the downvote-bar to the following two pages:

  1. Witness Information:
  2. Account Information:


With steem-js, you can get the down-vote mana value with getAccounts API:


And also, you need the following two values: voting power and the voting mana


So, we need to calculate the total upvote mana bar, multiply by 25% then we get the total downvote bar.

var current_mana = response[0].voting_manabar.current_mana;
var downvote_mana = response[0].downvote_manabar.current_mana;
var downvote_last_update_time = response[0].downvote_manabar.last_update_time;
var downvote_per = downvote_mana / (current_mana / (response[0].voting_power / 100) / 4);          
var secondsago = (new Date - new Date(downvote_last_update_time * 1000)) / 1000;
var pow = downvote_per * 100 + (10000 * secondsago / 432000);
pow = Math.min(pow / 100, 100).toFixed(2);

Vote for me or Set me as a witness Proxy - Every vote counts! - Thank you!

Your Vote is much appreciated, and every vote counts.

Check out My Witness Page

My Witness Campagin

Support me and my work: my witness campagin:

  1. One Year Witnessversary - A Great Start!
  2. voting me here, or
  3. voting me as a proxy

Some of my contributions:

  1. SteemIt Tools, Bots, APIs and Tutorial
  2. VPS Database
  3. Video Downloader
  4. Cryptocurrency Discord Bot
  5. SteemIt Discord Bot

Join cnsteem Discord channel:

Vote for My Witness type in justyy and click VOTE

Or Vote @justyy via Steemconnect Thank you!

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!
Sort Order:  

This post has been resteemed by @witnessnews.

Follow @witnessnews to keep up with active witness updates.

  • 태그 작성 가이드라인 준수는 콘텐츠 관리와 글에 대한 접근성을 높이기 위해 반드시 필요한 절차입니다. ( It is an essential step to adhere tags guideline, manage content and make access better to your postings.)

  • 스팀코인판에서 활용 가능한 태그는 크게 [보상태그 / 언어태그/ 주제태그]로 구분할 수 있습니다. 보상태그와 언어태그는 필수입니다.(Tags that can be largely grouped into [Main Community / Language / Topic] in community. The language and topic tags are required.)

(예) 한국어로 작성한 자유 주제 포스팅((E.g) Posting for free topic in English)


  • 태그 작성 가이드라인을 준수하는 것이 태그 사용을 규제하는 정책보다 스팀코인판의 가치를 높이는 길이라고 생각합니다.(We believe that adhering tags guideline is a way to increase the value of SteemCoinpan community than that of forcing tags limitations.)


Hi @justyy!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 7.055 which ranks you at #84 across all Steem accounts.
Your rank has improved 3 places in the last three days (old rank 87).

In our last Algorithmic Curation Round, consisting of 130 contributions, your post is ranked at #24.

Evaluation of your UA score:
  • Your follower network is great!
  • The readers like your work!
  • Try to improve on your user engagement! The more interesting interaction in the comments of your post, the better!

Feel free to join our @steem-ua Discord server