-
Notifications
You must be signed in to change notification settings - Fork 649
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
Margin call order fills at price of matching limit_order but not at a price related to itself or settlement_price #338
Comments
I don't think the described behaviour is a bug. Did you ever receive less payment than you requested? |
We discussed the issue today in the telegram chat, we are getting aligned on a possible blockchain patch. the issue will be discussed formally in this thread: https://bitsharestalk.org/index.php/topic,24715.0.html by now i will be after trying to replicate the problem in the testnet and/or make a unit test for the problem. in the meantime we will be discussing consensus on hot to best fix it. @alexpmorris thank you very much for bringing this issue here. |
Among these lines in https://github.com/bitshares/bitshares-core/blob/2.0.170710/libraries/chain/db_market.cpp#L503-L507 (quoted below),
//Update: not this simple. |
By the way, there seems to be something wrong with the code.
should be defined inside the loop, because Another minor issue, this line
should be changed to something like this for better performance
|
Nice find. |
@oxarbitrage GOLD has been global settled. Try SILVER. |
Another issue indicated in the post is related to rounding, which is actually a very old & known issue. For example: The order was selling 0.185 BTS, but apparently it's not enough to get 21 satoshi of HERO, so finally it got 20. However, to get 20 satoshi of HERO, only need to pay 0.1838 BTS. #132 and #184 are probably related. Or perhaps best to open a new ticket. //Edit: |
By the way, there is another feature about call orders which I think is debatable: for example, in |
As I posted in forum, The fix I proposed above is not ideal:
|
Moving discussion of rounding issue to #342. |
Created a new ticket (#453) for the multiple order matching issue described in this ticket. |
For: * #338 Margin call order fills at price of matching limit_order * #343 Inconsistent sorting of call orders between matching against a limit order and a force settle order * #453 Multiple limit order and call order matching issue * #606 Undercollateralized short positions should be called regardless of asks
For: * #338 Margin call order fills at price of matching limit_order * #343 Inconsistent sorting of call orders between matching against a limit order and a force settle order * #453 Multiple limit order and call order matching issue * #606 Undercollateralized short positions should be called regardless of asks
Done with #829. |
just wanted to share this issue I came across. I outlined it here, with a possible solution (or at least, a better understanding of what the problem is likely to be)...
https://steemit.com/bitshares/@alexpmorris/beware-crossing-the-offer-with-your-bid-on-the-bitshares-dex-or-it-might-cost-you-a-bundle
The text was updated successfully, but these errors were encountered: