Closed raladev closed 4 years ago
Related (but different): https://github.com/ExchangeUnion/xud/issues/1991
@sangaman the problem in simple words seems to be: when replacing an order we currently do not remove reserved order amounts of the old order from tradinglimits
, which is when the channel capacity is not large enough to cover the second new order, replacing fails.
Fix should be as simple as removing reserved quantity from tradinglimits
as intermediate step in the replace
process.
Case:
Example:
placeorder sell 0.95 ETH/BTC 0.1 my-id
-> order placedplaceorder sell 0.948 ETH/BTC 0.1 -r my-id
-> err because of max sell and max buyExpected behavior: On step 4 (on trading limits check) we should increase maxsell/maxbuy values by 0.95 ETH/ 0.095 BTC (amount that were used in old order).