Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

erkarl
Copy link
Contributor

@erkarl erkarl commented Aug 25, 2020

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.

@erkarl erkarl requested review from kilrau and raladev August 25, 2020 12:39
@raladev
Copy link
Contributor

raladev commented Aug 25, 2020

  • no order recreation after price feed lost err - after the error i still need to wait required price change to get new orders, but old orders were removed because of price feed err.
    Screenshot from 2020-08-25 21-57-04

  • for now order updates are too rare and as a result arby does not update order qty after trade.

  1. Arby user sold btc (order qty 0.01 ->0.0004)
  2. Arby user bought btc (no change in order qty, but it should be bigger after buying)

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 kilrau added the P1 top priority label Aug 26, 2020
@kilrau kilrau added this to In progress in 1.0.0 via automation Aug 26, 2020
Copy link
Contributor

@raladev raladev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above

@kilrau
Copy link
Contributor

kilrau commented Aug 26, 2020

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
Copy link
Contributor

kilrau commented Aug 26, 2020

What's your take? @erkarl

@raladev
Copy link
Contributor

raladev commented Aug 26, 2020

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

@erkarl
Copy link
Contributor Author

erkarl commented Aug 27, 2020

@raladev ready for testing again.

@kilrau kilrau changed the title feat(arby): upgrade mainnet to v1.1.6 feat(arby): upgrade mainnet to v1.1.7 Aug 27, 2020
@kilrau kilrau dismissed raladev’s stale review August 27, 2020 18:25

Re-requested review

@raladev
Copy link
Contributor

raladev commented Aug 27, 2020

  • order replacing after swap works for buy orders but not for sell orders
    Screenshot from 2020-08-27 21-05-18
    Screenshot from 2020-08-27 21-03-19

  • 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

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

Copy link
Contributor

@raladev raladev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above

@erkarl erkarl force-pushed the feat/upgrade-mainnet-arby-v1.1.6 branch from 7dc877d to d4dbe7b Compare August 28, 2020 13:35
@erkarl erkarl changed the title feat(arby): upgrade mainnet to v1.1.7 feat(arby): upgrade mainnet to v1.1.8 Aug 28, 2020
@erkarl
Copy link
Contributor Author

erkarl commented Aug 28, 2020

* [ ]  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: ExchangeUnion/market-maker-bot#84

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

Doesn't matter. It happens in parallel.

@kilrau kilrau requested a review from raladev August 28, 2020 14:38
@raladev raladev merged commit 3ab65fa into master Aug 28, 2020
1.0.0 automation moved this from In progress to Done Aug 28, 2020
@raladev raladev deleted the feat/upgrade-mainnet-arby-v1.1.6 branch August 28, 2020 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 top priority
Projects
No open projects
1.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants