Comparing other Front Ends for Token Accuracy

Weird PIMP business.

PIMP starts off showing incredible future payouts only to disappear entirely at the time of payout. Are all of the rewards going to the voters? Is there a mistake in the front end? Let's see.

Other Front Ends as References

All of the Hive-Engine coins in the Proof of Brain.Blog front end are handled in the same way. The same code is used for POB, for LEO, for SPORTS, for SEX and for PIMP. They all use the same code. It is not a software engineering perspective to just copy what others are doing. One should look at the specs and engineer according to specs. So lets look at what the Hive-Engine API gives for various posts on Hive.

LEO FINANCE

On this site we see a post valued at NaN. https://leofinance.io/@leofinance/a-complete-overhaul-to-curation-on-leofinance-be-active-and-earn-big-upvotes-32m-hp This demonstrates an error in coding. It may mean that the APIs it uses have changed.


$ cat ./src/common/constants/engine.json 
{
  "chartApi": "https://info-api.tribaldex.com/market/ohlcv",
  "engineRpcUrl": "https://api.hive-engine.com/rpc/contracts",
  "engineRewardsUrl": "https://scot-api.hive-engine.com"
}

So then we use curl with the URL and with the hive option:

curl "https://scot-api.hive-engine.com/@leofinance/a-complete-overhaul-to-curation-on-leofinance-be-active-and-earn-big-upvotes-32m-hp?hive=1"

You can use the node program or your browser console to access the data returned by these curl commands.

The rewards are either the pending_token field or the total_payout_value field. Among the out put we get "total_payout_value":63597 and "precision":3. That means the amount to pay out is 63.597 LEO because it is 63597*10^-3^.

Bugs happen. Let us consider a thread here: https://leofinance.io/threads/view/rmsadkri/re-leothreads-9qsg5aq3

The equivalent URL on POB-blog is https://www.proofofbrain.blog/hive-167922/@rmsadkri/re-leothreads-9qsg5aq3. This 6.005 LEO and on CURL you will get 6005 with a precision of 3.

Proof of Brain.IO

That is what will be displayed for the rewards on the given post at the POB-blog front end: https://www.proofofbrain.io/@enginewitty/my-little-cupcake

We see the rewards at the dot-blog site: 9.659 POB.
The rewards at the IO site reads: 9.081 POB. So there seems to be a diversion here. Refreshing both sites, gives a common same value of 9.651 POB.

Using the CURL interface to the Hive-Engine rewards API gives us:
"pending_token":965262696,"precision":8

Calculating that in the same way gives us 9.6526 POB. Almost the same. Refresh again? Okay, now we have agreement. Although the values are rounded off to three decimal places.

PIMP.Media

I am looking at the rewards of this post:
https://www.proofofbrain.blog/hive-150329/@leprechaun/earned-tokens-to-be-displayed

Now if we query the API directly with CURL as we did in the other examples we get: A total payout value of 61 and a precision of 8. So indeed this post should be displayed as only earning 0 PIMP. Yet on the pimp.media it is displayed as earning 0.0061 when it should be 0.000,000,61 because the precision is 8 and not 4.

It is ignored on Proof of Brian.blog completely right now. I cannot think of why now. We see disagreement with both APIs which look at rewards of PIMP but if you look at the wallet in pimp.media, the account gets 0.004 PIMP (the author portion) but then it reads as zero for the balance. Hmm....

Looking at this recent post I made with the PIMP tag, it says I am about to earn 0.01 PIMP but the ProofofBrain.blog site says about 58,013 PIMP. Hmm... What about CURL?

 curl "https://scot-api.hive-engine.com/@leprechaun/from-usd400-to-usd2-50?hive=1" > earned.txt

The pending_token value for PIMP is 5801370687268. With a precision of 8 this is 58,013.7 PIMP. If I disbelieve 8 and I think it is 4, in order to make the other values make sense this value would be greater instead of smaller. I would end up with 580 million PIMP.

Conclusion

The ProofofBrain.blog code displays values for PIMP that are indicated by the Hive-Engine Rewards API. However, the PIMP.media front end doesn't agree with the Hive Engine Rewards API in that it exaggerates the rewards when they finally come by a factor of 10,000. Also, the rewards on the other post were drastically reduced before payout. I wonder...

@leprechaun ☘️☘️☘️


Posted with proof of brain

0.04678429 BEE
1 comments
(edited)

There are often going to be odd "bugs" in a system, particularly when it is created by people all over the planet. I used to work with "globalization" in the IT field 20-25 years ago, and even though everyone is technically speaking beholden to ISO numerical/textual conventions, invariably someone's native conventions sneak into the mix.

For example, ten million (correct to 8 decimals, so we have 8 digits on both sides of the decimal) is written:

10.000.000,000000000 in Sweden.
10,000,000.000000000 in USA.
10,000,000.000,000,00 in some parts of Asia and South America
1,00,00,000.000000000 in India and other parts of central Asia

All it takes is one coder somewhere to mistakenly lapse into their "native" system rather than ISO Standard, and you have an undesirable result. Most likely, you will not get an actual ERROR because the digits are valid, just not where you want them.

And very likely, it's not YOU, since you are basically leveraging someone else's code. Could be at Ecency, or Hive-Engine, or in the original PIMP setup.

P.S.: I'm NOT a coder! I just use "pattern recognition" a lot.

Edited to add: To make things tricker, also remember that some communities have a "tax" on payouts to posts created somewhere that is NOT their own front end. Not saying that applies here, but it often accounts for 10-50% differences posted on different sites.

=^..^=

Posted using Tribaldex Blog

0E-8 BEE

I always took the lack of separators in USA formatted numbers as first an optimization by the original implementer in early days of computing that were formatting for money and then there after they took the implementation as the specification afterward. Older hand written texts did use commas in numbers after the decimal point. In South America they use commas for the decimal point and decimal points as separators. If that doesn't confuse you their language will. :D

0E-8 BEE