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

Change way how we determine the BSQ rate for a DAO cycle #270

Closed
chimp1984 opened this issue Oct 24, 2020 · 7 comments
Closed

Change way how we determine the BSQ rate for a DAO cycle #270

chimp1984 opened this issue Oct 24, 2020 · 7 comments
Labels

Comments

@chimp1984
Copy link

This is a Bisq Network proposal. Please familiarize yourself with the submission and review process.

Currently we determine the BSQ/USD rate from the 30 days average of the market price based on our trade statistics. This was a poor choice as the trade statisics data are not verifiable and can be faked. Such seems to has happened just now as a few trades are far off the market price and with bigger BTC amounts they had considerable influence on the average price. This can have been caused from a self trade or from publishing fake trade statistics. The data from trade statistics was never intended to be used for anything critical but only for informational purposes, due the known weakness of those data.

Suggested change:
As discussed in #269 (comment) I would like to suggest that following change:
The compensation maintainer (@MwithM) will make a proposal 5-8 days before proposal time ends with suggesting a realistic BSQ/USD rate. This can be based on the 30 and 90 days average if there are no outliers, otherwise he should try to remove the impact of the outliers. As also the 30 or 90 days average could be manipulated in a more sophisticated way BSQ traders who recently traded should veto in case the rate seems un-realistic. The Burningman can play here an important controller role as well, as he needs to trade frequently and knows which offers are really taken. If there are no concerns about the suggeste rate this rate will be considered as accepted by rough consensus. If there is not clear consensus, @MwithM should do a DAO proposal to be voted on. There could be multiple competing proposals, if that is the case the accepted proposal with the highest vote weight is the winner.

I suggest that for this cycle we do also the DAO voting on a suggested rate, even if there is consensus reached on the GH proposal. As we change a kind of "social" contract a DAO vote gives that change more weight and legitimacy.

As the BSQ trade fee adjustment is also based on the 30/90 days average I think we should extend that to that as well. We could simple take the suggested rate from the past DAO cycles instead.

@MwithM Sorry to put those burden on you without first asking you. Are you ok with taking that responsibility? Otherwise anyone else who can take that task?

A side note:
The BSQ rate used for compensation requests is anyway just a tool to get a common anchor for the exchange rate. If one particular contributor disagrees he just should adjust his requested USD value to match to his own personal converison rate. But he should not be surprised if voters reject his request in case they think the BSQ amount is too high according to the different rate they use. To have a consensus about a rate should help to avoid such conflicts and mis-interpretations, but it is not a hard enforcement. Thus this change should be seen in that context.

@chimp1984
Copy link
Author

I published the DAO proposal with tx ID 7de1c11713ea58553833b5cd2ae8b0557bf83bde0a83134bbc64c15d6d4cd448

@pazza83
Copy link

pazza83 commented Oct 25, 2020

I think this proposal is an improvement for both traders and contributors in that it ensures the price of BSQ is more closely tied to actual prices it is being bought and sold on BISQ, and less vulnerable to manipulation.

To avoid subjectivity it would be useful to define how the price was determined from the 30/90 day average, and also how outliers where determined.

Using the 30 day average (adjusted after the outliers have been removed) would add more volatility to the BSQ price, but would give a more real time reflection of current prices.

Using the 90 day average (adjusted after the outliers have been removed) would add more stability to the BSQ price, but would give a less accurate reflection of current prices.

To take both into account would be a compromise if done in such a way that can be calculated, and is an objective measurement. For example:

((30 day adjusted weighted volume BSQ/BTC price) + (30 day adjusted weighted volume BSQ/BTC price) / 2 )
This could then be converted to an BSQ/USD price.

The removal of outliers could also take into account the increased price someone might be willing to pay for a small amount of BSQ. A buyer of 10 BSQ will likely pay a significant increase on market price. Therefore, it would be useful to define what constitutes an outlier. I would suggest this could be calculated on the spread. Outliers would be defined as any offer which traded at a premium or discount to a given percentage spread from current mid market rate. NB: It would not be accurate in this instance to use the 30 or 90 day average, as they are in themselves made up of all the BSQ trades, including any self trades, test trades, trades attempting to manipulate the BSQ price.

@chimp1984
Copy link
Author

I just added a PR for exporting the trade statistics as csv: bisq-network/bisq#4702
With that it is easier for anyone to work with the data.
I will also add a PR for using a weighted median instead of the average as we use now. The median makes will reduce the impact of outlies. An alternative is to remove the outliers, but then its the question how we define those, so I guess the median is less problematic.

@chimp1984
Copy link
Author

Here are the csv data of all BSQ trades created from above PR.
trade-statistics-BSQ.csv.zip

@pazza83
Copy link

pazza83 commented Oct 25, 2020

I like the solution of using weighted medians for the averages and making the data downloadable as a CSV file.

@chimp1984
Copy link
Author

Here is another PR for adding removal of outliers (same code base we use in issued BSQ outlier removal):
bisq-network/bisq#4706

One can adjust the threshold where outliers are removed (default 5%) in the settings. This makes it quite flexible if trades try to just get below the threshold as the compensation maintainer could adjust it.

Weighted medians would have been an alternative but as the code base was already there for the outliers I have choosen that option.

@MwithM
Copy link

MwithM commented Nov 9, 2020

Approved through DAO voting. Changes are reflected at wiki. See changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants