Author Topic: should feed price calculate include inside market and with volume?  (Read 4662 times)

0 Members and 1 Guest are viewing this topic.

Offline monsterer

A)
A single delegate can have at most 1 active feed. Only the last feed from each delegate matters if it is published in the last 24 hours.

Ok, so that reduces the discontinuity to when a new delegate gets voted in. Less serious than having discontinuities every block :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
For each bitAsset you sort all active feeds in ascending order (a delegate's active feed is his last feed if its age is less than 24h).
If the sorted array of active feeds has N elements the (N+1)/2  th element is chosen as median. (Havent actually looked in the code and there could be slight difference but that is the idea)

Sorry, it still isn't clear - are you saying:

A) the median is over N different delegate feeds
B) the median is over N different feeds within one delegate

?
A)
A single delegate can have at most 1 active feed. Only the last feed from each delegate matters if it is published in the last 24 hours.

Offline monsterer

For each bitAsset you sort all active feeds in ascending order (a delegate's active feed is his last feed if its age is less than 24h).
If the sorted array of active feeds has N elements the (N+1)/2  th element is chosen as median. (Havent actually looked in the code and there could be slight difference but that is the idea)

Sorry, it still isn't clear - are you saying:

A) the median is over N different delegate feeds
B) the median is over N different feeds within one delegate

?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
No, I think the actually used price feed is the median of all published ones.

Are you sure its not a median of all current feeds to the current delegate?

I'm fairly sure but maybe someone can verify it.

For each bitAsset you sort all active feeds in ascending order (a delegate's active feed is his last feed if its age is less than 24h).
If the sorted array of active feeds has N elements the (N+1)/2  th element is chosen as median. (Havent actually looked in the code and there could be slight difference but that is the idea)

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Actually emski and Markus are wrong.

Well, I do not actually know if they are wrong, but there are smartasses that say that we cannot continue like that! And we must set a bar for the quality of the price feeds. If the price feed is below the said price feed standard (read price) it will no longer be valid (cause they said so!)

The argument goes something like this -"Do you know what will happen if the quality of price feeds go below 90% quality? They will gradually continue to decline until the reach 0, quality...", "Nobody will trust the feeds and they will eventually reach zero".

That's why we will set the standard... and no more crazy non-standard feeds will be allowed.

And it will be awesome after that! <hearts><hearts> many <hearts>


PS
And Dude, if you do not trust the quality feed theory you should go start your own blockchain, experimenting with such unsafe propositions... we are quality feed believers here (well we became such recently, but now in quality feeds we trust!)!

I'm genuinely interested in your definition of price feed quality.
What features is it supposed to have?


My idea of a perfect price feed is that:
Get all "real" trades. Average out weighting in the volume of each trade. The result is "perfect" feed.
As this is impossible due to many reasons I think a solution that takes into account the volume as well as each price of the exchanges is as good as it gets.


There are some other issues with price feeds:
1 If an exchange fails to provide its feed data and this influences significantly the feed => should we still publish the new feed or wait for the exchange to resume its feed service? (my version of the script already allows configuration of this behavior)
2 If an exchange publishes significantly higher/lower price for an asset at tiny volume => should we account that?

Currently if you want to verify my feeds you can just run the script yourself (my settings are in the repo). If you believe my script (or anyone else's) isn't accurate and should not be used => state it and explain yourself.


On the other matter you pointed out: Should we use price feeds at all? It would be a good idea if someone briefly describes all the possible alternative approaches and maybe start a discussion?

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
No, I think the actually used price feed is the median of all published ones.

Are you sure its not a median of all current feeds to the current delegate?

I'm fairly sure but maybe someone can verify it.

Offline monsterer

No, I think the actually used price feed is the median of all published ones.

Are you sure its not a median of all current feeds to the current delegate?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
before we support this new feature, we should change the price feed logic.
It should include volume from wallet market, and the  feed price should  relative to volume.
I'm not sure if you are misinterpreting the feature.  It should allow people to place orders with a floor price but also with the additional stipulation that it tracks the feed price +/- a fixed offset.

I don't think there is a current suggestion to make the blockchain into a market maker or source of liquidity.  This feature just gives people more control over placing their orders.  I am also not in favor of a blockchain controlled market maker.

I am also hoping that it will be added to do short orders that can be a fixed offset from feed (only above the feed price).

I think we should also reconsider the policy that margin calls can't force buys above the feed price.
thanks, I actually have misinterpreting the feature
So I think this feature is good, but still need to be very careful when we use this function.
the problem is feed price logic, now feed price just be controlled by outside.
if wallet market volume is too much, it will attract people to attack it through outside price control.
So I think the price feed should  include inside market and calculate with  volume,  right?
The point of this is to make the internal market more accurate because of the low volume. Once volume is higher the market will be more accurate.
I think the day we have high volume on the internal market and on/off ramps come on line then I'm assuming this feature will no longer be needed and it will be removed.

I can see another advantage of alt's proposal: When we remove the price feed there will probably happen some panic selling of bitAssets. This in conjunction with actually no rules on shorting price might absolutely crush confidence and therefore bitAsset markets. If we weight in the internal price into pricefeeds we get a very smooth transition from external feeds to effectively no feeds. I would really like that.

zerosum

  • Guest
Actually emski and Markus are wrong.

Well, I do not actually know if they are wrong, but there are smartasses that say that we cannot continue like that! And we must set a bar for the quality of the price feeds. If the price feed is below the said price feed standard (read price) it will no longer be valid (cause they said so!)

The argument goes something like this -"Do you know what will happen if the quality of price feeds go below 90% quality? They will gradually continue to decline until the reach 0, quality...", "Nobody will trust the feeds and they will eventually reach zero".

That's why we will set the standard... and no more crazy non-standard feeds will be allowed.

And it will be awesome after that! <hearts><hearts> many <hearts>


PS
And Dude, if you do not trust the quality feed theory you should go start your own blockchain, experimenting with such unsafe propositions... we are quality feed believers here (well we became such recently, but now in quality feeds we trust!)!

« Last Edit: November 19, 2014, 11:08:18 am by tonyk2 »

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
Yes.
And that is a good thing.

Doesn't that mean that the price feed will change abruptly every block?

No, I think the actually used price feed is the median of all published ones.

Offline monsterer

Yes.
And that is a good thing.

Doesn't that mean that the price feed will change abruptly every block?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
And delegates are free to set trust_level for each exchange which is essentially a weight of that exchange's feed.

Wont that mean each delegate could have a totally different feed price?

Yes.
And that is a good thing.

Offline Markus

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
And delegates are free to set trust_level for each exchange which is essentially a weight of that exchange's feed.

Wont that mean each delegate could have a totally different feed price?
That's essentially a good thing. There is no one true price.

Offline monsterer

And delegates are free to set trust_level for each exchange which is essentially a weight of that exchange's feed.

Wont that mean each delegate could have a totally different feed price?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
before we support this new feature, we should change the price feed logic.
It should include volume from wallet market, and the  feed price should  relative to volume.

I've included the volume in my price feed mod. See it here: https://bitsharestalk.org/index.php?topic=9698.0. It is based on xeroc's version of your script.
No single exchange can manipulate the price with low volume.
And delegates are free to set trust_level for each exchange which is essentially a weight of that exchange's feed.