Polkadex-Substrate / Polkadex-Open-Beta

12 stars 3 forks source link

Sell Order Book and My Open Sell Order getting wiped off during errored Market Buy Orders #338

Open DayalKS2 opened 2 years ago

DayalKS2 commented 2 years ago

While making a Market Order for Buy, the order is failing, but entire Buy Order book gets cleaned up/wiped off. The order book had my open Sell Orders which was reflecting in my 'Open Orders'. But when I placed a Market Sell which got errored out, the entire Sell Order Book got wiped off. I tried for a Market Buy for 820 FAU and I could see that even though transaction was an error, only .07 FAU got deducted from me (raised as a separate bug). So my FAU Balance didn't get majorily hit, but still the entire PDEX Sell order book got wiped off. Even in my 'Open Orders' I don't see my 3 Sell Orders, neither these are showing up in Order History or Trade History. So where are my Sell Orders which was in the Sell Order Book gone???

In recording I have repeated the issue twice. To get complete steps, watch from 2:05 mins.

onchainaddress:{esp5dCFuAuPi6KD3HzhHWQGjgwiNvyWLp6qJW5EGgo7zkhRBJ} https://user-images.githubusercontent.com/94037805/193414473-2bf41f51-29bb-41c8-b90a-b7ecfcf118e7.mp4

nuel77 commented 2 years ago

The Market buy order is successfull, you are getting a wrong message which tells its unsuccessfull (known bug). The market buy order you place is so large, that all the open sells are getting consumed by that. This is as expected. The sell orders are not showing up on your order history because of a bug with the calander.
try clicking on the calendar ui beside the orders table and set it to "this week"

DayalKS2 commented 2 years ago

If that is the case and if all the open Sell Orders are getting consumed by my Large Buy order, then a corresponding amount worth FAU should be deducted from my wallet right? If you look at the example, the amount of FAU for all Buy orders (Cum FAU) was around 68 when I placed the bulk Buy. But not even 1 FAU got deducted from my Wallet Balance.

nuel77 commented 2 years ago

did your balance not change even after refreshing the browser ?

nuel77 commented 2 years ago

you placed all the open sell orders right. And then you matched it with your own market order. so your balance should not change.