-
Notifications
You must be signed in to change notification settings - Fork 570
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
call price wrongly calculated for user shenxiaoyu521 #1075
Comments
Actually this is a core issue. That user's position was partially called, so showing a higher ratio, but the call price didn't change, so it will still be called at the original call price. bitshares/bitshares-core#343 |
OK, so once the core issue is fixed, it's your believe that the UI will work as it's supposed to? If this is the case, I will leave this open but not put it into a Sprint. |
Ah that makes perfect sense since the UI seemed to be functioning quite well. |
You might say that we should instead sort the call orders by collaterial ratio rather than call price for the margin positions tab in assets (I think they are sorted by call price presently)? |
Interesting thought. @abitmore what do you think about changing the sort to be the ratio? |
I tend to update the call price field (in the core) directly when it's partially called, so call price and ratio will always match each other. But I'm not sure if it's technically practicable so far, or how hard to implement it. Will figure it out in next weeks. |
I've made the change where it sorts by ratio, thoughts? |
@nbcks I'd recommend don't change the sorting here at this moment. Perhaps better just add a warning info or something, telling users why it's showing like this. |
If people can click the table header to sort by their own, would be useful. Anyway I don't think we need to change the default sorting. |
You can change both the direction and column to sort by. What we CAN change is the default sort. Anyway, sorting by call price should be the same as sorting by CR. Given this, shouldn't we default the sort to collateral ratio instead of call price @abitmore ? |
Different sorting has different purpose. If you've read the linked issue above, in the backend (right now), sorting by call_price is for margin calls, sorting by real collateral ratio is for force settlements. After the backend issue is fixed, both will return same result. I don't think it's wise to put efforts/time on changing default sorting right now, unless there are strong reasons showing that sorting by one field is much important than the other and need an emergency fix. |
I agree with @abitmore. We are trying to fix a problem that will go away with no effort. |
Okay, close the issue then? |
The user shenxiaoyu521 has a margin position in bitCNY where they have a debt of 1100 bitCNY and a collateral of 805.9 BTS. At the time of writing, their CR is 2.5 and the feed price is 0.29. This checks out since 805.9 / (0.29 * 1100) = 2.5. There call price should therefore be 805 / (MCR * 1100) = 0.4186. However, the call price displayed is 0.29486, which is incorrect. This is clearly incorrect since shenxiaoyu521 would be very close to getting margin called if their call price was so close to their feed price, yet they have a healthy collateral ratio of 2.51 (rather than a CR close to 1.75).
Steps to reproduce:
The text was updated successfully, but these errors were encountered: