Author Topic: Delegates Please Publish Feeds More Often  (Read 7162 times)

0 Members and 1 Guest are viewing this topic.

Offline bytemaster

Delegates Please Publish Feeds More Often
« on: September 25, 2014, 07:54:46 pm »
When attempting to write a market maker the slow movement of the feed can be difficult.

I would recommend the following:

if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price
if  REAL_PRICE > MEDIAN  and  abs( YOUR_PRICE - REAL_PRICE ) / REAL_PRICE  > 0.005 publish price

The goal is to force the price down rapidly and allow it to creep up slowly.

By publishing prices more often it helps market makers maintain the peg and minimizes opportunity for shorts to sell USD below the peg that the market makers then have to absorb. 

If we can get updates flowing smoothly then we can gradually reduce the spread in the market maker bots. 

*note: all prices in USD per BTSX
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #1 on: September 25, 2014, 08:11:14 pm »
Wanted to pimp my script anyway .. gonna do what I can tomorrow evening and over the weekend .. thanks for giving a direction!
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #2 on: September 25, 2014, 08:17:54 pm »
When attempting to write a market maker the slow movement of the feed can be difficult.

I would recommend the following:

if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price
if  you haven't published a price in the past 20 minutes
   if  REAL_PRICE > MEDIAN  and  YOUR_PRICE < MEDIAN and abs( YOUR_PRICE - REAL_PRICE ) / REAL_PRICE  > 0.005 publish price

The goal is to force the price down rapidly and allow it to creep up slowly.

By publishing prices more often it helps market makers maintain the peg and minimizes opportunity for shorts to sell USD below the peg that the market makers then have to absorb. 

If we can get updates flowing smoothly then we can gradually reduce the spread in the market maker bots. 

*note: all prices in USD per BTSX

When the price is rising don't publish more often than every 20 minutes...  I also reduced the publishing load if you are already above the median when the price is rising... republishing your price will not move the median so don't bother.

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline amencon

  • Sr. Member
  • ****
  • Posts: 227
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #3 on: September 25, 2014, 08:32:10 pm »
Sounds simple enough, thanks for the direction.

Offline liondani

  • Hero Member
  • *****
  • Posts: 3730
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
Re: Delegates Please Publish Feeds More Often
« Reply #4 on: September 25, 2014, 08:55:34 pm »
The goal is to force the price down rapidly and allow it to creep up slowly.

If in future one bitAsset >Asset  (bitUSD>USD)
we would recommended to do the opposite, right?

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #5 on: September 25, 2014, 09:32:20 pm »
The goal is to force the price down rapidly and allow it to creep up slowly.

If in future one bitAsset >Asset  (bitUSD>USD)
we would recommended to do the opposite, right?

When BitAsset >> real asset there will be no shorts so the feed will be meaningless.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #6 on: September 25, 2014, 09:40:08 pm »
Actually I think it may be beneficial to discount all feeds by 0.995 to give the market makers some breathing room and provide a buffer against down trends.   
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline Riverhead

Re: Delegates Please Publish Feeds More Often
« Reply #7 on: September 26, 2014, 12:30:55 am »
Is real price last fill on BitsharesX?

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #8 on: September 26, 2014, 12:42:25 am »
I have update the script with this rule, delegate should change the parameter "change_min" to 0.5

When attempting to write a market maker the slow movement of the feed can be difficult.

I would recommend the following:

if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price
if  you haven't published a price in the past 20 minutes
   if  REAL_PRICE > MEDIAN  and  YOUR_PRICE < MEDIAN and abs( YOUR_PRICE - REAL_PRICE ) / REAL_PRICE  > 0.005 publish price

The goal is to force the price down rapidly and allow it to creep up slowly.

By publishing prices more often it helps market makers maintain the peg and minimizes opportunity for shorts to sell USD below the peg that the market makers then have to absorb. 

If we can get updates flowing smoothly then we can gradually reduce the spread in the market maker bots. 

*note: all prices in USD per BTSX

When the price is rising don't publish more often than every 20 minutes...  I also reduced the publishing load if you are already above the median when the price is rising... republishing your price will not move the median so don't bother.
« Last Edit: September 26, 2014, 12:51:48 am by alt »

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #9 on: September 26, 2014, 12:48:21 am »
Actually I think it may be beneficial to discount all feeds by 0.995 to give the market makers some breathing room and provide a buffer against down trends.
maybe  you should change this  rule at the wallet? discount the short wall price to 0.995*median price
because we'll disable feed price in the future right?

Ggozzo

  • Guest
Re: Delegates Please Publish Feeds More Often
« Reply #10 on: September 26, 2014, 03:08:13 am »
Where is the script, and is it easy to implement?

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #11 on: September 26, 2014, 03:19:05 am »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #12 on: September 26, 2014, 07:07:11 am »
If you don't mind ... can I borrow these lines from you ?! :-)
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #13 on: September 26, 2014, 07:18:21 am »
never mind

来自我的 HUAWEI P7-L00 上的 Tapatalk


Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #14 on: September 26, 2014, 07:18:55 am »
If you don't mind ... can I borrow these lines from you ?! :-)

Or better publish appropriate license for that. GPL is fine.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #15 on: September 26, 2014, 07:24:51 am »
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #16 on: September 26, 2014, 07:28:09 am »
https://github.com/xeroc/pytshares/blob/master/LICENSE

MIT is fine too?

Yours is OK. I'm not sure for alt's . Can it be used/modified freely ?

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #17 on: September 26, 2014, 07:53:01 am »
https://github.com/xeroc/pytshares/blob/master/LICENSE

MIT is fine too?

Yours is OK. I'm not sure for alt's . Can it be used/modified freely ?
it's free, GPL is ok

来自我的 HUAWEI P7-L00 上的 Tapatalk


Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #18 on: September 26, 2014, 08:01:43 am »
https://github.com/xeroc/pytshares/blob/master/LICENSE

MIT is fine too?

Yours is OK. I'm not sure for alt's . Can it be used/modified freely ?
it's free, GPL is ok

来自我的 HUAWEI P7-L00 上的 Tapatalk

I'm not sure it is enough for you to state it in the forum.
You should include the licence reference with the sources.
However I'm no lawyer and I might be wrong...

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #19 on: September 26, 2014, 12:58:28 pm »
I have add the LICENCE file, it's GPL

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #20 on: September 26, 2014, 02:14:16 pm »
Actually I think it may be beneficial to discount all feeds by 0.995 to give the market makers some breathing room and provide a buffer against down trends.
maybe  you should change this  rule at the wallet? discount the short wall price to 0.995*median price
because we'll disable feed price in the future right?

I would rather the delegates tweak this as necessary than introduce code changes with arbitrary numbers in it.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2274
    • View Profile
  • BitShares: jademont
Re: Delegates Please Publish Feeds More Often
« Reply #21 on: September 26, 2014, 03:04:08 pm »
It seems most of the delegates are using the auto script from the Bitsuperlab, because frequent updating is hard to be maintained by manually doing it. However it means most of the price feeds will be the same, then what's the point of publishing price feeds by delegates? Why we don't just integrate one price feed in wallet?
BTS committee member:jademont

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #22 on: September 26, 2014, 03:05:52 pm »
It seems most of the delegates are using the auto script from the Bitsuperlab, because frequent updating is hard to be maintained by manually doing it. However it means most of the price feeds will be the same, then what's the point of publishing price feeds by delegates? Why we don't just integrate one price feed in wallet?

Because the consensus logic needs the feed.... because single source is too much trust in one individual... because the plan is for delegates to have increasing variety of feed publishing policies. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline mf-tzo

  • Hero Member
  • *****
  • Posts: 1725
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #23 on: September 26, 2014, 03:16:22 pm »
How can I check which delegate is doing his job properly and who isn't?
How do I check what feed every delegate publishes?

Basically in simple terms and assuming GUI and windows how can I check the delegates?

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #24 on: September 26, 2014, 03:18:16 pm »
How can I check which delegate is doing his job properly and who isn't?
How do I check what feed every delegate publishes?

Basically in simple terms and assuming GUI and windows how can I check the delegates?

www.bitsharesblocks.com is a good start. I'm not sure what is available through client GUI.

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #25 on: September 26, 2014, 03:19:31 pm »
How can I check which delegate is doing his job properly and who isn't?
How do I check what feed every delegate publishes?

Basically in simple terms and assuming GUI and windows how can I check the delegates?

I hope BitShares Blocks can gather feed publishing statistics for all delegates including which feeds and frequency of update.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline GaltReport

Re: Delegates Please Publish Feeds More Often
« Reply #26 on: September 26, 2014, 03:20:22 pm »
It seems most of the delegates are using the auto script from the Bitsuperlab, because frequent updating is hard to be maintained by manually doing it. However it means most of the price feeds will be the same, then what's the point of publishing price feeds by delegates? Why we don't just integrate one price feed in wallet?

Because the consensus logic needs the feed.... because single source is too much trust in one individual... because the plan is for delegates to have increasing variety of feed publishing policies.

I understand BM's comments but I must say I am sympathetic to either having the feed built-in or at least having the official dev team take over the price-feed script. I think many of the delegates did not expect and are not prepared to maintain a price-feed script.  If for no other reason than ensuring some sort of consistent approach and quality control.  There doesn't seem to be any QC on the price feed that delegates provide and many are apparently not providing any.


I
« Last Edit: September 26, 2014, 03:23:09 pm by GaltReport »

Offline ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2274
    • View Profile
  • BitShares: jademont
Re: Delegates Please Publish Feeds More Often
« Reply #27 on: September 26, 2014, 03:24:09 pm »
It seems most of the delegates are using the auto script from the Bitsuperlab, because frequent updating is hard to be maintained by manually doing it. However it means most of the price feeds will be the same, then what's the point of publishing price feeds by delegates? Why we don't just integrate one price feed in wallet?

Because the consensus logic needs the feed.... because single source is too much trust in one individual... because the plan is for delegates to have increasing variety of feed publishing policies.

What you said is so true, but the result is indeed no difference between using auto script and integrating it in wallet, if most of the delegates use the script.  Somewhere must be wrong, but I can't tell. I am afraid that price feeds for pegging is  only a treat to the symptom, not the underlying problem. Sorry I can't give you any constructive suggestion except for my worries.
BTS committee member:jademont

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #28 on: September 26, 2014, 03:27:16 pm »
You could always put a configuration to the script that assigns weight on each exchange's feed.
Each delegate might want to tweak the weights depending on his "believes"/policies or whatever.

Offline mf-tzo

  • Hero Member
  • *****
  • Posts: 1725
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #29 on: September 26, 2014, 03:27:20 pm »
Quote
www.bitsharesblocks.com is a good start. I'm not sure what is available through client GUI.

I am aware of that. I found it very nice but it doen't tell me anything about who I should vote or unvote and why... Or does it?

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #30 on: September 26, 2014, 03:28:27 pm »
Actually I think it may be beneficial to discount all feeds by 0.995 to give the market makers some breathing room and provide a buffer against down trends.
maybe  you should change this  rule at the wallet? discount the short wall price to 0.995*median price
because we'll disable feed price in the future right?

I would rather the delegates tweak this as necessary than introduce code changes with arbitrary numbers in it.
I have update the script with the discount

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #31 on: September 26, 2014, 03:29:38 pm »
Quote
www.bitsharesblocks.com is a good start. I'm not sure what is available through client GUI.

I am aware of that. I found it very nice but it doen't tell me anything about who I should vote or unvote and why... Or does it?

If you define what do you mean by "delegate to do his job properly" I could give better answer.
About the price feeds - they are visible on www.bitsharesblocks.com and as far as I know more statistics will be implemented very soon.

Offline GaltReport

Re: Delegates Please Publish Feeds More Often
« Reply #32 on: September 26, 2014, 03:32:39 pm »
You could always put a configuration to the script that assigns weight on each exchange's feed.
Each delegate might want to tweak the weights depending on his "believes"/policies or whatever.

So, you could have one script with some delegate configurable settings.  Sounds interesting.

I just think the energy spent monitoring and chastising delegates may not be well spent.  Maybe better to just provide the script with some configurable settings and release it under github like the client itself.
« Last Edit: September 26, 2014, 03:34:53 pm by GaltReport »

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #33 on: September 26, 2014, 03:37:58 pm »
Also.. the scripts will need to add premiums to certain exchanges based upon risks in that exchange.

Claiming that the BTC price was the weighted average of Gox and Bitstamp is foolish... there exists a "Gox discount" that should be added to their feed before it can be incorporated...  and that premium changes over time. 

Price feeds are not trivial and ultimately need to come from an internal market rather than an external one.

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline Riverhead

Re: Delegates Please Publish Feeds More Often
« Reply #34 on: September 26, 2014, 03:42:33 pm »
Once BitSharesX gains critical mass this shouldn't be an issue.  We will be the market.

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #35 on: September 26, 2014, 04:32:44 pm »
Once BitSharesX gains critical mass this shouldn't be an issue.  We will be the market.

is this true? I'd hope so, but for now the system is feed dependent no matter how large the system gets. We'd need more on/off ramps where bitUSD is accepted for 1 USD in order for the feeds to be replaced by arb bots . Maybe that's what is meant by critical mass, but even then all the market risk is being assumed by the on/off ramps.
« Last Edit: September 26, 2014, 04:34:32 pm by maqifrnswa »
maintains an Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true

Offline mf-tzo

  • Hero Member
  • *****
  • Posts: 1725
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #36 on: September 26, 2014, 05:10:10 pm »
Quote
If you define what do you mean by "delegate to do his job properly" I could give better answer.
About the price feeds - they are visible on www.bitsharesblocks.com and as far as I know more statistics will be implemented very soon.

Well...I have no idea what do his job properly should mean..I would assume that it means that they don't miss blocks  but also that they produce price feeds which are fair according to the daily market? I can see now both of this information.

Maybe a good idea, but obviously not a priority is to create videos showing how to trade, how shorting works, what are the obligations of the delegates, what the shareholders should check to see if the delegates do their job etc etc... I know that all these have been extensively discussed in the forum and in the wiki but videos for many lazy people and people who don't speak very good English, or for people who are more visual are much better.

Of course I understand that these videos may not be priority but they have to be made at some point. From my point of view, I trust a couple of delegates in here to do the right thing so I vote them but I am pretty sure that my stake doesn't make much difference anyway.. But if all the small shareholders think like me and do not really know why they vote who they vote, this will not be good imho.. 

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #37 on: September 26, 2014, 05:18:50 pm »
In the meantime:
http://coins.die-schuhs.de/feed-stats.txt

updates every 60 minutes


exert:
Code: [Select]
+-------+--------------+--------------+--------------+
| asset | mean         | std          | median       |
+-------+--------------+--------------+--------------+
| GLD   | 0.0000270644 | 0.0000008777 | 0.0000270010 |
| BTC   | 0.0000789535 | 0.0000061072 | 0.0000815500 |
| SLV   | 0.0018470976 | 0.0000921094 | 0.0018818273 |
| LTC   | 0.0071947760 | 0.0003331745 | 0.0073400000 |
| PTS   | 0.0116354766 | 0.0005481988 | 0.0119000000 |
| GBP   | 0.0200669214 | 0.0007995986 | 0.0203000000 |
| EUR   | 0.0257811551 | 0.0011566114 | 0.0262000000 |
| CHF   | 0.0309064409 | 0.0011705949 | 0.0313000000 |
| AUD   | 0.0370756933 | 0.0013665439 | 0.0377000000 |
| CAD   | 0.0363075220 | 0.0013889951 | 0.0368000000 |
| SGD   | 0.0415377541 | 0.0015537817 | 0.0420000000 |
| NZD   | 0.0410527425 | 0.0016140570 | 0.0419000000 |
| USD   | 0.0328552978 | 0.0020171120 | 0.0328000000 |
| TRY   | 0.0735809697 | 0.0027610574 | 0.0747000000 |
| PPC   | 0.0291100338 | 0.0029922361 | 0.0305000000 |
| SEK   | 0.2355237872 | 0.0091941246 | 0.2390000000 |
| HKD   | 0.2538920723 | 0.0096765011 | 0.2570000000 |
| CNY   | 0.2021336492 | 0.0110680912 | 0.2039750000 |
| MXN   | 0.4366923106 | 0.0166829060 | 0.4430000000 |
| RUB   | 1.2651815951 | 0.0489347657 | 1.2800000000 |
| JPY   | 3.5583942107 | 0.1247830890 | 3.6100000000 |
+-------+--------------+--------------+--------------+
+-----------------------------+-----+----------+---------------------------------+
| delegate                    | top | numFeeds | asset                           |
+-----------------------------+-----+----------+---------------------------------+
| cny.bts500                  | 1   | 3        | BTC,  0.00008155 (med  +0.000%) |
|                             |     |          | CNY,  0.20625000 (med  +1.115%) |
|                             |     |          | USD,  0.03362023 (med  +2.501%) |
| bts.coin                    | 2   | 3        | BTC,  0.00007569 (med  -7.186%) |
|                             |     |          | CNY,  0.21500000 (med  +5.405%) |
|                             |     |          | USD,  0.03360000 (med  +2.439%) |
| delegate.bitsuperlab        | 3   | 3        | BTC,  0.00008268 (med  +1.391%) |
|                             |     |          | CNY,  0.20497000 (med  +0.488%) |
|                             |     |          | USD,  0.03343200 (med  +1.927%) |
| google.helloworld           | 4   | 2        | CNY,  0.20420000 (med  +0.110%) |
|                             |     |          | USD,  0.03200000 (med  -2.439%) |
| bimin.coin                  | 5   | 3        | BTC,  0.00007569 (med  -7.186%) |
|                             |     |          | CNY,  0.21500000 (med  +5.405%) |
|                             |     |          | USD,  0.03360000 (med  +2.439%) |
| usd.bts500                  | 6   | 3        | BTC,  0.00008155 (med  +0.000%) |
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline mf-tzo

  • Hero Member
  • *****
  • Posts: 1725
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #38 on: September 26, 2014, 05:21:22 pm »
Quote
In the meantime:
http://coins.die-schuhs.de/feed-stats.txt

updates every 60 minutes

Nice!!! +5%

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #39 on: September 26, 2014, 06:14:09 pm »
if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price
if  you haven't published a price in the past 20 minutes
   if  REAL_PRICE > MEDIAN  and  YOUR_PRICE < MEDIAN and abs( YOUR_PRICE - REAL_PRICE ) / REAL_PRICE  > 0.005 publish price
Over here ... what is the REAL_PRICE? is it (ASK+BID)/2
in alt's script this seems to be the median of all feeds .. doesn't feel right because that is the same value as MEDIAN .. isn't it?

I am not so sure it is implemented correctly in alt's script .. could someone shed some light over here and elaborate the above conditions ELI5?

IMHO:

MEDIAN = median over all other feeds .. aka. median as announced by the wallet's asset status
YOUR_PRICE = my price according to the external feeds
REAL_PRICE = (aks+bid)/2
« Last Edit: September 26, 2014, 06:15:51 pm by xeroc »
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #40 on: September 26, 2014, 06:49:43 pm »
if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price
if  you haven't published a price in the past 20 minutes
   if  REAL_PRICE > MEDIAN  and  YOUR_PRICE < MEDIAN and abs( YOUR_PRICE - REAL_PRICE ) / REAL_PRICE  > 0.005 publish price
Over here ... what is the REAL_PRICE? is it (ASK+BID)/2
in alt's script this seems to be the median of all feeds .. doesn't feel right because that is the same value as MEDIAN .. isn't it?

I am not so sure it is implemented correctly in alt's script .. could someone shed some light over here and elaborate the above conditions ELI5?

IMHO:

MEDIAN = median over all other feeds .. aka. median as announced by the wallet's asset status
YOUR_PRICE = my price according to the external feeds
REAL_PRICE = (aks+bid)/2

The feed price I would use is the BID price and not look at the ASK at all.    We don't want shorts selling above bids and using the average would give shorts an advantage.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #41 on: September 26, 2014, 06:55:53 pm »
conclusion:

MEDIAN = median over all other feeds .. aka. median as announced by the wallet's asset status
YOUR_PRICE = my price according to the external feeds
REAL_PRICE = (price of top) bid

thanks .. gonna continue coding my script now
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #42 on: September 26, 2014, 06:57:00 pm »
conclusion:

MEDIAN = median over all other feeds .. aka. median as announced by the wallet's asset status
YOUR_PRICE = my price according to the external feeds
REAL_PRICE = (price of top) bid

thanks .. gonna continue coding my script now

YOUR_PRICE = Your current published price.
REAL_PRICE = Lowest of external feeds
MEDIAN = current median price according to the blockchain.

I went with lowest because it errors on the safe side.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #43 on: September 26, 2014, 09:15:00 pm »
maybe someone can proof read the code:
https://github.com/xeroc/pytshares/blob/master/btsx_feed.py

not volume-weights for exchanges yet ..
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline svk

Re: Delegates Please Publish Feeds More Often
« Reply #44 on: September 27, 2014, 05:34:07 pm »
How can I check which delegate is doing his job properly and who isn't?
How do I check what feed every delegate publishes?

Basically in simple terms and assuming GUI and windows how can I check the delegates?

I hope BitShares Blocks can gather feed publishing statistics for all delegates including which feeds and frequency of update.

I've added the frequency of feed updates to the delegates info, it's calculated as the average of the number of feed updates over the last 48 hours. Multiple feed update transactions in the same block are only counted once, but I do count updates that are separated by a block or more for now. I can probably get update frequency for each asset added to the delegate page as well, will check that tomorrow.

I picked "updates/day" as the unit as it gives the "nicest" numbers, how many updates per day do you think is good enough?
Worker: dev.bitsharesblocks

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #45 on: September 27, 2014, 07:02:33 pm »
I finished it today:

Please feel free to check if correct!

https://github.com/xeroc/pytshares/blob/master/btsx_feed.py
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #46 on: September 27, 2014, 07:27:01 pm »
How can I check which delegate is doing his job properly and who isn't?
How do I check what feed every delegate publishes?

Basically in simple terms and assuming GUI and windows how can I check the delegates?

I hope BitShares Blocks can gather feed publishing statistics for all delegates including which feeds and frequency of update.

I've added the frequency of feed updates to the delegates info, it's calculated as the average of the number of feed updates over the last 48 hours. Multiple feed update transactions in the same block are only counted once, but I do count updates that are separated by a block or more for now. I can probably get update frequency for each asset added to the delegate page as well, will check that tomorrow.

I picked "updates/day" as the unit as it gives the "nicest" numbers, how many updates per day do you think is good enough?

The best metric I can think of is the average of the delegate feed error. You could pool xeroc's delegate feed difference each hour and provide the average.
However it might not be the "best" as some delegates have different policies. If that is within 2,3% it should be OK. Frequency of the updates is also good.

Offline bytemaster

Re: Delegates Please Publish Feeds More Often
« Reply #47 on: September 27, 2014, 07:32:16 pm »
You don't want to publish the average "error" because then that will motivate everyone using the same feed and updating at the same time.    We want diversity of opinion, we just want it more frequently to adjust to changing market conditions.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Re: Delegates Please Publish Feeds More Often
« Reply #48 on: September 27, 2014, 08:39:04 pm »
You don't want to publish the average "error" because then that will motivate everyone using the same feed and updating at the same time.    We want diversity of opinion, we just want it more frequently to adjust to changing market conditions.

Well frequency of updates is one thing. However if most of delegates have publicly available policies you can implement them and check the error according to their policy. And you can have your own policy and check delegate's error according to that. I'm not sure frequency of updates is the best metric as one might frequently publish "wrong"/questionable feeds.

iHashFury

  • Guest
Re: Delegates Please Publish Feeds More Often
« Reply #49 on: December 06, 2014, 04:50:48 pm »
Hello

I have just set-up my price feeds https://bitsharestalk.org/index.php?topic=7787.msg159042#msg159042

I hope its correct.

Feedback is appreciated.

Offline alt

  • Hero Member
  • *****
  • Posts: 2806
    • View Profile
  • BitShares: baozi
Re: Delegates Please Publish Feeds More Often
« Reply #50 on: January 16, 2018, 10:33:05 pm »
I saw there are 11.3 M USD margin call, but the feed price almost 10% higher than other exhchange. and change very slow.
if the witness still behave like this, the USD will be blackswan more easy.

Quote
if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price

When attempting to write a market maker the slow movement of the feed can be difficult.

I would recommend the following:

if  REAL_PRICE < MEDIAN and YOUR_PRICE > MEDIAN publish price
if  REAL_PRICE > MEDIAN  and  abs( YOUR_PRICE - REAL_PRICE ) / REAL_PRICE  > 0.005 publish price

The goal is to force the price down rapidly and allow it to creep up slowly.

By publishing prices more often it helps market makers maintain the peg and minimizes opportunity for shorts to sell USD below the peg that the market makers then have to absorb. 

If we can get updates flowing smoothly then we can gradually reduce the spread in the market maker bots. 

*note: all prices in USD per BTSX

Offline sahkan

  • Sr. Member
  • ****
  • Posts: 232
    • View Profile
    • BitShares DEX
Re: Delegates Please Publish Feeds More Often
« Reply #51 on: January 17, 2018, 08:59:06 am »
I have read through this and I agree. I have adjusted accordingly and sped up the price publishing to every 20 minutes. (This is of course the complete opposite of what bitcrab was asking for BitCNY).

Offline R

  • Hero Member
  • *****
  • Posts: 757
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #52 on: January 17, 2018, 11:09:53 am »
Would it also not be worth increasing the max force settle volume per 24hrs? If it's set to 1% and someone has a margin call greater than 1%, perhaps the DEX couldn't clear the margin call fast enough?

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Re: Delegates Please Publish Feeds More Often
« Reply #53 on: January 17, 2018, 03:33:41 pm »
Would it also not be worth increasing the max force settle volume per 24hrs? If it's set to 1% and someone has a margin call greater than 1%, perhaps the DEX couldn't clear the margin call fast enough?

I agree that max force settle volume is WAY too low. But I sort of assumed it didn't affect margin calls.

FWIW, the DEX doesn't clear margin calls -- the traders do. A possibly-bigger problem is the max short-squeeze ratio is only 110%, which means that margin calls are not very aggressive and traders don't have much incentive to buy into the margin call. I suppose USD will probably black-swan today because of it. A very serious problem is that Bitshares is too shorter-friendly, at the expense of people who hold the supposedly risk-free bitassets.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Re: Delegates Please Publish Feeds More Often
« Reply #54 on: January 17, 2018, 03:40:04 pm »
I have read through this and I agree. I have adjusted accordingly and sped up the price publishing to every 20 minutes. (This is of course the complete opposite of what bitcrab was asking for BitCNY).

Is bitcrab the one who thinks that bitasset risk should be moved from the shorts to the longs?
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline R

  • Hero Member
  • *****
  • Posts: 757
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #55 on: January 18, 2018, 08:55:48 pm »
Would it also not be worth increasing the max force settle volume per 24hrs? If it's set to 1% and someone has a margin call greater than 1%, perhaps the DEX couldn't clear the margin call fast enough?

I agree that max force settle volume is WAY too low. But I sort of assumed it didn't affect margin calls.

FWIW, the DEX doesn't clear margin calls -- the traders do. A possibly-bigger problem is the max short-squeeze ratio is only 110%, which means that margin calls are not very aggressive and traders don't have much incentive to buy into the margin call. I suppose USD will probably black-swan today because of it. A very serious problem is that Bitshares is too shorter-friendly, at the expense of people who hold the supposedly risk-free bitassets.

What would the effect of changing the max short-squeeze ratio be specifically? Would you desire it increase of decreased? All committee controlled assets use 110%

binggo

  • Guest
Re: Delegates Please Publish Feeds More Often
« Reply #56 on: January 19, 2018, 01:20:40 am »
The root problem is not the feed price and the max short-squeeze ratio.

The root problem is the DEX is very very friendly to the shorter, when someone was forced liquidation, the rest of BTS should be withdraw at least 60%  as a punitive margin by the DEX.

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Re: Delegates Please Publish Feeds More Often
« Reply #57 on: January 25, 2018, 06:14:27 pm »
Would it also not be worth increasing the max force settle volume per 24hrs? If it's set to 1% and someone has a margin call greater than 1%, perhaps the DEX couldn't clear the margin call fast enough?

I agree that max force settle volume is WAY too low. But I sort of assumed it didn't affect margin calls.

FWIW, the DEX doesn't clear margin calls -- the traders do. A possibly-bigger problem is the max short-squeeze ratio is only 110%, which means that margin calls are not very aggressive and traders don't have much incentive to buy into the margin call. I suppose USD will probably black-swan today because of it. A very serious problem is that Bitshares is too shorter-friendly, at the expense of people who hold the supposedly risk-free bitassets.

What would the effect of changing the max short-squeeze ratio be specifically? Would you desire it increase of decreased? All committee controlled assets use 110%

In my view (bear in mind that I haven't worked through all of the details here), it should be increased. As I understand it, 110% means that a margin call is settled at the price feed plus 10%, which means essentially that the shorter is assessed a fixed penalty of 10% for letting their collateral ratio get too low. Alternatively, BitAsset holders are offered a 10% premium to trade in their BitAssets for BTS. In wild market swings (especially when the price feeds are lagging the external prices), 10% may be too low to clear a high volume of margin calls and prevent a black swan.

I have a vague feeling that the reason the MSSR exists in the first place is to provide a measure of protection against manipulation. Unfortunately the effect of this is to transfer risk from BitAsset short positions to BitAsset long positions.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Re: Delegates Please Publish Feeds More Often
« Reply #58 on: January 25, 2018, 06:15:47 pm »
The root problem is not the feed price and the max short-squeeze ratio.

The root problem is the DEX is very very friendly to the shorter, when someone was forced liquidation, the rest of BTS should be withdraw at least 60%  as a punitive margin by the DEX.

Yes, that's exactly what I'm saying. If I understand it correctly, that's what the max short-squeeze ratio does -- controls the penalty associated with getting margin-called.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline yvv

  • Hero Member
  • *****
  • Posts: 1186
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #59 on: January 25, 2018, 11:36:59 pm »
There is no need for short squeeze protection imo. When a margin call happens, the system should take all orders up to a limit defined by collateral.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Delegates Please Publish Feeds More Often
« Reply #60 on: January 26, 2018, 07:15:58 am »
There is no need for short squeeze protection imo. When a margin call happens, the system should take all orders up to a limit defined by collateral.
As the name implies, the short squeeze protection is to protect shorters for overpaying in low-liquidity markets.
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline yvv

  • Hero Member
  • *****
  • Posts: 1186
    • View Profile
Re: Delegates Please Publish Feeds More Often
« Reply #61 on: January 26, 2018, 12:37:19 pm »
There is no need for short squeeze protection imo. When a margin call happens, the system should take all orders up to a limit defined by collateral.
As the name implies, the short squeeze protection is to protect shorters for overpaying in low-liquidity markets.

Why to do this? Shorters deposit collateral to protect bitAssets. If a shorter can't maintain his collateral, use it all to buy back his debt. What's a problem with this?

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3846
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Delegates Please Publish Feeds More Often
« Reply #62 on: January 27, 2018, 06:47:19 pm »
There is no need for short squeeze protection imo. When a margin call happens, the system should take all orders up to a limit defined by collateral.
As the name implies, the short squeeze protection is to protect shorters for overpaying in low-liquidity markets.

Why to do this? Shorters deposit collateral to protect bitAssets. If a shorter can't maintain his collateral, use it all to buy back his debt. What's a problem with this?
Where you sit determines what you say.Where you stand depends on where you sit.
« Last Edit: January 27, 2018, 06:51:46 pm by abit »
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Re: Delegates Please Publish Feeds More Often
« Reply #63 on: January 30, 2018, 06:36:27 pm »
There is no need for short squeeze protection imo. When a margin call happens, the system should take all orders up to a limit defined by collateral.
As the name implies, the short squeeze protection is to protect shorters for overpaying in low-liquidity markets.

Why to do this? Shorters deposit collateral to protect bitAssets. If a shorter can't maintain his collateral, use it all to buy back his debt. What's a problem with this?
Where you sit determines what you say.Where you stand depends on where you sit.

To state it explicitly, people with large short positions want to offload as much of their risk as possible to people on the long side. Hence things like short-squeeze protection and bitcrab's bizarre arguments for nonzero force-settle offsets.

It's things like this that have really weakened my trust in the BitAsset system. It seems that there is a deep incentive problem here:

If BitShares does well, people who took out short positions on BitAssets make a ton of money and gain a large share of the total stake. Since those people have short positions, they have two things:
1. Strong individual incentives to offload risk to longs, and
2. The voting power to make that a reality.

Of course, the whole point of holding BitAssets is that they're supposed to be a place to harbor oneself from price volatility and risk, and in my view, BitAssets are one of the major selling points for Bitshares overall. So if the large shorts vote their own interests myopically (which they have both the incentive and the ability to do), they weaken one of the very pillars that holds up Bitshares itself.

Maybe I'm overstating the importance of BitAssets to the overall Bitshares ecosystem? In any case, I've been aggressively reducing my exposure to BitAssets ever since I realized the magnitude of the incentive problem. The black swan risk is just too great and too difficult to quantify for me to keep significant amounts of my wealth here anymore.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."