ExchangeUnion / xud-docker

Streamlined setup of xud and all dependencies via docker 🐳
https://docs.exchangeunion.com
GNU Affero General Public License v3.0
5 stars 5 forks source link

feat(arby): upgrade mainnet to v1.1.8 #687

Closed ghost closed 4 years ago

ghost commented 4 years ago

This PR upgrades arby to v1.1.6 which should mitigate the issue with orders updating too quickly for the decentralized orderbook. Orders are now updated only if a greater than 0.1% price movement happens.

Please test arby:latest on simnet/testnet before merging this.

raladev commented 4 years ago

Solutions:

  1. add order recreation after successful trade;
  2. add time throttling in addition to price throttling (preferable, because it will make orderbook more active).

Screenshot from 2020-08-26 12-56-02 Screenshot from 2020-08-26 12-56-09

Result: price throttling works well, but first two bugs should be fixed before merging to master

kilrau commented 4 years ago

Solutions:

  1. add order recreation after successful trade;
  2. add time throttling in addition to price throttling (preferable, because it will make orderbook more active).

I believe #1 is the correct thing to do. There is no need for the orderbook to "look active" as in "constantly changing prices". The liquidity just needs to be there and more importantly swaps need to work reliably.

kilrau commented 4 years ago

What's your take? @erkarl

raladev commented 4 years ago

not sure but with several orders in row it may lead to several noOrderErr's.

ghost commented 4 years ago

@raladev ready for testing again.

raladev commented 4 years ago

Screenshot from 2020-08-27 21-16-09

tool_output.log arby_unrec.log

ghost commented 4 years ago
* [ ]  order replacing after swap works for buy orders but not for sell orders
  [Screenshot from 2020-08-27 21-05-18](https://user-images.githubusercontent.com/29906866/91481993-fd026400-e8ad-11ea-9db4-ce32c73f25df.png)
  [Screenshot from 2020-08-27 21-03-19](https://user-images.githubusercontent.com/29906866/91482001-fecc2780-e8ad-11ea-9d44-9821f2aa6245.png)

* [ ]  there is a problem with network blinking. If i get small network issue and my channel became inactive, my Base and Quote assets will be aqual 0 when Create order action will be reached after price feed recovery, as a result i will not get orders and will need to wait channel activation (~2-5 mins for me on simnet) and price changing (i waited 15 mins).

Screenshot from 2020-08-27 21-16-09

* [ ]  Unrecoverable error may be reached during continuous matching. i get 9 successful swaps of 15 (6 of them were not matched because orderbook was empty because of unrecoverable error). Root case is get part of order in hold when replace order. I reached 5 arby errors for 9 swaps (see arby log). tool_output is a just output of placeOrders calls from taker.

tool_output.log arby_unrec.log

The first 2 issues should now be addressed.

Created a follow-up issue for the 3rd one: https://github.com/ExchangeUnion/market-maker-tools/issues/84

  • should we replace order before or after CEX order filling? @kilrau @erkarl

Doesn't matter. It happens in parallel.