jl777 / SuperNET

57 stars 222 forks source link

GTC orders don't match properly #954

Open lukechilds opened 6 years ago

lukechilds commented 6 years ago

If Alice places a GTC order that can be instantly matched with Bob it works fine. However, if Alice places a GTC order that can't instantly be matched, once there is an inverse Bob order available it has a lot of issues been matched.

Bob can see the Alice request messages and will respond with a reserved message but the trade doesn't seem to progress past that.

This happens repeatedly every time Alice re-issues the order.


Tracking this here following on from our conversations in #tradebots Discord:

just set up a Bob without any orders
place an order on an Alice in an empty order book
so you can see the order on your bob
THEN set the corresponding order on your Bob
Alice will see it
Bob will send reserve messages each time he sees a request
but it doesn't seem to match
although the other day I left it running for a very long time and seemed to eventually match
but it is definitely not working properly
because if the Bob order exists before you place the Alice order they match almost instantly

Logs from my Bob (MYTH/KMD swap):

>>>>>>>>>> DEX stats 127.0.0.1:7783 bind sock.16 DEX stats API enabled at unixtime.1534507996 <<<<<<<<<
start prices_loop
unexpected.0 tradestatus aliceid.7056878579986792449 requestid.3535348499 quoteid.1802278873
unexpected.1 tradestatus aliceid.10075308251591606273 requestid.2704605636 quoteid.3556726780
added 14 of 14 from KMD listunspents
New priority.1 max_Reserved_msgs.1
max rpc threads spawned and alive 0 <- 1
userpass.(REDACTED)
added 21 of 21 from ETOMIC listunspents
                LP_reserved_msgs elapsed    1005.17 millis > threshold    1000.00, ave       5.47 millis, count.5593 postprice
