You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in orderbook, we see an residual order with amount 0.0000.
i suspect this is a decimal control issue.
because we tested only with integer amount, there is no way for orderbook to have
such small residual order.
The text was updated successfully, but these errors were encountered:
Could you please provide some more info on your simulation? I'd like to reproduce this using our automated test suite so that we can definitively prevent this in the future. Specifically, can you provide information on what orders you entered into the book to make this occur?
Sorry we dont have enough time to inform you exact reproduction process because it was random and deleted.
I will drop some possible case here.
Order matching happens with three bids with 1 token and 1 ask with 1 token.
Each bid will remain 2/3 amount but not exactly 2/3 because of decimal roundup
Comes new ask with 2 tokens, result in each bid remains very epsilon amount
Another ask comes with 1 tokens, but remaining amount for each bid is too small that it becomes zero after decimal rounding. Then the stated lines will throw error division by zero.
@alessio
below line throws error(division by zero) while our simulation
dex-demo/pkg/matcheng/matcher.go
Line 238 in 7d412f8
in orderbook, we see an residual order with amount 0.0000.
i suspect this is a decimal control issue.
because we tested only with integer amount, there is no way for orderbook to have
such small residual order.
The text was updated successfully, but these errors were encountered: