Bitshares-core: Dust settlement orders could mess up charts too

Created on 8 Jan 2018  路  15Comments  路  Source: bitshares/bitshares-core

Extension of issue #449 .

See this settlement order execution:
http://open-explorer.io/#/operations/1.11.112947572

which in turn produces the chart:
0030-01-08 16 24 28

Should bitshares-core do something to correct this kind of data as well?

api bug

All 15 comments

@abitmore what do you think ?

The fill_price stored in the db might be incorrect. Will check.

{"id":"1.11.112947571","op":[4,{"fee":{"amount":0,"asset_id":"1.3.0"},"order_id":"1.8.26863","account_id":"1.2.546699","pays":{"amount":7,"asset_id":"1.3.0"},"receives":{"amount":5,"asset_id":"1.3.113"},"fill_price":{"base":{"amount":5,"asset_id":"1.3.113"},"quote":{"amount":7,"asset_id":"1.3.0"}},"is_maker":true}],"result":[0,{}],"block_num":23346221,"trx_in_block":5,"op_in_trx":1,"virtual_op":53599}

{"id":"1.11.112947572","op":[4,{"fee":{"amount":0,"asset_id":"1.3.0"},"order_id":"1.4.3719","account_id":"1.2.398303","pays":{"amount":5,"asset_id":"1.3.113"},"receives":{"amount":7,"asset_id":"1.3.0"},"fill_price":{"base":{"amount":5,"asset_id":"1.3.113"},"quote":{"amount":7,"asset_id":"1.3.0"}},"is_maker":false}],"result":[0,{}],"block_num":23346221,"trx_in_block":5,"op_in_trx":1,"virtual_op":53600}

PR #571 submitted, please check.

With the patch, the object turns to:

{"id":"1.11.112947571","op":[4,{"fee":{"amount":0,"asset_id":"1.3.0"},"order_id":"1.8.26863","account_id":"1.2.546699","pays":{"amount":7,"asset_id":"1.3.0"},"receives":{"amount":5,"asset_id":"1.3.113"},"fill_price":{"base":{"amount":"29831273553","asset_id":"1.3.113"},"quote":{"amount":"50308802508","asset_id":"1.3.0"}},"is_maker":true}],"result":[0,{}],"block_num":23346221,"trx_in_block":5,"op_in_trx":1,"virtual_op":61402}

the new fill_price is (29831273553/10000)/(50308802508/100000) ~= 5.93

check difference in charts, the following unpatched version chart of CNY/BTS from open explorer daily(http://open-explorer.io/#/markets/BTS/CNY):
unpatched

Now a patched version from pull #571 :
patched

patch fix the charting.

PR merged.

The new update in GUI 180201 has a much WORSE dust-trade-wick issue than the last release for some reason.

When will this merge be forked in? The sooner the better as this is a huge issue.

this fix is already available in the master branch of bitshares-core. we did that today and we will add a release tag tomorrow.

i am reopening this issue as it seems some change we made after this brought again the peaks in the charts.

i tested locally when i sent the 2 pics and the peaks were gone, now i am using current master release to update the explorer and even after a full replay(deleted chain data and started all again) i am still getting those high values:

http://open-explorer.io/#/markets/BTS/CNY -> change to 1 day

any idea what can be causing this ? i will investigate further too.

I think the last change in PR #571 is actually wrong, which is made after you tested. Will create a new PR soon.

Moving to next release.

Sorry, shouldn't be caused by that.

@oxarbitrage I found no issue from my node as well as a public node bts.ai.la:

$ curl -d '{"id":1,"method":"call","params":["history","get_market_history",["1.3.0","1.3.113",86400,"2018-01-14T00:00:00","2018-01-14T00:00:00"]]}' https://bts.ai.la/ws;echo
{"id":1,"jsonrpc":"2.0","result":[{"id":"5.1.5834971","key":{"base":"1.3.0","quote":"1.3.113","seconds":86400,"open":"2018-01-14T00:00:00"},"high_base":245073039,"high_quote":74750000,"low_base":"57240618275","low_quote":"25444418225","open_base":226757369,"open_quote":100000000,"close_base":201110464,"close_quote":72399800,"base_volume":"5623538890791","quote_volume":"2032413699764"}]}

The peak is low_price = 10 * low_quote / low_base = 10 * 25444418225 / 57240618275 = 4.4445

But data from bitshares.openledger,info is wrong, I think it's running a really old node (maybe 171105a since it has no fill_price field)

$ curl -d '{"id":1,"method":"call","params":["history","get_market_history",["1.3.0","1.3.113",86400,"2018-01-14T00:00:00","2018-01-14T00:00:00"]]}' https://bitshares.openledger.info/ws;echo
{"id":1,"jsonrpc":"2.0","result":[{"id":"5.1.5834971","key":{"base":"1.3.0","quote":"1.3.113","seconds":86400,"open":"2018-01-14T00:00:00"},"high_base":1,"high_quote":0,"low_base":1,"low_quote":1,"open_base":11250284,"open_quote":4961375,"close_base":2045262,"close_quote":736295,"base_volume":"5623538890791","quote_volume":"2032413699764"}]}

I'll look for another node which is running 171212 for more data.

thanks @abitmore i am synchronizing a few chains with different versions to get more info. ill update.

Found one running 171212:

$ curl -d '{"id":1,"method":"call","params":["history","get_market_history",["1.3.0","1.3.113",86400,"2018-01-14T00:00:00","2018-01-14T00:00:00"]]}' https://bit.btsabc.org/ws;echo
{"id":1,"jsonrpc":"2.0","result":[{"id":"5.1.1555910","key":{"base":"1.3.0","quote":"1.3.113","seconds":86400,"open":"2018-01-14T00:00:00"},"high_base":245073039,"high_quote":74750000,"low_base":1,"low_quote":1,"open_base":226757369,"open_quote":100000000,"close_base":201110464,"close_quote":72399800,"base_volume":"5623538890791","quote_volume":"2032413699764"}]}

The peak is low_price = 10 * low_quote / low_base = 10 * 1/ 1= 10, which is same as your data.

yes, hold on ... i think my binary for the witness node is in 171212, my mistake it seems ... ill confirm.

false alarm, the binary was not updated. sorry to make you waste time on it @abitmore

working perfect now: http://open-explorer.io/#/markets/BTS/CNY

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichelSantos picture MichelSantos  路  7Comments

bitcoiners picture bitcoiners  路  7Comments

vikramrajkumar picture vikramrajkumar  路  5Comments

abitmore picture abitmore  路  6Comments

abitmore picture abitmore  路  8Comments