Closed kilrau closed 4 years ago
https://github.com/opendexnetwork/opendex/issues/22 has a decent solution for this issue. Here is the proposed order format in protocol buffer format:
string signature;
string pubkey;
uint32 timestamp_secs;
string request_asset_id;
uint64 request_amount;
string offer_asset_id;
uint64 offer_amount;
optional string replace_order_id;
But changing to an entirely new order format might be a major change and so perhaps this is the intermediary step
Bumping prio here since today I noticed arby replacing orders every 100ms or so due to fast price movements on binance, resulted frequently in the following:
simnet > sell 1 eth/btc mkt
matched 1 ETH @ 0.02883907 with peer DoveSlim order 9e894580-d032-11ea-94f8-19f64578a848, attempting swap...
failed to swap 1 ETH due to OrderNotFound with peer order 9e894580-d032-11ea-94f8-19f64578a848, continuing with matching routine...
matched 1 ETH @ 0.02884004 with peer DoveSlim order 9ef6d462-d032-11ea-94f8-19f64578a848, attempting swap...
failed to swap 1 ETH due to OrderNotFound with peer order 9ef6d462-d032-11ea-94f8-19f64578a848, continuing with matching routine...
matched 1 ETH @ 0.02885168 with peer DoveSlim order 9f39d0d0-d032-11ea-94f8-19f64578a848, attempting swap...
successfully swapped 1 ETH with peer order 9f39d0d0-d032-11ea-94f8-19f64578a848
Because orders disappear for some ms when being cancelled and re-issued by arby.
Currently arby removes all orders and issues new ones, which causes two packets on the p2p layer and all receiving nodes first to remove and then to replace an order. We consider this becoming an issue once there are a 100s/1000s of orders being shared per second:
Instead arby should track order id's of it's issued orders and replace them with
replace_order_id
.