[busy] Beneficiary amount is now included in the total payout! (HF21 ready code)

in #utopian-io5 years ago (edited)

Repository

https://github.com/busyorg/busy
Project Name: busy

This is for 1 new feature and 1 bug fix.

Note: This will be probably my last Utopian post and among my dev work, I like this one quite a lot. (but not sure this will be voted due to timing. that's fine. I'll be on a diet then). Thus, I like to say something first. While I can't say I've used Utopian for long, it was a really good program among the almost impossible PoB world. I believe most contributors and moderators have been used Utopian not for monetary reward, since it can't still cover most people's opportunity cost. But it played an important role that at least utopian posts can get a comparable voting to random posts with bidbot votings. Hope similar programs will run again in the future. I'll not leave Steemit, even though I'll post much less than before, it was already planned regardless of the end of Utopian. But I'll still work on some cool stuffs and make posts from time to time. Thanks.

  • Busy now includes beneficiary payout in the total past payout.
  • Detailed payout also includes beneficiary payout.
  • @finex is a service like likwid but with lower fee.

New Feature: Beneficiary payout is now included in the total past payout / detailed payout also includes beneficiary payout

PR: https://github.com/busyorg/busy/pull/2222
PR: https://github.com/busyorg/busy/pull/2223

Previously, there was no beneficiary payout amount information for paid out posts.

That is, total payout amount = reduced (due to beneficiary) author payout + curator payout.

Steemit (and most UIs) stills show this way. (Busy is the first UI that shows this valuable information :)

Excluding beneficiary payout in the total past payout has several problems, especially when the percentage of beneficiaries is high.

  • Discontinuous payout amount just before payout and after payout.
  • Bad UX due to discontinuity. With 100% beneficiaries this difference can be highly significant.
  • Inconsistency (when pending, total is really total, why without beneficiaries after payout?)
  • Bad UX due to inconsistency.

Why this happened? It's because the concept of beneficiaries didn't exist in the early Steem.

So, In the Steem blockchain, currently, payout related fields are

  • total_payout_value : author payout (really terrible name, which leads to a bug like https://github.com/steemit/condenser/issues/3450. Everybody may think this is author + curator payout, but this is author only, too late to change though.)
  • curator_payout_value : curator payout

And there is no beneficiary payout information. Getting this information with post permlink can be highly inefficient.

Anyway, UI should show the real total payout value first and the details are shown with mouseover or click.

How did I resolve this? I estimated it from the curator reward. For details, see the code. Since payout info is shown in SBD, it's already estimate to users in some sense. So I didn't use "Est" on the UI for simplicity.

Part of Code

I'll mainly show the code for the estimation.

Basically, it utilizes author:curator=75:25 ratio. Of course, curator payout actually depends on the voting time, but beneficiary payout amount is estimate anyway.

  • beneficiariesPayouts estimation
    • curatorPayouts multiplied by author:curator ratio (e.g., (100-25)/25=3 before HF21)
    • and then multiplied by total beneficiaries ratio (e.g., if 50%, half of the above amount is beneficiariesPayouts and the other half is authorPayouts)

You may wonder what happens after HF21 since author:curator will be 50:50.

I even made the code for the HF21 too!

  • Steemit announce the HF21 schedule a few hours ago that I worked on this. So I use that info to decide whether post is created before or after HF21, assuming that HF21 will not be delayed :) Hope I don't need to make another PR for this.
Before

Previously, payout info was very inconsistent. While it shows the real total pending (author+curator+beneficiaries), but after payout, it only shows (author+curator). That means, if % of beneficiaries is high, there is a sudden drop after payout on the UI.

After

  • now beneficiaries payout amount is shown and included in the total payout.
Before

  • In particular, this difference can be quite significant when beneficiary percentage is high, e.g., 100%
After

Bug Fix - Total payout was shown as 0 with 100% beneficiaries

PR: https://github.com/busyorg/busy/pull/2219

Even without the above new feature, at least curator payout amount should have been shown for posts with 100% beneficiary. However, there was a bug that it showed as zero, and is now fixed.

https://busy.org/@blockchainstudio/finex-steem-power-liquify
Previously, Busy showed zero curator payout with 100% beneficiary setting.

Steemit shows curator payout

Steempeak shows curator payout

This bug has been fixed, and now even improved by the new feature.

I'll try to submit PR for steemit once steemit is merging community PRs again. Two of mine are still pending. I think Steemit is busy for HF21.

GitHub Account

https://github.com/economicstudio

Sort:  

Korean: 마지막 유토피안 포스팅이 될 듯하고 개인적으로 마음에드는 작업으로 오랜만에 한글판도 Busy payout 금액에 beneficiary 보상 반영하게끔 수정했습니다! finex 사용시에도 전체금액 보여줍니다. 에 작성해두었습니다. steempeak에도 의견 전달했으니 아마도 조만간 구현하지 않을까 싶습니다.

I wish soon busy will add beneficiary set option

Great project

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64275.05
ETH 3147.49
USDT 1.00
SBD 4.29