Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect price calculation in estimateAccountValue #418

Closed
iamsmooth opened this issue Nov 22, 2018 · 6 comments
Closed

Incorrect price calculation in estimateAccountValue #418

iamsmooth opened this issue Nov 22, 2018 · 6 comments
Assignees
Labels
Bug SW - 3 Steemworks Points

Comments

@iamsmooth
Copy link

This line fails to divide by the quote part of the feed price ratio and therefore computes an incorrect price when the quote is not 1.000.

https://github.com/steemit/steem-js/blob/master/src/formatter.js#L103

This is the case currently as the consensus logic is adjusting the feed price to maintain the 10% SBD to STEEM market cap limit, resulting in a complex ratio: "median_sbd_price": { "base": "122615385.381 SBD", "quote": "283814541.914 STEEM" }. It could also occur if witnesses started reporting the price feed using a quote other than 1.000. For example, this could happen at very low STEEM prices, in order to enable more than three fractional digits.

This is now causing incorrect output in many UIs

There are probably similar bugs elsewhere in the library.

@LKNX
Copy link

LKNX commented Nov 22, 2018

It could also occur if witnesses started reporting the price feed using a quote other than 1.000. For example, this could happen at very low STEEM prices, in order to enable more than three fractional digits.

We should add 8 digits like Bitcoin, Monero and everything else

@digital-mine
Copy link

there is an issue linked with the post reward as well!
All the posts even if the $ value is few cents, they return always 0 rewards

@ayogom
Copy link

ayogom commented Nov 22, 2018

게시물 보상과 관련된 문제가 있습니다!
$ 값이 몇 센트 인 경우에도 모든 게시물은 항상 0 개의 보상을 반환합니다.

Less than $ 0.2 is ignored.

@digital-mine
Copy link

I've written a post about what I noticed:
https://steemit.com/steem/@digital.mine/big-mess-with-post-reward-due-to-sbd-issue

plus another user got an issue with his SP, here the link:
https://steemit.com/steem/@jguzman394/what-is-happening-with-steemit

@digital-mine
Copy link

게시물 보상과 관련된 문제가 있습니다!
$ 값이 몇 센트 인 경우에도 모든 게시물은 항상 0 개의 보상을 반환합니다.

Less than $ 0.2 is ignored.

I just realized this is the korean translation of my post ;)

So less than $0.2 are ignored due to what? Is there a solution?

@ayogom
Copy link

ayogom commented Nov 23, 2018

게시물 보상과 관련된 문제가 있습니다!
$ 값이 몇 센트 인 경우에도 모든 게시물은 항상 0 개의 보상을 반환합니다.

Less than $ 0.2 is ignored.

I just realized this is the korean translation of my post ;)

So less than $0.2 are ignored due to what? Is there a solution?

Sorry, my mistake $0.2 -> $0.02
I don't know the intent ... but that's what STEEMINC intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug SW - 3 Steemworks Points
Projects
None yet
Development

No branches or pull requests

5 participants