Open ghost opened 10 months ago
Here is an example of the largest divergence observed during the first 12 hours of monitoring. It was just over half a percent difference and lasted just one query interval (one minute). Afterwards, results stayed consistent between pricenodes. This shows that a quick price decline is adopted by each pricenode independently during their poll of providers. emzy polled before the decline, ro7nv during, and devin towards the end.
Here a discrepancy occurred with emzy node that lasted an extended period. At its peak the discrepancy was .634 of a percent. The timestamps range from 1698552546 (GMT: Sunday, October 29, 2023 4:09:06 AM) to 1698567366 (GMT: Sunday, October 29, 2023 8:16:06 AM)
. The timestamps had to be inferred after obtaining the data, so may not be completely accurate.
I have no explanation for this at the moment, perhaps checking logs may help, if they are available.
[EDIT] Emzy's logs showed that Binance stopped being polled for rates, and thus the pricenode was stuck with stale Binance rates for 20 hours. The stale XMR rate was 0.004757
and sometimes it was filtered as an outlier, sometimes it was not far enough to filter and therefore affected the average calculation. PR https://github.com/bisq-network/bisq-pricenode/pull/36 (recently adopted) may help, by detecting and erasing stale rates. The root cause of the outage still needs to be addressed.
One anomaly detected (middle of chart), reported above.
No issues.
No issues.
No issues.
No issues, only one alert (0.7%) which was a rapid decline similar to the example already mentioned above.
1698891562 emzyp 0.004812 devin 0.004812 ro7nv 0.004812 diff 0
1698891624 emzyp 0.0048090667 devin 0.004812 ro7nv 0.004812 diff 0.000609
1698891686 emzyp 0.0047675 devin 0.0048024 ro7nv diff 0.00732 ALERT!
1698891755 emzyp 0.0047685 devin 0.0047675 ro7nv 0.004767 diff 0.000314
1698891817 emzyp 0.0047747 devin 0.0047758 ro7nv 0.0047751333 diff 0.00023
No sustained discrepancies, max deviation 0.29%
No sustained discrepancies, max deviation 0.25%
No sustained discrepancies, max deviation 0.2568%
2 outages observed (6 minutes: emzyp,devin) and (47 minutes: devin), shown below:
No sustained discrepancies, max deviation 0.4631%
No sustained discrepancies, max deviation 0.5786% - a sudden price drop shown below in column 4. Was caught earlier by devin; one minute later by the other two nodes.
No sustained discrepancies, max deviation 0.2385%
max deviation 1.7531% - a sudden price drop, emzy node polling the value later than the other two nodes.
Below chart: emzy node perhaps displaying symptoms of issue 33. Issue is that a provider has ceased operation, therefore that node's calculated average will likely be off until cleared by node restart.
max deviation 0.5334%
Below chart: emzy still displaying symptoms of issue 33. I'll request a reboot and check the logs.
No sustained discrepancies after reboot, max deviation 0.3257%
max deviation 0.3321%
ro7nv outage 3 hours: (1699823340 - 1699833429) max deviation 0.2361%
max deviation 0.3459%
max deviation 0.7029% : an unexplained 1 candle blip from emzy node.
1699988052 0.0045650667 0.0045332 0.0045332 diff 0.007029 ALERT!
Other than that, max deviation was 0.3702%
A sudden drop of 1.5887% in which one node lagged the others for 1 minute. Other than that, max deviation was 0.3438%
A sudden increase of 0.5244% in which one node lagged the others for 1 minute. Other than that, max deviation was 0.4769%
max deviation 0.2973%
max deviation 0.2494%
max deviation 0.5103%
max deviation 0.4065%
max deviation 0.4678%
max deviation 0.5333%
max deviation 0.5463%
max deviation 0.1948%
max deviation 0.5932%
max deviation 0.3628%
max deviation 0.2974%
Overview
Several users have expressed concerns with the XMR rates in Matrix chat, e.g:
There have been some investigations and fixes already (#18, #28, #33). Also, due to unexplained production issues one pricenode contained stale Poloniex rates for 1.5 months (Aug 15 to Oct 8th) and this may be partly the driver for user complaints. However there may be other things that can be improved. The purpose of this issue is to closely monitor the production pricenodes over several weeks, documenting any problems found and brainstorming possible improvements. It is hoped this will lead to gaining an understanding of what the pricenode can deliver in terms of price accuracy.
Background on why some variability can be seen.
Pricenodes individually poll their exchanges once per minute, updating their internal data store with the new rates. Those rates are averaged and outliers removed at the point of responding to Bisq client requests. Pricenodes activity are not synchronized nor are Bisq requests synchronized to any completion point of the Pricenode's backend cycle. Bisq clients A and B will get slightly different rates from Pricenode P if their requests are made just 30 seconds apart. Likewise, Bisq clients A and B connected to Pricenodes P and Q respectively, will get slightly different rates even if they make their queries at exactly the same time (because P and Q are operating independently).
Methodology
A script is being run that logs the XMR rates from each pricenode, the timestamp and percentage variability. This will enable us to see what typical divergences happen, and for how long do they persist.
I'll check the results daily and document any observations under this issue.
Post Mortem
At the beginning of checking consistency, an issue was observed where one node's prices deviated from the others due to a bug. This was alleviated by https://github.com/bisq-network/bisq-pricenode/pull/36 and since deployment the issue has not manifested in the form of price discrepancies. However it seems likely the root cause has not yet been identified. This example shows the need for some form of error monitoring as requested here, since without it there's only reporting from attentive users.
From observing consistency below, 0.5% is the typical max deviation between pricenodes, with 0.1% to 0.2% being normal. In each of the cases the difference seems to be timing: each pricenode polls their providers once per minute so any variations in price during a minute can reflect as deviations between nodes. There are many chart examples of that below. Issue to consider improving this.