ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

no placeorder collateralization for replaced order #2029

Open raladev opened 3 years ago

raladev commented 3 years ago

Steps to reproduce

  1. place buy 5 ETH/BTC 0.011 1 order -> placeorder collateralization is triggered, u need to wait, and place order after that
  2. place buy 5 ETH/BTC 0.011 1 order again -> order placed successfully
  3. repleace this order by buy 10 ETH/BTC 0.011 -r 1

Actual behaviour

order is replaced successfully

Expected behaviour

collateralization for 10 eth is triggered and only on second attempt replacement should be successful

Note

scheduled collateralization works fine, this amount will be collateralized after some time (but it does not work for case when replaced order will be immediately)

kilrau commented 3 years ago

Correction:

collateralization for 5 eth (totalling to 10 eth collateral) is triggered and only on second attempt replacement should be successful

Want to give this a shot? @rsercano

raladev commented 3 years ago

collateralization for 5 eth (totalling to 10 eth collateral) is triggered and only on second attempt replacement should be successful

if i remember correctly u cant ask to collateralize additional amount, you need ask for a total amount.

5 eth order -> coll request for 5 eth -> add 5 qty to the order -> coll request for 10 eth

rsercano commented 3 years ago

Correction:

collateralization for 5 eth (totalling to 10 eth collateral) is triggered and only on second attempt replacement should be successful

Want to give this a shot? @rsercano

Sure thing :)

kilrau commented 3 years ago

5 eth order -> coll request for 5 eth -> add 5 qty to the order -> coll request for 10 eth

How is that with vector? @erkarl

Let's only work with vector from now on.

kilrau commented 3 years ago

Ping @erkarl

ghost commented 3 years ago

5 eth order -> coll request for 5 eth -> add 5 qty to the order -> coll request for 10 eth

That's the way it should be.