Author Topic: Conventions / Coordinating BSIP42 for BitUSD market with MCR algorithm  (Read 297 times)

0 Members and 1 Guest are viewing this topic.

Offline Thom

A brief discussion took place (https://t.me/BitSharesDEX/329077) on Telegram today where Abit asked about metrics to eval BSIP42 algorithms. I hope to cultivate ideas here on how we can conduct similar experimentation for the BitUSD market as was done for BitCNY last month. Once the core MCR bug is fixed I want to be as ready as I can be to begin these experiments.

I will add to this after I have a look at Zapata's BSIP42 feed code, which I hope to find elements to expose to help us coordinate witnesses' BitUSD feeds.

It would be very useful for any of you witnesses that participated in the BitCNY experimentation to chime in here. I would like to see an explanation of the "experimentation process" that was used for BitCNY. From my observation it was messy and wasn't well coordinated. Nobody could even say with certainty which witnesses were experimenting with BSIP42 and which ones weren't, or how many different BSIP42 scripts were being used by experimenters.

Should witnesses experiment using a "reference" feed script? I think that would be easier to coordinate, and once we've come up with a reasonably stable algo, witnesses can port it or modify it to fit their operation. This is a question, not a foregone conclusion. I will probably use Zapata's script unless something else pops up that would be better.

So one item we could publish here is a list of witnesses that intend to participate in BSIP42 for BitUSD once the core is fixed to allow use of MCR in the algo.

How do we determine when algo "adjustments" are made? IIRC Abit acted as a type of coordinator to inform witnesses about adjustments / premium. Rather than relying on one person lets discuss this so we all know how that is determined so any of us could announce the info. However I think it's better for consistency that only one witness post or pin the announcements.
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 977
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: Conventions / Coordinating BSIP42 for BitUSD market with MCR algorithm
« Reply #1 on: October 16, 2018, 04:45:42 am »
actually BSIP42 is already active on bitUSD, otherwise bitUSD would have a big premium as before.

BSIP42 is irrelevant to MCR adjusting, the new MCR-based solution should have its own BSIP.

yes we need metrics to evaluate the feed price, as a base I think we need a chart that involve feed price from all witnesses, median price, latest price and some other reference price, seems someone began working on this?

Email´╝Ü[email protected]

Offline armin

  • Full Member
  • ***
  • Posts: 90
    • View Profile
Re: Conventions / Coordinating BSIP42 for BitUSD market with MCR algorithm
« Reply #2 on: October 16, 2018, 10:56:41 pm »
actually BSIP42 is already active on bitUSD, otherwise bitUSD would have a big premium as before.

BSIP42 is irrelevant to MCR adjusting, the new MCR-based solution should have its own BSIP.

yes we need metrics to evaluate the feed price, as a base I think we need a chart that involve feed price from all witnesses, median price, latest price and some other reference price, seems someone began working on this?

Who's working on it?

Offline Thom

Re: Conventions / Coordinating BSIP42 for BitUSD market with MCR algorithm
« Reply #3 on: October 16, 2018, 11:48:56 pm »
Thanks for commenting here Bitcrab, and contributing to this discussion.

actually BSIP42 is already active on bitUSD, otherwise bitUSD would have a big premium as before.
It's premature IMO, however I have removed my feeds for BitCNY and BitUSD so my market price feed will not interfere with the experimentation going on via BSIP42.

BSIP42 is irrelevant to MCR adjusting, the new MCR-based solution should have its own BSIP.
Not according to others who claim BSIP42 is still applicable and a new BSIP is unnecessary. I agree with you tho, that a new BSIP would be better for USD experimentation. Might be good to use BSIP42 as a starting point for the new one tho.

yes we need metrics to evaluate the feed price, as a base I think we need a chart that involve feed price from all witnesses, median price, latest price and some other reference price, seems someone began working on this?
Yes, Zapata wrote this one to compare witness feeds to each other and I believe it can display settings for his script also. Abit commented in Telegram he would be OK using Zapata's feed script [once updated with MCR core fix] as a reference script. I think that is the best way to go, so all witnesses have a common code base and we all start off at same baseline.

Here is a comment I wrote on Telegram that I feel is important and on point in this discussion:

Quote from: Thom (in Bitshares_Witnesses Telegram group)
In reply to Abit More: "but when everyone started to use it blindly "

So a "reference" script is OK until witnesses start to diverge from it? I agree, and any inaccuracies such changes introduce is their doing and they should be held accountable as usual. I also agree witnesses should be more responsible and thus attentive, but I also think expectations should be made clear on how witnesses participate in the experimentation.

Are witnesses being coordinated? Are those playing around with BSIP42 on BitUSD using a common script? Perhaps witnesses are less attentive b/c of a lack of planning? Is there a beginning and ending time for each adjustment iteration? Are the adjustment parameters for each iteration pinned or communicated so all witnesses can stay abreast of changes and stay synced? These are the types of questions I believe need to be answered to optimize the experimentation. Many of these types of questions can be addressed in the a BSIP.

It is so much easier for us to obtain a consensus for an algorithm if we work as a team on the same code base rather than trying to keep all the different scripts functioning the same way, with each witness working independently and taking a different amount of time to complete the changes on their own version.

The way I see it if we all start with the same code base and perfect that to consensus, then we've all agreed the script is as good as we can make it for the market conditions faced during experimentation. From that point on any deviation done by a witness from the last reference script iteration is on them to justify their changes to shareholders. 

Working independently may foster innovation, but in cases where a team of people must come to agreement it may be easier to start with consensus and maintain it as long as possible, hopefully until all agree the algorithm is as good as possible for the conditions at the time.

There is nothing stopping an individual witness from suggesting [innovative] changes to the ref script either. Working on a group effort needn't prevent innovation and individual thinking.
« Last Edit: October 24, 2018, 05:30:26 pm by Thom »
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3428
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Conventions / Coordinating BSIP42 for BitUSD market with MCR algorithm
« Reply #4 on: October 20, 2018, 10:04:46 am »
actually BSIP42 is already active on bitUSD, otherwise bitUSD would have a big premium as before.

BSIP42 is irrelevant to MCR adjusting, the new MCR-based solution should have its own BSIP.

yes we need metrics to evaluate the feed price, as a base I think we need a chart that involve feed price from all witnesses, median price, latest price and some other reference price, seems someone began working on this?

Who's working on it?
Zapata is working on this: http://pricefeed-tracker.dex.trading/ (code is here)
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline Thom

Re: Conventions / Coordinating BSIP42 for BitUSD market with MCR algorithm
« Reply #5 on: November 02, 2018, 03:26:14 pm »
One thing that came to mind we should discuss is the list of sources witnesses should use during our coordinated experimentation.

Looking over Zapata's script I see it supports a rather large list of feed sources, some require an API key and others don't. I would be surprised if every witness has all API keys for the sources that require them.

If all witnesses are not using the same list of feed sources it introduces an uncontrolled an unnecessary variable that needs to be understood so it doesn't adversely affect the goal of finding optimal feed and algorithm parameters.

So lets determine which feed sources we should use for each BitAsset we'll be optimizing the feeds for. Once that is known witnesses can obtain the necessary API keys for those sources. Waiting for the day of testing to do this is unwise. Witnesses need to prepare, and be ready when experimentation starts which means having the necessary API keys for the feed sources we agree to use.

If a fee is required to obtain any API keys we'll use it or the requirements for a source are beyond what a witness is willing / able to pay, perhaps some witnesses could share API keys to use while testing.

Another consideration is experimentation might reveal weaknesses of certain sources and we might decide to change sources during experimentation.

Feed sources are only one aspect of things we should coordinate among witnesses. Feed publish frequency is another. In the early days of graphene witnesses picked a time slot (0 - 59 minutes past the hour) to publish feeds to assure someone was always publishing a feed at almost anytime. Is the timing each witness publishes feeds important? Could it affect the algorithm?

I hope to see more people and witnesses participate in discussing these things here, otherwise I feel experimentation will be chaotic and hard to follow, and I'll have less confidence the algorithm was actually "engineered".

Lets start a list of feed sources we will use for BitUSD. Which sources are witnesses currently using?

Although I have temporarily disabled feeds for BitUSD, here are the sources I was using for that:
Quote
Binance, Bitfinex, BitStamp, CoinMarketCap, CoinCap, AEX, ZB, Livecoin

Those are listed in the config.yaml for bts_tools. The list of possible feed providers in bts_tools (list of code modules):
Quote
aex.py, bitfinex.py, bloomberg.py, coincap.py, fixer.py, poloniex.py, uphold.py,
binance.py,  bitstamp.py, btc38.py, coinmarketcap.py, yunbi.py, bitcoinaverage.py,
bittrex.py, bter.py, currencylayer.py, livecoin.py, quandl.py, zb.py

bts_tools will be irrelevant for experimentation, but I wanted to kick off discussion of feed sources by describing what I'm using.
I have API keys for bitcoinaverage.py, currencylayer.py and quandl.py.
« Last Edit: November 02, 2018, 03:54:01 pm by Thom »
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html