Author Topic: Volume And Peg Question  (Read 2883 times)

0 Members and 1 Guest are viewing this topic.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Just to be clear, do they account for 'volumes of each exchange' or do they account for 'volumes of each trade at an exchange'?  Because my feed script takes into account all trades and takes the average of a window of the last X amount of BTS traded.

My modification accounts for total volume of the exchange for each pair. It uses the volume of each exchange to weight the prices. It is good to have variety in calculations.

I wonder who will run all the scripts and compare the outputs. I'm curious if we have different feeds and how much they differ. However this is a discussion for another thread.

Offline fluxer555

  • Hero Member
  • *****
  • Posts: 749
    • View Profile
Just to be clear, do they account for 'volumes of each exchange' or do they account for 'volumes of each trade at an exchange'?  Because my feed script takes into account all trades and takes the average of a window of the last X amount of BTS traded.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
I'm not 100% sure if this is relevant, but I took an initial stab at a feed script that factors in volume a couple months ago:

https://bitsharestalk.org/index.php?topic=12773.0

Contributions welcome.

As far as I know all scripts (alt's xeroc's and mine) account for volume of the exchanges. Though alt's script behaves a little differently.
Current discussion is for the question in OP on one hand.
And on the other: should we include internal (for bitshares blockchain) volume and price.

Offline fluxer555

  • Hero Member
  • *****
  • Posts: 749
    • View Profile
I'm not 100% sure if this is relevant, but I took an initial stab at a feed script that factors in volume a couple months ago:

https://bitsharestalk.org/index.php?topic=12773.0

Contributions welcome.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
The idea of the peg is that it is attached to something (USD). If there is no USD then there will be no need for feeds for bitUSD.

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.

In my example internal volume is irrelevant.
By definition the peg "links" the price of a bitAsset (bitA) to the price of an external asset (A). If we account the internal volume (of bitA) in the feeds then the bitA will not be pegged to A.

I disagree. Think of the original concept without feeds. The bitA will be pegged to A simply because market makers make profit by maintaining the peg. As long as the majority has enough faith in the peg it will stabilize itself.

Accounting the internal price would help to gradually switch (with growing volume) to a system without feeds.

Even if we could account for all trades worldwide (BTS <-> A) and devise "perfect" feed the question in OP will still be valid. Shorting bitA is not the same as selling A for BTS.

Lets look into the case where we account the internal volume into the feeds. Imagine the following:
We account for worldwide trade volume of A  - $1mil.
We have internal market volume of bitA of $10 mil
In the real world the price of A is X BTS.
In the internal exchange the price of A is X+Y BTS.
With current implementation feed price should be X. In your proposal to account for the internal volume feed should it be ~ X+Y  [ derived from (11X + 10Y)/11 ].
Which one looks better for you ?

In all honesty I do think that (11X + 10Y)/11 would be closer to the "true" value than X.
The internal market is a valid tool for price discovery imo.

A more extreme example:
If everyone stopped using USD and instead used bitUSD what would be the real value for 1 bitUSD? Externally there would be no defined price USD:BTS, but there would be a defined price for bitUSD:BTS. So should the value of one bitUSD be closer to "not defined" or to whatever internal price currently exists?
I think it would be totally okay in such a situation to decouple the pegged asset from the real asset, as the real asset has less (in this example no) relevance than the digital counterpart.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.

In my example internal volume is irrelevant.
By definition the peg "links" the price of a bitAsset (bitA) to the price of an external asset (A). If we account the internal volume (of bitA) in the feeds then the bitA will not be pegged to A.

I disagree. Think of the original concept without feeds. The bitA will be pegged to A simply because market makers make profit by maintaining the peg. As long as the majority has enough faith in the peg it will stabilize itself.

Accounting the internal price would help to gradually switch (with growing volume) to a system without feeds.

Even if we could account for all trades worldwide (BTS <-> A) and devise "perfect" feed the question in OP will still be valid. Shorting bitA is not the same as selling A for BTS.

Lets look into the case where we account the internal volume into the feeds. Imagine the following:
We account for worldwide trade volume of A  - $1mil.
We have internal market volume of bitA of $10 mil
In the real world the price of A is X BTS.
In the internal exchange the price of A is X+Y BTS.
With current implementation feed price should be X. In your proposal to account for the internal volume feed should it be ~ X+Y  [ derived from (11X + 10Y)/11 ].
Which one looks better for you ?

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.

In my example internal volume is irrelevant.
By definition the peg "links" the price of a bitAsset (bitA) to the price of an external asset (A). If we account the internal volume (of bitA) in the feeds then the bitA will not be pegged to A.

I disagree. Think of the original concept without feeds. The bitA will be pegged to A simply because market makers make profit by maintaining the peg. As long as the majority has enough faith in the peg it will stabilize itself.

Accounting the internal price would help to gradually switch (with growing volume) to a system without feeds.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.

In my example internal volume is irrelevant.
By definition the peg "links" the price of a bitAsset (bitA) to the price of an external asset (A). If we account the internal volume (of bitA) in the feeds then the bitA will not be pegged to A.

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.
That's how I see it too ...
at least my script does NOT include the internal market ..

Also this has to be discussed thoroughly as it might be exploitable due to the arising feedback loop ..

Yes, that's a valid concern.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.
That's how I see it too ...
at least my script does NOT include the internal market ..

Also this has to be discussed thoroughly as it might be exploitable due to the arising feedback loop ..

Offline Frodo

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
  • BitShares: frodo
That's why price feeds should include internal market price of the asset weighted by volume. With growing relative volume of the internal market the external price becomes less relevant.

I'm not sure if current price feed scripts do this though.

Offline emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Imagine the following situation:
We have a real-world market for the asset A. Total world trade volume of asset A is $1 mil.
Bitshares implements bitAsset for A (bitA) and it starts trading on the blockchain.
Lets say there are shorts for total of $100k .

The question is: When it would be profitable for an entity (mr. X) to manipulate real world price of A (buying selling on the real exchange) so that for any dollar spent on the real world exchange X gets at least $1 worth of value on the Bitshares blockchain.