BitShares Forum

Main => General Discussion => Topic started by: emski on February 05, 2015, 08:49:17 am

Title: Volume And Peg Question
Post by: emski on February 05, 2015, 08:49:17 am
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.
Title: Re: Volume And Peg Question
Post by: Frodo on February 05, 2015, 12:36:52 pm
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.
Title: Re: Volume And Peg Question
Post by: xeroc on February 05, 2015, 12:44:33 pm
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 ..
Title: Re: Volume And Peg Question
Post by: Frodo on February 05, 2015, 01:02:29 pm
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.
Title: Re: Volume And Peg Question
Post by: emski on February 05, 2015, 01:09:29 pm
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.
Title: Re: Volume And Peg Question
Post by: Frodo on February 05, 2015, 01:27:22 pm
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.
Title: Re: Volume And Peg Question
Post by: emski on February 05, 2015, 02:10:03 pm
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 ?
Title: Re: Volume And Peg Question
Post by: Frodo on February 05, 2015, 04:00:27 pm
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.
Title: Re: Volume And Peg Question
Post by: emski on February 05, 2015, 04:04:09 pm
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.
Title: Re: Volume And Peg Question
Post by: fluxer555 on February 05, 2015, 09:44:58 pm
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.
Title: Re: Volume And Peg Question
Post by: emski on February 05, 2015, 10:11:46 pm
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.
Title: Re: Volume And Peg Question
Post by: fluxer555 on February 05, 2015, 10:49:15 pm
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.
Title: Re: Volume And Peg Question
Post by: emski on February 05, 2015, 10:55:19 pm
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.