833  uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.0 0 n0
connected to push.(tcp://23.254.165.16:7793) pushsock.10 valid.1  | connected to sub.(tcp://23.254.165.16:7803) subsock.11 valid.1 numactive.2
954  uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.0 0 n0
SUB dup.0 (1555 / 2123) 73.2% encrypted.0 recv.12134710 [7b 22] vs 36 29
1001 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.0 0 n0
1135 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.0 0 n0
1256 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.0 0 n0
1437 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.0 0 n0
1558 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.0 0 n0
1648 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.0 0 n0
0 Using ref KMD/MYTH for KMD/MYTH factor 0.00000000, offset 0.00000000, margin 0.00000000/0.00000000 fixed 0.10000000
AUTOPRICE numautorefs.1
New priority.0 max_Reserved_msgs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1740 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.2 878 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1860 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.2 878 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
PRICEFEED UPDATE.(KMD   /  BOTS)   0.35002233 825d0e1355117f6b76e7b3741f51c1827e72e25ddc688c0b20ad5b1ec7b28b4f   2.85696058
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2041 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.2 878 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2163 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.2 878 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2249 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.2 878 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(dec32317496f2e66b3536623124cbf5e) mpnet.0 fill.0 gtc.1
5101734310064029697 >>>>>>> myprice 0.10000000 qprice 0.10498005 r.34 range 0.00498005 -> 0.10169322, bestprice 0.10169322 counter.-1
priceiter.0 voliter.0 price 0.10169322 vol 0.10510000
MYTH/KMD i.0 j.0 qprice 0.10498005 myprice 0.10000000 price 0.10169322 [0.10169223]
New priority.1 max_Reserved_msgs.2
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2338 uuid.38f9a53a1f8fa82ed85721983f08ad70 M.0 g.0 f.0      request   KMD/BTC    36.95533056 ->   0.00669346 ( 0.00018112) | RT.2 878 n0
2339 uuid.38f9a53a1f8fa82ed85721983f08ad70 M.0 g.0 f.0     reserved   KMD/BTC    37.00625011 ->   0.00669346 ( 0.00018087) | RT.2 878 n0
2341 uuid.38f9a53a1f8fa82ed85721983f08ad70 M.0 g.0 f.0      connect   KMD/BTC    37.00625011 ->   0.00669346 ( 0.00018087) | RT.2 878 n0
2341 uuid.38f9a53a1f8fa82ed85721983f08ad70 M.0 g.0 f.0    connected   KMD/BTC    37.00625011 ->   0.00669346 ( 0.00018087) | RT.2 878 n0
2343 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.2 878 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2465 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.2 879 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2646 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.2 879 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2766 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.2 879 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2850 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.2 879 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(dec32317496f2e66b3536623124cbf5e) mpnet.0 fill.0 gtc.1
5101734310064029697 >>>>>>> myprice 0.10000000 qprice 0.10498005 r.18 range 0.00498005 -> 0.10089641, bestprice 0.10089641 counter.-1
priceiter.0 voliter.0 price 0.10089641 vol 0.10510000
MYTH/KMD i.0 j.0 qprice 0.10498005 myprice 0.10000000 price 0.10089641 [0.10089544]
missing field.(maxprice) add to MM_fields[]
missing field.(gtc) add to MM_fields[]
2851 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0     reserved  MYTH/KMD     1.04168243 ->   0.10510000 ( 0.10089544) | RT.2 879 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2947 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.2 879 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3068 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.2 879 n0
AUTOPRICE numautorefs.1
PRICEFEED UPDATE.(KMD   /  BOTS)   4.00000000 c3831e345300438c8ceae46a30a83ad187a1e028f07136641033bb213e437843   0.25000000
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3249 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3370 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3452 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.1 880 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(dec32317496f2e66b3536623124cbf5e) mpnet.0 fill.0 gtc.1
5101734310064029697 >>>>>>> myprice 0.10000000 qprice 0.10498005 r.51 range 0.00498005 -> 0.10253983, bestprice 0.10253983 counter.-1
priceiter.0 voliter.0 price 0.10253983 vol 0.10510000
MYTH/KMD i.0 j.0 qprice 0.10498005 myprice 0.10000000 price 0.10253983 [0.10253883]
missing field.(maxprice) add to MM_fields[]
3452 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0     reserved  MYTH/KMD     1.02498759 ->   0.10510000 ( 0.10253883) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3591 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
112  uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
293  uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
414  uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
528  uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.1 880 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(dec32317496f2e66b3536623124cbf5e) mpnet.0 fill.0 gtc.1
5101734310064029697 >>>>>>> myprice 0.10000000 qprice 0.10498005 r.93 range 0.00498005 -> 0.10463145, bestprice 0.10463145 counter.-1
priceiter.0 voliter.0 price 0.10463145 vol 0.10510000
MYTH/KMD i.0 j.0 qprice 0.10498005 myprice 0.10000000 price 0.10463145 [0.10463041]
529  uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0     reserved  MYTH/KMD     1.00449810 ->   0.10510000 ( 0.10463041) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
595  uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
716  uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
897  uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1018 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1200 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
1227 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.1 880 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(dec32317496f2e66b3536623124cbf5e) mpnet.0 fill.0 gtc.1
5101734310064029697 >>>>>>> myprice 0.10000000 qprice 0.10498005 r.47 range 0.00498005 -> 0.10234062, bestprice 0.10234062 counter.-1
priceiter.0 voliter.0 price 0.10234062 vol 0.10510000
MYTH/KMD i.0 j.0 qprice 0.10498005 myprice 0.10000000 price 0.10234062 [0.10233963]
1227 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0     reserved  MYTH/KMD     1.02698265 ->   0.10510000 ( 0.10233963) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1321 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1502 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
PRICEFEED UPDATE.(KMD   /  BOTS)   4.00000000 c3831e345300438c8ceae46a30a83ad187a1e028f07136641033bb213e437843   0.25000000
AUTOPRICE numautorefs.1
1623 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1804 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
1828 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0      request  MYTH/KMD     1.00115257 ->   0.10510000 ( 0.10498005) | RT.1 880 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(dec32317496f2e66b3536623124cbf5e) mpnet.0 fill.0 gtc.1
5101734310064029697 >>>>>>> myprice 0.10000000 qprice 0.10498005 r.34 range 0.00498005 -> 0.10169322, bestprice 0.10169322 counter.-1
priceiter.0 voliter.0 price 0.10169322 vol 0.10510000
MYTH/KMD i.0 j.0 qprice 0.10498005 myprice 0.10000000 price 0.10169322 [0.10169223]
1829 uuid.dec32317496f2e66b3536623124cbf5e M.0 g.1 f.0     reserved  MYTH/KMD     1.03352058 ->   0.10510000 ( 0.10169223) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
1926 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
2108 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.1 880 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
SUB dup.1 (49340 / 65880) 74.9% encrypted.0 recv.1031744995 [7b 22] vs e3 2d
AUTOPRICE numautorefs.1
2229 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.1 880 n0
AUTOPRICE numautorefs.1
lukechilds commented 6 years ago

For what it's worth, I've tested this on both ERC20 and asset chains.

The issue seems much worse on ERC20 (MYTH token in above logs) but it does also occur on asset chains.

In the SUPERNET/KMD trade in these logs, Bob sees a request message from Alice, responds with reserved and then does nothing, however later it does match the next request message:

>>>>>>>>>> DEX stats 127.0.0.1:7783 bind sock.16 DEX stats API enabled at unixtime.1534517138 <<<<<<<<<
start prices_loop
unexpected.0 tradestatus aliceid.7056878579986792449 requestid.3535348499 quoteid.1802278873
unexpected.1 tradestatus aliceid.10075308251591606273 requestid.2704605636 quoteid.3556726780
etomic src mismatch (0x1985365e9f78359a9B6AD760e32412f4a445E862) vs (0xE94327D07Fc17907b4DB788E5aDf2ed424adDff6)
quoteparse_error.({"gui":"nogui","uuid":"580a15e76b3d3a7fa668c4b1438374471dfc11d4beb80c5a0bf186d89d7fcc56","maxprice":0.12012000,"aliceid":"4651731260276736001","tradeid":3922314330,"base":"REP","bobtomic":"0x1985365e9f78359a9B6AD760e32412f4a445E862","etomicsrc":"0x4e623b150b847da59f064f7c7fcc9f787dae2229","rel":"KMD","etomicdest":"0xdf38dd108bab50da564092ad0cd739c4634d963c","address":"0x4e623b150b847da59f064f7c7fcc9f787dae2229","timestamp":1531964679,"txid":"1c72de93ccf09136bc80a4404029ff742fe0a3b8d6a568358e4cc94ca52b2da9","vout":0,"srchash":"8adbf9d5de4fb49ec1fca9ca3f28ba384715752de1197c9cddbb756c3d2a1a7c","txfee":"1000","quotetime":1531964679,"satoshis":"73904776","desthash":"3d0efe5aaba2ea9cf093054d5cc88fcf15accb5ddf71ee626387553655806768","txid2":"e5ed78573f7bcb1da06e368f932fe94fcde2bd0605d562e19245ba5e968255e9","vout2":1,"destaddr":"RWv8PKHmwnXepCeinnZU43BPju6CN8rkcM","desttxid":"8e407899a8d973632d3def20399f01c386287325fc006b41c708b8365c2827e7","destvout":1,"feetxid":"606fee440827fe147b8a6a3f3b51961f06d53f641858e3f39cd42f266e0a7957","feevout":1,"desttxfee":"1000","destsatoshis":"8010000","price":0.10838418,"requestid":143077347,"quoteid":3735366827,"pubkey":"8adbf9d5de4fb49ec1fca9ca3f28ba384715752de1197c9cddbb756c3d2a1a7c","proof":[],"method2":"connect","method":"connect"})
etomic src mismatch (0x1985365e9f78359a9B6AD760e32412f4a445E862) vs (0xE94327D07Fc17907b4DB788E5aDf2ed424adDff6)
quoteparse_error.({"gui":"nogui","uuid":"580a15e76b3d3a7fa668c4b1438374471dfc11d4beb80c5a0bf186d89d7fcc56","maxprice":0.12012000,"aliceid":"4651731260276736001","tradeid":3922314330,"base":"REP","bobtomic":"0x1985365e9f78359a9B6AD760e32412f4a445E862","etomicsrc":"0x4e623b150b847da59f064f7c7fcc9f787dae2229","rel":"KMD","etomicdest":"0xdf38dd108bab50da564092ad0cd739c4634d963c","address":"0x4e623b150b847da59f064f7c7fcc9f787dae2229","timestamp":1531964679,"txid":"1c72de93ccf09136bc80a4404029ff742fe0a3b8d6a568358e4cc94ca52b2da9","vout":0,"srchash":"8adbf9d5de4fb49ec1fca9ca3f28ba384715752de1197c9cddbb756c3d2a1a7c","txfee":"1000","quotetime":1531964681,"satoshis":"73904776","desthash":"3d0efe5aaba2ea9cf093054d5cc88fcf15accb5ddf71ee626387553655806768","txid2":"e5ed78573f7bcb1da06e368f932fe94fcde2bd0605d562e19245ba5e968255e9","vout2":1,"destaddr":"RWv8PKHmwnXepCeinnZU43BPju6CN8rkcM","desttxid":"8e407899a8d973632d3def20399f01c386287325fc006b41c708b8365c2827e7","destvout":1,"feetxid":"606fee440827fe147b8a6a3f3b51961f06d53f641858e3f39cd42f266e0a7957","feevout":1,"desttxfee":"1000","destsatoshis":"8010000","price":0.10838418,"requestid":143077347,"quoteid":3118239859,"pair":"tcp://173.212.225.176:36667","proof":[],"method2":"connected","method":"connected"})
added 16 of 16 from KMD listunspents
New priority.1 max_Reserved_msgs.1
2752 uuid.de422ec16f3da7ee2eb927e4d6cde168 M.0 g.0 f.0      request   BCH/KMD     0.00866874 ->   3.99635419 (461.53992267) | RT.0 0 n0
2761 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.0 0 n0
max rpc threads spawned and alive 0 <- 1
userpass.(REDACTED)
>>>>>>>>. 1st refht KMD a70b2d29728fdc5cc137484df62551442cf6b3e4d39ef3838ee1a97d269b27e4 <- 969373, scan 0 0
>>>>>>>>. 1st refht SUPERNET 6ecefe83edfcbd7731f45f83ce65aa46fc91f8c8649a440d3dcda10c38ae7949 <- 348457, scan 0 0
Alice.KMD inactive.0 or Bob.SUPERNET inactive.1534517137
Alice.KMD inactive.0 or Bob.SUPERNET inactive.1534517137
added 7 of 7 from SUPERNET listunspents
2789 uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0      request SUPERNET/KMD     0.00242464 ->   0.10010000 (41.45545506) | RT.0 0 n0
connected to push.(tcp://23.254.165.16:7793) pushsock.10 valid.1  | connected to sub.(tcp://23.254.165.16:7803) subsock.11 valid.1 numactive.2
0 Using ref KMD/SUPERNET for KMD/SUPERNET factor 0.00000000, offset 0.00000000, margin 0.00000000/0.00000000 fixed 40.00000000
AUTOPRICE numautorefs.1
New priority.0 max_Reserved_msgs.1
2882 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3003 uuid.de73cda5cd32f4e1f61e0c41392ffae8 M.0 g.0 f.0      request   BCH/KMD     0.00867436 ->   4.00138286 (461.82093773) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3064 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(44bb9faee9ee144a0c323af80fcccccc) mpnet.0 fill.1 gtc.1
SUPERNET/KMD ignore as qprice 4.99996830 vs myprice 40.00000000
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3154 uuid.6f140548aba51a8632875984bd8c2f7c M.0 g.0 f.0      request   BTC/KMD     0.00111044 ->   4.03677444 (4433.87201793) | RT.3 881 n0
AUTOPRICE numautorefs.1
3184 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3307 uuid.3a82fac3682db7b62ac8b1c5495f11d3 M.0 g.0 f.0      request   BTC/KMD     0.00111075 ->   4.03809606 (4433.81395553) | RT.3 881 n0
3309 uuid.3a82fac3682db7b62ac8b1c5495f11d3 M.0 g.0 f.0     reserved   BTC/KMD     0.00191075 ->   4.03809606 (2360.42441035) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3365 uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(44bb9faee9ee144a0c323af80fcccccc) mpnet.0 fill.1 gtc.1
SUPERNET/KMD ignore as qprice 4.99996830 vs myprice 40.00000000
AUTOPRICE numautorefs.1
3416 uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0      request SUPERNET/KMD     0.00242464 ->   0.10010000 (41.45545506) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(afdb38a57665bfaa3e1f073c55ce4746) mpnet.0 fill.0 gtc.1
839890655842992129 >>>>>>> myprice 40.00000000 qprice 41.45545506 r.80 range 1.45545506 -> 41.16436405, bestprice 41.16436405 counter.-1
priceiter.0 voliter.0 price 41.16436405 vol 0.10010000
SUPERNET/KMD i.0 j.0 qprice 41.45545506 myprice 40.00000000 price 41.16436405 [40.49827852]
New priority.1 max_Reserved_msgs.2
missing field.(maxprice) add to MM_fields[]
missing field.(gtc) add to MM_fields[]
missing field.(maxprice) add to MM_fields[]
3416 uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0     reserved SUPERNET/KMD     0.00248171 ->   0.10010000 (40.49827852) | RT.3 881 n0
AUTOPRICE numautorefs.1
3458 uuid.5b1c0a529180b460402adf915eb660cb M.0 g.0 f.0      request   BTC/KMD     0.00111169 ->   4.04154760 (4433.02833200) | RT.3 881 n0
AUTOPRICE numautorefs.1
3460 uuid.5b1c0a529180b460402adf915eb660cb M.0 g.0 f.0     reserved   BTC/KMD     0.00191169 ->   4.04154760 (2361.14459978) | RT.3 881 n0
3486 uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
3578 uuid.ad6d8cfd6694cc467f6ad390f0642cb4 M.0 g.0 f.0      request   BCH/KMD     0.00868241 ->   4.00373680 (461.66368979) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
67   uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(44bb9faee9ee144a0c323af80fcccccc) mpnet.0 fill.1 gtc.1
SUPERNET/KMD ignore as qprice 4.99996830 vs myprice 40.00000000
AUTOPRICE numautorefs.1
97   uuid.b51fad355ff920d44cc54b59b6273bcd M.0 g.0 f.0      request   BCH/KMD     0.00871170 ->   4.00528151 (460.28724387) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
188  uuid.aacb3893ef8be6c5de998915dfcccccc M.0 g.1 f.1      request  HODL/KMD   4000.00220019 -> 200.00010000 ( 0.05000000) | RT.3 881 n0
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
246  uuid.3219ca558e524ee19e524616260a0c57 M.0 g.0 f.0      request   BTC/KMD     0.00111347 ->   4.05006706 (4433.71655336) | RT.3 881 n0
248  uuid.3219ca558e524ee19e524616260a0c57 M.0 g.0 f.0     reserved   BTC/KMD     0.00191347 ->   4.05006706 (2363.66382837) | RT.3 881 n0
AUTOPRICE numautorefs.1
PRICEFEED UPDATE.(PRLPAY/   KMD)   0.08130000 6ccb6072833e5e9e7e75bc8618e7b315133941b3d55160a47ffb0054ca2cb967  12.30012300
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
AUTOPRICE numautorefs.1
369  uuid.44bb9faee9ee144a0c323af80fcccccc M.0 g.1 f.1      request SUPERNET/KMD    30.00022019 -> 150.00010000 ( 4.99996830) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(44bb9faee9ee144a0c323af80fcccccc) mpnet.0 fill.1 gtc.1
SUPERNET/KMD ignore as qprice 4.99996830 vs myprice 40.00000000
397  uuid.f76f2140c3903efce0e1f58739245ae8 M.0 g.0 f.0      request   BTC/KMD     0.00111842 ->   4.07528600 (4437.27924043) | RT.3 881 n0
AUTOPRICE numautorefs.1
398  uuid.f76f2140c3903efce0e1f58739245ae8 M.0 g.0 f.0     reserved   BTC/KMD     0.00191842 ->   4.07528600 (2371.53082483) | RT.3 881 n0
417  uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0      request SUPERNET/KMD     0.00242464 ->   0.10010000 (41.45545506) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received REQUEST.(afdb38a57665bfaa3e1f073c55ce4746) mpnet.0 fill.0 gtc.1
839890655842992129 >>>>>>> myprice 40.00000000 qprice 41.45545506 r.27 range 1.45545506 -> 40.39297287, bestprice 40.39297287 counter.-1
priceiter.0 voliter.0 price 40.39297287 vol 0.10010000
reset price <- qprice 41.45545506
priceiter.1 voliter.0 price 41.45545506 vol 0.10010000
SUPERNET/KMD i.1 j.0 qprice 41.45545506 myprice 40.00000000 price 41.45545506 [40.77991070]
418  uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0     reserved SUPERNET/KMD     0.00246464 ->   0.10010000 (40.77991070) | RT.3 881 n0
420  uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0      connect SUPERNET/KMD     0.00246464 ->   0.10010000 (40.77991070) | RT.3 881 n0
bob 9d94d31074788fe1ee3a6a67bbe9a19888ddfa9be084e6bc3c32c17b4baea246 received CONNECT.(afdb38a57665bfaa3e1f073c55ce4746)
>>>>>>>>>> jumblrflag.-2 <<<<<<<<< r.3622251202 q.3735372707, 0.00245464 bobconfs.0, 0.10009000 aliceconfs.1 taddr.0 0
421  uuid.afdb38a57665bfaa3e1f073c55ce4746 M.0 g.1 f.0    connected SUPERNET/KMD     0.00246464 ->   0.10010000 (40.77991070) | RT.3 881 n0
send CONNECT for 3622251202-3735372707
MISMATCHED required confirms me.(1 0) vs (0 0) max.(6 6) othermax.(6 6)
NUMCONFIRMS for SWAP alice.1 bob.0, otheristrusted.0 othertrusts.1
CUT VERIFIED
added 6 of 6 from SUPERNET listunspents
second couldnt add address_utxo 8fea6b1c7dcc14915d270e5f99c626c34c005f6a6e9dae2aa8936224fcf1b4ea/v0 after not finding
dustcombine.0 numpre.0 min0.(nil) min1.(nil) numutxos.6 amount 0.00279147
ETH txid received: 0x0000000000000000000000000000000000000000000000000000000000000000
wait for alicepayment
ETH txid received: 0x0000000000000000000000000000000000000000000000000000000000000000
added 5 of 5 from SUPERNET listunspents
AUTOPRICE numautorefs.1
second couldnt add address_utxo d19e2e53c5abd0574b19bd435ba2340d4d1ee6ffc29e1f3b7b9914a0a4fe498a/v0 after not finding
dustcombine.0 numpre.0 min0.(nil) min1.(nil) numutxos.5 amount 0.00248464
0 wait for alicepayment bSsGTN1pgdNP3hTKWkxwXdbTT76fwW8sGK numconfs.1 KMD 42315780d67c600e37e3e504008f5a743b7bf61c1973274ab4378d0e79e53cf7
0 wait for alicepayment bSsGTN1pgdNP3hTKWkxwXdbTT76fwW8sGK numconfs.1 KMD 42315780d67c600e37e3e504008f5a743b7bf61c1973274ab4378d0e79e53cf7
0 wait for alicepayment bSsGTN1pgdNP3hTKWkxwXdbTT76fwW8sGK numconfs.1 KMD 42315780d67c600e37e3e504008f5a743b7bf61c1973274ab4378d0e79e53cf7
0 wait for alicepayment bSsGTN1pgdNP3hTKWkxwXdbTT76fwW8sGK numconfs.1 KMD 42315780d67c600e37e3e504008f5a743b7bf61c1973274ab4378d0e79e53cf7
lukechilds commented 6 years ago

Just to let you know I tried again with ERC20 and managed to get matches quicker when I set a higher price. Not sure if that's related (would explain why the issue is worse on ERC20 due to high TX fees making the price harder to predict) but no price mismatch errors are shown in the logs. It looks like it starts to match and the just stops.

So this seems like an intermittent and hard to track down bug but definitely reproducible.

jl777 commented 6 years ago

what if you set a 10% higher price, with a small trade the txfees can dominate. if this is a pricing issue, the it is a pricing issue and nothing else to fix

lukechilds commented 6 years ago

It's hard to choose what price I set because mm doesn't actually broadcast what I set. What I've been doing is setting a price. Viewing the broadcast price, then setting the Bob order after a little lower so I know it can match.

Also, it would make sense that tx fees could affect things on ERC20 due to gas price fluctuations but aren't SUPERNET tx fees fixed? So the exact same Alice order shouldn't not match with Bob and then match 10 minutes later.

lukechilds commented 6 years ago

You can view in my SUPERNET trade logs above, search for the value 41.45545506. That was the Alice trade price. First Bob does the strange reserved then ignore behaviour, then 10 minutes later it matches, both with an Alice price of 41.45545506 and a Bob price of 40.

The behaviour isn't consistent with the same pricing so I don't think it's strictly a pricing issue.

jl777 commented 6 years ago

SUPERNET / KMD price is changing all the time if you are using autoprice

jl777 commented 6 years ago

testing close to the edge doesnt tell us if this is a pricing issue or something else

lukechilds commented 6 years ago

SUPERNET / KMD price is changing all the time if you are using autoprice testing close to the edge doesnt tell us if this is a pricing issue or something else

I'm not, I'm using a fixed price on my Bob of 40 as you can see in the logs.