Author Topic: Wrong short amounts displayed in the GUI  (Read 1900 times)

0 Members and 1 Guest are viewing this topic.

zerosum

  • Guest
I'll have a look. It's strange that the price limit isn't being respected though. @tonyk2 so you're saying the collateral autofill is incorrect?

Edit: From looking at the code it seems the collateral is being calculated using the feed price even if you've set a price limit, I suppose that needs to take into account the price limit..

I suspect the GUI auto-fill was left as it was in v 0.8.0 of the client. They changed the rules in 0.9.0 so the result.
SVK, as for changing it to reflect the new rule, it is up to you - I honestly prefer the rule to be changed to what it was before, because:

if  A = shorting price - feed ; all prices in BTS/bitAsset;

Before if you short above the feed the over-collateralization was A
Total collateral = 2*feed+(feed+A) = 300%*feed price +A

With the new rule the over-collateralization is 3*A
Total collateral = 2*(feed+A)+(feed+A) = 300%*feed price +3A


Offline Troglodactyl

  • Hero Member
  • *****
  • Posts: 960
    • View Profile
See also https://github.com/BitShares/bitshares/issues/1541

Thanks, I was just about to link that.

The weird part to me is that collateral is determined at time of order placement based on the price feed, but the quantity of BitAsset is determined at time of execution based on sale price.  It seems to me that choosing to overcollateralize your short should be a separate issue from setting a premium on its price.  Minimum collateral should be feed * margin call ratio, and starting collateral should be 2 * feed + sale price, instead of 3x sale price as it is now.

This may not be worth dealing with depending on the plans for replacing BitAssets.

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline svk

I'll have a look. It's strange that the price limit isn't being respected though. @tonyk2 so you're saying the collateral autofill is incorrect?

Edit: From looking at the code it seems the collateral is being calculated using the feed price even if you've set a price limit, I suppose that needs to take into account the price limit..
« Last Edit: May 13, 2015, 07:41:28 am by svk »
Worker: dev.bitsharesblocks

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
paging @svk who should be able to fix this issue in the GUI

Offline inarizushi

  • Sr. Member
  • ****
  • Posts: 316
    • View Profile
if you want to short

A= amount of  bitAsset you wanna sell:

C = sell price * A * 2

and put the result (C) in the collateral field.

 [disregard what the GUI is saying about the amount you are selling]

This way you will sell exactly the amount of bitAsset you wanna sell.

hope this helps.



and btw, I do not find this very logical either! I however expressed my opinion in the 0.9.0 feedback thread, instead of opening a bombastic new thread like "Wrong Short Amount".

- This helps. And it actually is very logical, I do see now the problem that is solved by that, but the auto-completion should have been consistent with it.
- Anyway, if the collateral amount and the shorted amounts are right, what is displayed in the GUI is wrong : that's an issue to fix because it will confuse people
- Reacting in the 0.9.0 feedback was obviously the right thing to do, sorry for that.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

zerosum

  • Guest
if you want to short

A= amount of  bitAsset you wanna sell:

C = sell price * A * 2

and put the result (C) in the collateral field.

 [disregard what the GUI is saying about the amount you are selling]

This way you will sell exactly the amount of bitAsset you wanna sell.

hope this helps.



and btw, I do not find this very logical either! I however expressed my opinion in the 0.9.0 feedback thread, instead of opening a bombastic new thread like "Wrong Short Amount".
« Last Edit: May 12, 2015, 10:19:34 pm by tonyk2 »

Offline inarizushi

  • Sr. Member
  • ****
  • Posts: 316
    • View Profile
Okay, if it's a design decision and not a bug that's good news to me, but could you please enlighten me ? Since the price is over the price feed, there is more collateral than required, so that's not the problem, and I don't get what is.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

zerosum

  • Guest

well it makes sense..in a way.

Not intuitive but correct.  not a bug - a design decision.

Offline inarizushi

  • Sr. Member
  • ****
  • Posts: 316
    • View Profile
Something is wrong with shorts.
I'm shorting well over price feed to buy orders. I've placed an order to short 0.07 bitBTC, and I end up shorting 0.059 (transaction id : #37336fec).





I had the same issue with a bitSILVER short and with a bitUSD short.

However, when I short a bitUSD to cover orders at the price feed, the amount is good.

It doesn't really make sense, I hope this is not a serious bug.
« Last Edit: May 13, 2015, 07:07:50 am by inarizushi »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads