BitShares Forum

Main => General Discussion => Topic started by: bytemaster on August 28, 2014, 06:42:20 pm

Title: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 06:42:20 pm
I just want to make it clear that we will use price feeds if necessary to establish the peg.

BitUSD will eventually get to USD parity because otherwise this network will be worthless.

Delegates, please publish price feeds for USD just in case.   I think we may need slightly stronger training wheels. 

Those who buy USD will eventually see your gain to parity.

We have many tools at our disposal to make this happen.

 
Title: Re: One way or another the PEG will be established...
Post by: xeroc on August 28, 2014, 06:45:00 pm
We have many tools at our disposal to make this happen.
On the one hand I am excited to see all of those .. on the other I hope we won't need all of those :)
Title: Re: One way or another the PEG will be established...
Post by: puppies on August 28, 2014, 06:45:56 pm
Published.  Also I heard Xeroc had a way to autopublish if the price swings +/- 5%.  Can anyone shed any light on that?
Title: Re: One way or another the PEG will be established...
Post by: xeroc on August 28, 2014, 07:03:48 pm
Published.  Also I heard Xeroc had a way to autopublish if the price swings +/- 5%.  Can anyone shed any light on that?
not me .. must be someone else ..

bitsuperlab has a update script .. but that is more of a cronjob afaik
https://github.com/Bitsuperlab/operation_tools/tree/master/btsxfeed

//edit: was wrong ... alt made that tool .. checks for +-5%
https://bitsharestalk.org/index.php?topic=7787.0
Title: Re: One way or another the PEG will be established...
Post by: puppies on August 28, 2014, 07:06:59 pm
Thanks Xeroc.

And thanks Alt if you are reading this.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 07:43:53 pm
The primary tool we have at our disposal is to implement a market maker algorithm into the blockchain based upon the median feeds of the delegates.

It would automatically buy BitUSD at .95 and sell BitUSD at 1.05 and then we would limit shorts to 1.05. 

The impact this would have on the network:
1) When demand to sell BitUSD is high the network is buying at .95 with new BTSX
2) Shorts would be unable to sell at .95... so they would have to first buy at 1.05
3) This establishes a 10% initial fee for any shorts and gives longs a priority in selling.
4) As the price fluctuates between those who want into or out of BitUSD the network makes money.

The network will end up with USD on its balance sheet proportional to the "surplus short demand" and the XTS created to buy this USD is actually locked away in the collateral of the shorts.   Thus we can safely say that printing XTS to perform this market making algorithm will not create additional XTS in circulation. 

We can quibble about the spread.

This process would function much like it does today except it would make the "shareholders" more money from the built in arbitrage bot.  The built in "bot" doesn't need to predict which way the price will ultimately go... only that it will eventually change directions.   

What is the risk from running this BOT on the network?  Little that I can see right now.


1) An attacker could print USD at will provided they were willing to buy at 1.05... but they would only be able to sell back at .95 unless there was real demand.
2) An attacker would be unable to print arbitrary XTS because they would have to buy BitUSD high and then tie up the XTS in the collateral and their USD would only have guaranteed demand at .95 so when they "cover" they would get back less than they started with.

The primary down side is the requirement of a price feed.  I think if you start the BOT off with wide market maker functionality, that eventually other players will enter the market and provide tighter market maker functionality at which point in time the "feed" almost never factors into the equation.   

If this is what it takes to bootstrap the peg I am willing to do it.   Thoughts?
Title: Re: One way or another the PEG will be established...
Post by: xeroc on August 28, 2014, 07:46:40 pm
s/XTS/BTSX/g

a built in arb bot .. that sounds interesting... need to think about it
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 07:49:59 pm
I get an assert exception trying to publish  feed.
Title: Re: One way or another the PEG will be established...
Post by: dominic on August 28, 2014, 07:56:09 pm
Since 0.4.9, I've been completely unable to access the BitUSD market... I can only guess as to what is happeing, but it sounds like BitUSD is getting heavily shorted. (Edit: with 0.4.9-a I was able to view the markets again.)

I have a possible explanation: It would appear the BTSX market has bottomed, and many traders feel that a strong rebound in price is now imminent. The Chinese have been calling for 0.18 CNY for days, and their target has finally been hit. It's an important technical level, and strong support has been shown. It seems to me that traders with a high level of confidence in a large price increase seem determined to short at almost any price, and people just can't place bids fast enough to keep up with it. We just don't have enough players in the game -- yet.

It's speculation of course, but I wanted to mention this so that people can see there isn't necessarily anything "wrong" with the way the market is operating -- we just need more people to be active in this market. This doesn't happen overnight, especially with the technical issues we've seen. With more participants, I can't see why the peg wouldn't hold.

After the wallet is working better, I am sure all will be well in time. I have every bit of confidence that these bugs in the wallet will be ironed out, so I'm not too concerned about that.
Title: Re: One way or another the PEG will be established...
Post by: BldSwtTrs on August 28, 2014, 07:59:49 pm
The primary down side is the requirement of a price feed.
Why is this a downside? I mean why having a price feed is bad per se?
Title: Re: One way or another the PEG will be established...
Post by: MolonLabe on August 28, 2014, 08:01:06 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 08:01:21 pm
Since 0.4.9, I've been completely unable to access the BitUSD market... I can only guess as to what is happeing, but it sounds like BitUSD is getting heavily shorted.

I have a possible explanation: It would appear the BTSX market has bottomed, and many traders feel that a strong rebound in price is now imminent. The Chinese have been calling for 0.18 CNY for days, and their target has finally been hit. It's an important technical level, and strong support has been shown. It seems to me that traders with a high level of confidence in a large price increase seem determined to short at almost any price, and people just can't place bids fast enough to keep up with it. We just don't have enough players in the game -- yet.

It's speculation of course, but I wanted to mention this so that people can see there isn't necessarily anything "wrong" with the way the market is operating -- we just need more people to be active in this market. This doesn't happen overnight, especially with the technical issues we've seen. With more participants, I can't see why the peg wouldn't hold.

After the wallet is working better, I am sure all will be well in time. I have every bit of confidence that these bugs in the wallet will be ironed out, so I'm not too concerned about that.

For sure, the wallet issus are affecting the market.  Not sure if it should really be operating when it seems that many people can't access it.  I was using it all the time but have spent the last day it seems trying to get a working wallet.  0.4.9a is still 17 days behind and going SLOW and crashes when I try to do things in the console or check my delegate...Can't be surprised to see perverse effects as a result.  My only question is if this is an accident or part of someone's plan?  I also see some perverse pricing in bter. 

When you spend time trying to move in and out out BTSX, BitUSD and BTC or USD, you eventually feel like you are moving in a circle.  That's why we need to get stable and in more exchanges so that there are more options for people.  "One" can only control so many things.  Easiest if you are limited in your options.

Either the testing and/or change/release mgmt. is bad or maybe there is something intentional going on.  Maybe the market should be paused?
Title: Re: One way or another the PEG will be established...
Post by: oldman on August 28, 2014, 08:03:16 pm
The primary tool we have at our disposal is to implement a market maker algorithm into the blockchain based upon the median feeds of the delegates.

It would automatically buy BitUSD at .95 and sell BitUSD at 1.05 and then we would limit shorts to 1.05. 

The impact this would have on the network:
1) When demand to sell BitUSD is high the network is buying at .95 with new BTSX
2) Shorts would be unable to sell at .95... so they would have to first buy at 1.05
3) This establishes a 10% initial fee for any shorts and gives longs a priority in selling.
4) As the price fluctuates between those who want into or out of BitUSD the network makes money.

The network will end up with USD on its balance sheet proportional to the "surplus short demand" and the XTS created to buy this USD is actually locked away in the collateral of the shorts.   Thus we can safely say that printing XTS to perform this market making algorithm will not create additional XTS in circulation. 

We can quibble about the spread.

This process would function much like it does today except it would make the "shareholders" more money from the built in arbitrage bot.  The built in "bot" doesn't need to predict which way the price will ultimately go... only that it will eventually change directions.   

What is the risk from running this BOT on the network?  Little that I can see right now.


1) An attacker could print USD at will provided they were willing to buy at 1.05... but they would only be able to sell back at .95 unless there was real demand.
2) An attacker would be unable to print arbitrary XTS because they would have to buy BitUSD high and then tie up the XTS in the collateral and their USD would only have guaranteed demand at .95 so when they "cover" they would get back less than they started with.

The primary down side is the requirement of a price feed.  I think if you start the BOT off with wide market maker functionality, that eventually other players will enter the market and provide tighter market maker functionality at which point in time the "feed" almost never factors into the equation.   

If this is what it takes to bootstrap the peg I am willing to do it.   Thoughts?

I think this would be a desirable feature; as the Bitshares ecosystem grows there will be many illiquid/thinly traded assets that would benefit from an automated/benevolent arb bot. Should expedite the bootstrapping process.

Plus, revenue.

My vote is to implement and see if it helps or hinders the market.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:03:21 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.

:(  that is an interesting point of view... and I see your parallels.
Title: Re: One way or another the PEG will be established...
Post by: liondani on August 28, 2014, 08:04:13 pm
I get an assert exception trying to publish  feed.

as I see your delegate is not active... thats why.... (it is standby) :(
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:05:00 pm
The primary down side is the requirement of a price feed.
Why is this a downside? I mean why having a price feed is bad per se?

It is a point of control, requires an external price source, it is not market based....
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 08:07:22 pm
I get an assert exception trying to publish  feed.

as I see your delegate is not active... thats why.... (it is standby) :(

Strange.  Not sure why.  Maybe BM can get me back in.
Title: Re: One way or another the PEG will be established...
Post by: jakub on August 28, 2014, 08:11:38 pm
It would automatically buy BitUSD at .95 and sell BitUSD at 1.05 and then we would limit shorts to 1.05. 

When you say "buy BitUSD at .95" you mean "buy BitUSD at 95% of the market price provided by the feed", right?
Title: Re: One way or another the PEG will be established...
Post by: oco101 on August 28, 2014, 08:13:53 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.

:(  that is an interesting point of view... and I see your parallels.

Well if the whole system depend on it !!!  So be it !! Sometimes tyranny do wonders.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:18:36 pm
It would automatically buy BitUSD at .95 and sell BitUSD at 1.05 and then we would limit shorts to 1.05. 

When you say "buy BitUSD at .95" you mean "buy BitUSD at 95% of the market price provided by the feed", right?

Right... buy at .95 BitUSD per USD   
Title: Re: One way or another the PEG will be established...
Post by: emski on August 28, 2014, 08:26:28 pm
Why not just hardcode max/min buy price for bitUSD 0.95 and 1.05 based on feeds ?
Any block including transaction not satisfying the above rule is invalid.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:30:02 pm
Why not just hardcode max/min buy price for bitUSD 0.95 and 1.05 based on feeds ?
Any block including transaction not satisfying the above rule is invalid.

Price can change "after the fact" and that kind of filtering would just close the market.
Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 08:32:34 pm
Seriously, this is not the right way to do things...  What is the flaw or what is wrong with my proposal?!
Title: Re: One way or another the PEG will be established...
Post by: emski on August 28, 2014, 08:33:02 pm
Why not just hardcode max/min buy price for bitUSD 0.95 and 1.05 based on feeds ?
Any block including transaction not satisfying the above rule is invalid.

Price can change "after the fact" and that kind of filtering would just close the market.
Its a single block. It is either valid or not. If the transaction cannot be included => the user should retry.
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 08:33:47 pm
I'm just trying to wonder how all these price controls will help once your BitUSD escapes into the wild, exchanges, businesses etc...won't any discount/premium just be transferred their if it's controlled within BitShares?
Title: Re: One way or another the PEG will be established...
Post by: Gentso1 on August 28, 2014, 08:42:51 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.

:(  that is an interesting point of view... and I see your parallels.

I am for the feed and against the network owned arb bot. Its a free market and this would be a bad step. The whole, is it ok to do bad things for the greater good kind of thing, their has to be another way. Why not just use the feed and let the market decide the value of bitUSD
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 08:46:53 pm
Is their a real-world equivalent of this bot?  Not being that knowledgeable about exchanges and market, it might be more palatable if there is an existing exchange function in the real world performing the equivalent function that you could explain. To the lay it just sounds like price controls.

Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:47:02 pm
Why not just hardcode max/min buy price for bitUSD 0.95 and 1.05 based on feeds ?
Any block including transaction not satisfying the above rule is invalid.

Price can change "after the fact" and that kind of filtering would just close the market.
Its a single block. It is either valid or not. If the transaction cannot be included => the user should retry.

I mean you include a bid... it doesn't get matched.. price goes up.. bid is now out of range.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:51:42 pm
Is their a real-world equivalent of this bot?  Not being that knowledgeable about exchanges and market, it might be more palatable if there is an existing exchange function in the real world performing the equivalent function that you could explain. To the lay it just sounds like price controls.

The real world equivalent of this bot is what provides the ultimate peg for BitUSD to USD.   I would gladly run such a bot myself, but these bots require capital and early on no one wants to take the risk.    Coding something into the network that we expect people outside the network to do merely provides liquidity and enforces the peg.  If you do it right the market maker in the network would eventually no longer be competitive with the market makers outside the network and thus its price targets would never get hit. 

In fact you could "pretend" such a market maker exists right now with a spread that is wider than the current BitUSD/USD peg.  It hasn't hit so you don't even see its involvement.    So all we are ultimately talking about is decreasing the spread of the current "imaginary" market maker.
Title: Re: One way or another the PEG will be established...
Post by: emski on August 28, 2014, 08:51:52 pm

I mean you include a bid... it doesn't get matched.. price goes up.. bid is now out of range.

Still valid. Invalid is matching of such bid in a block BEFORE another price change makes it valid again.
This should be equivalent of saying: BitUSD can be traded in 0.95 1.05 range on this chain. Nothing else.
UPDATE: And by saying I mean enforcing.
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 08:54:24 pm
Is their a real-world equivalent of this bot?  Not being that knowledgeable about exchanges and market, it might be more palatable if there is an existing exchange function in the real world performing the equivalent function that you could explain. To the lay it just sounds like price controls.

The real world equivalent of this bot is what provides the ultimate peg for BitUSD to USD.   I would gladly run such a bot myself, but these bots require capital and early on no one wants to take the risk.    Coding something into the network that we expect people outside the network to do merely provides liquidity and enforces the peg.  If you do it right the market maker in the network would eventually no longer be competitive with the market makers outside the network and thus its price targets would never get hit. 

In fact you could "pretend" such a market maker exists right now with a spread that is wider than the current BitUSD/USD peg.  It hasn't hit so you don't even see its involvement.    So all we are ultimately talking about is decreasing the spread of the current "imaginary" market maker.

What I meant was is their something or someone performing this function in other exchanges?  Like the stock exchange etc..?
Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 08:54:50 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.

:(  that is an interesting point of view... and I see your parallels.

I am for the feed and against the network owned arb bot. Its a free market and this would be a bad step. The whole, is it ok to do bad things for the greater good kind of thing, their has to be another way. Why not just use the feed and let the market decide the value of bitUSD
+5% no arb bot needed.
USE THE FEED TO LIMIT VALID SHORTS TO ONLY ABOVE THE FEED.  No 95-105% range and no arb bot is needed.
Sometimes I don't know how you guys come up with this stuff and start wasting time on it before thinking it through.  Sorry for being annoyed.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 08:56:08 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.

:(  that is an interesting point of view... and I see your parallels.

I am for the feed and against the network owned arb bot. Its a free market and this would be a bad step. The whole, is it ok to do bad things for the greater good kind of thing, their has to be another way. Why not just use the feed and let the market decide the value of bitUSD
+5% no arb bot needed.
USE THE FEED TO LIMIT VALID SHORTS TO ONLY ABOVE THE FEED.  No 95-105% range and no arb bot is needed.
Sometimes I don't know how you guys come up with this stuff and start wasting time on it before thinking it through.  Sorry for being annoyed.

Perhaps we are just thinking it through in public for the point of discussion. 
Title: Re: One way or another the PEG will be established...
Post by: Shentist on August 28, 2014, 09:00:59 pm
don't hurry. it is to early to make a decision.

it is normal that in the beginning every one expects that btsx is rising, but maybe in the future everything will balance out. the importent thing is - 1 bitUSD == 1 USD
Title: Re: One way or another the PEG will be established...
Post by: emski on August 28, 2014, 09:01:31 pm
USE THE FEED TO LIMIT VALID SHORTS TO ONLY ABOVE THE FEED.

Reasonable.

And now the next issue:
Feeds. Can a few delegates manipulate it ?
Title: Re: One way or another the PEG will be established...
Post by: bobmaloney on August 28, 2014, 09:05:23 pm
bitUSD is still very new, as long as the peg is stable, a properly functioning peg should include a discount on bitUSD vs. USD.
Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 09:05:49 pm
USE THE FEED TO LIMIT VALID SHORTS TO ONLY ABOVE THE FEED.

Reasonable.

And now the next issue:
Feeds. Can a few delegates manipulate it ?
It's quite difficult to manipulate a median.  Delegates are elected based on convincing everyone that they are trustworthy.  Everything is done in the open and very much subject to scrutiny and audit.  Virtually impossible to pull off profitable funny business without being caught and voted out.  I have no problem with the feed and I think it will get more accurate and reliable with time.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 09:11:20 pm
don't hurry. it is to early to make a decision.

it is normal that in the beginning every one expects that btsx is rising, but maybe in the future everything will balance out. the importent thing is - 1 bitUSD == 1 USD

Yep... the price is holding up fairly well thus far. 
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 09:15:23 pm
don't hurry. it is to early to make a decision.

it is normal that in the beginning every one expects that btsx is rising, but maybe in the future everything will balance out. the importent thing is - 1 bitUSD == 1 USD

Yep... the price is holding up fairly well thus far.

BM, can you answer my question about whether there is an equivalent thing or person that performs the function of the arb bot that you described, as part of the structure of the stock market other than just traders?  This is for my education please.
Title: Re: One way or another the PEG will be established...
Post by: emski on August 28, 2014, 09:15:30 pm
With the whole market price depending on a feed but not on depth this might allow a few delegates to slightly manipulate the price which will allow someone with large capital to abuse the market. I also think this is not a significant problem for now but it could be exploited.
Title: Re: One way or another the PEG will be established...
Post by: emski on August 28, 2014, 09:16:44 pm
And running such bot looks just like subsidizing the bitUSD.
Title: Re: One way or another the PEG will be established...
Post by: Shentist on August 28, 2014, 09:23:23 pm
i think the short seller is in a really good position

- on a normal exchange i would have to pay a premium
- today in BTSX at the current prices i also pay a premium to the long side

- if i want stability it is a really good price to buy bitUSD for 27. at the current market cap i should pay more like 31. but not to much people will do it because no one is scared to loose the money. i a pretty sure when BTSX growth it will not a problem at all because now, people have more money at stake and want to hedge more. now everyone wants to maximize the expected rise in value and throws safty measures away.

did you consider to force the short seller to cover after x days? say as a shortseller i have to cover after x days. maybe make it flexible. if the peg is holding increase the days or decrease it like in this enviroment. so we could get more liquidity on the bid side who should force the price near the peg. 

maybe just a needed function in the beginning.

what i like to see is not a feed but maybe the ratio from coinmarketcap "31 BTS a USD Dollar on Coinmarketcap" so everyone could faster realize that the paid price now is not a normal price.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 09:24:40 pm
Quote
BM, can you answer my question about whether there is an equivalent thing or person that performs the function of the arb bot that you described, as part of the structure of the stock market other than just traders?  This is for my education please.

As part of the structure of a "market" not that I am aware, but I think you can view it like a business.

We all know that if the market peg holds then every deviation from the peg is a profit opportunity.  We all expect someone to perform the role of providing liquidity.  How do we expect these individuals to do that job?   If a DAC hard-codes business rules into a blockchain, and we all know that providing liquidity is a profit generating business, then we can encode the same rules that a trader would execute into a blockchain and the network can make money the same way.

The benefit a trader has is they can maintain a dynamic spread, increasing/decreasing as necessary to account for volatility.  I think that if you hard-code a bot with very wide buy/sell prices around a trusted feed then the bot would almost never execute, but everyone would "feel better" just knowing it is there to back things up.
Title: Re: One way or another the PEG will be established...
Post by: Empirical1 on August 28, 2014, 09:26:37 pm
I'm not against using price feeds as long as those price feeds are 'decentralised' and it is hard to manipulate. I think the mainstream will be fine with that. Fantastic if it gets us to a close to USD more stable peg quicker.

As for the other stuff, not that I understand everything, but if it's possible to implement Agent86 suggestion of limiting the shorting above the peg and see how that works.

I don't know if this is a factor but for the arb bot or even price feeds, the only problem I can think of is that sometimes the official price is different to the black market price. Like in Argentina there is an official exchange rate of the peso to the dollar but a different black market rate. So using the official feed & or arb bot may be bad. It's possible that could happen to major western currencies too.
Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 09:28:20 pm
With the whole market price depending on a feed but not on depth this might allow a few delegates to slightly manipulate the price which will allow someone with large capital to abuse the market. I also think this is not a significant problem for now but it could be exploited.
Keep in mind that all trades are entered into voluntarily by two parties taking opposite sides.  If you didn't want to short at that price, you didn't have to.  If you didn't want to buy at that price, you didn't have to.  You can short below the feed price and it becomes immediately valid if the feed drops.  Any delegate providing an inaccurate feed is easy to spot.

BM do you have a particular reason to suspect my proposal wouldn't keep the peg?
Title: Re: One way or another the PEG will be established...
Post by: toast on August 28, 2014, 09:30:24 pm
You can still short below the peg, it just costs a premium. You can match your own short and sell undervalued. I think all this is doing is forcing shorts to say "oh, I am effectively paying a 10% fee? I didn't want that!". I think BitUSD will still be undervalued.
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 09:32:48 pm
Quote
BM, can you answer my question about whether there is an equivalent thing or person that performs the function of the arb bot that you described, as part of the structure of the stock market other than just traders?  This is for my education please.

As part of the structure of a "market" not that I am aware, but I think you can view it like a business.

We all know that if the market peg holds then every deviation from the peg is a profit opportunity.  We all expect someone to perform the role of providing liquidity.  How do we expect these individuals to do that job?   If a DAC hard-codes business rules into a blockchain, and we all know that providing liquidity is a profit generating business, then we can encode the same rules that a trader would execute into a blockchain and the network can make money the same way.

The benefit a trader has is they can maintain a dynamic spread, increasing/decreasing as necessary to account for volatility.  I think that if you hard-code a bot with very wide buy/sell prices around a trusted feed then the bot would almost never execute, but everyone would "feel better" just knowing it is there to back things up.

Thank you because it sounds like the bot would be performing a little bit like a market maker in the stock market but I'm not that clear on it all.  I do have a concern about what good it would do given that we expect to have other markets/exchanges.  If their is a demand for the pricing/transaction that we we are trying to limit, it may just move elsewhere.  Maybe that's okay or maybe it's not.  Just something to consider.

Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 09:33:27 pm
You can still short below the peg, it just costs a premium. You can match your own short and sell undervalued. I think all this is doing is forcing shorts to say "oh, I am effectively paying a 10% fee? I didn't want that!". I think BitUSD will still be undervalued.
You can't match your own short.  This is not allowed by the system.  The system matches every buy order with the lowest price sell order.
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 09:34:07 pm
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   

Title: Re: One way or another the PEG will be established...
Post by: tonyk on August 28, 2014, 09:37:24 pm
BM:The network will end up with USD on its balance sheet proportional to the "surplus short demand" and the XTS created to buy this USD is actually locked away in the collateral of the shorts.   Thus we can safely say that printing XTS to perform this market making algorithm will not create additional XTS in circulation. 

What happened? Did you get inspired from the way Ripple increased their market cap, by increasing but not really the # of shares in circulation?

Are you doing this bot, right way, as in now?
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 09:38:25 pm
You can still short below the peg, it just costs a premium. You can match your own short and sell undervalued. I think all this is doing is forcing shorts to say "oh, I am effectively paying a 10% fee? I didn't want that!". I think BitUSD will still be undervalued.
You can't match your own short.  This is not allowed by the system.  The system matches every buy order with the lowest price sell order.

You can match your own short... you just have to buy up the order book first :)

FYI... I appreciate your feedback and challenges.  They help strengthen everyone here.
Title: Re: One way or another the PEG will be established...
Post by: GaltReport on August 28, 2014, 09:38:46 pm
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   

what happens if you publish a feed but don't update it?
Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 09:40:18 pm
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   
+5%  If I'm understanding this right than this is good. 

I don't think we necessarily need to be in a rush to open up a new bitasset.
Title: Re: One way or another the PEG will be established...
Post by: Agent86 on August 28, 2014, 09:41:44 pm
You can still short below the peg, it just costs a premium. You can match your own short and sell undervalued. I think all this is doing is forcing shorts to say "oh, I am effectively paying a 10% fee? I didn't want that!". I think BitUSD will still be undervalued.
You can't match your own short.  This is not allowed by the system.  The system matches every buy order with the lowest price sell order.

You can match your own short... you just have to buy up the order book first :)

FYI... I appreciate your feedback and challenges.  They help strengthen everyone here.
thanks
Title: Re: One way or another the PEG will be established...
Post by: bytemaster on August 28, 2014, 09:42:42 pm
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   

what happens if you publish a feed but don't update it?
All feeds expire after 24 hours
Title: Re: One way or another the PEG will be established...
Post by: okidoki on August 28, 2014, 10:04:12 pm
From libertarianism to democracy to oligarchy to tyranny, even faster than I expected.

:(  that is an interesting point of view... and I see your parallels.

I am for the feed and against the network owned arb bot. Its a free market and this would be a bad step. The whole, is it ok to do bad things for the greater good kind of thing, their has to be another way. Why not just use the feed and let the market decide the value of bitUSD
+5% no arb bot needed.
USE THE FEED TO LIMIT VALID SHORTS TO ONLY ABOVE THE FEED.  No 95-105% range and no arb bot is needed.
Sometimes I don't know how you guys come up with this stuff and start wasting time on it before thinking it through.  Sorry for being annoyed.

Exactly! No price controls, no arb bot with newly created shares. bitUSD is part of a prediction market and therefor surely only has to track the price more or less of the underlying asset. If the USD doubles compared to bitShares, than I am fine if I get more or less double the bitSHares... this can be done at 5 bitUSD per USD or 1 bitUSD per USD... as long as the percentage evolution stays the same it works for me...
Title: Re: One way or another the PEG will be established...
Post by: okidoki on August 28, 2014, 10:27:13 pm
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   

This looks acceptable to me in order to prevent rampant manipulation because of the thin orderdepth yet. How would you call the new "bitUSD-short pegged" and "bitUSD-market unlimited"? Also, in which version will this be included, I suppose the delegates and users will have to download a new version, for example 0.5.0 first, right?
Title: Re: One way or another the PEG will be established...
Post by: robrigo on August 28, 2014, 11:08:21 pm
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   

This looks acceptable to me in order to prevent rampant manipulation because of the thin orderdepth yet. How would you call the new "bitUSD-short pegged" and "bitUSD-market unlimited"? Also, in which version will this be included, I suppose the delegates and users will have to download a new version, for example 0.5.0 first, right?

I think BM was referring to bitBTC or bitCNY as the second asset, not 2 separate versions of bitUSD.
Title: Re: One way or another the PEG will be established...
Post by: gulu on August 28, 2014, 11:13:03 pm
This would be a short-term solution. Not a neat one though. I made a proposal for a long-term solution. Your thoughts are appreciated.
https://bitsharestalk.org/index.php?topic=7865.0
Title: Re: One way or another the PEG will be established...
Post by: gulu on August 28, 2014, 11:14:33 pm
Also, this short term solution would potentially print more BTSX, if the price of BTSX does increase as the shorts wishes.
Title: Re: One way or another the PEG will be established...
Post by: luckybit on August 28, 2014, 11:51:53 pm
The primary tool we have at our disposal is to implement a market maker algorithm into the blockchain based upon the median feeds of the delegates.

It would automatically buy BitUSD at .95 and sell BitUSD at 1.05 and then we would limit shorts to 1.05. 

The impact this would have on the network:
1) When demand to sell BitUSD is high the network is buying at .95 with new BTSX
2) Shorts would be unable to sell at .95... so they would have to first buy at 1.05
3) This establishes a 10% initial fee for any shorts and gives longs a priority in selling.
4) As the price fluctuates between those who want into or out of BitUSD the network makes money.

The network will end up with USD on its balance sheet proportional to the "surplus short demand" and the XTS created to buy this USD is actually locked away in the collateral of the shorts.   Thus we can safely say that printing XTS to perform this market making algorithm will not create additional XTS in circulation. 

We can quibble about the spread.

This process would function much like it does today except it would make the "shareholders" more money from the built in arbitrage bot.  The built in "bot" doesn't need to predict which way the price will ultimately go... only that it will eventually change directions.   

What is the risk from running this BOT on the network?  Little that I can see right now.


1) An attacker could print USD at will provided they were willing to buy at 1.05... but they would only be able to sell back at .95 unless there was real demand.
2) An attacker would be unable to print arbitrary XTS because they would have to buy BitUSD high and then tie up the XTS in the collateral and their USD would only have guaranteed demand at .95 so when they "cover" they would get back less than they started with.

The primary down side is the requirement of a price feed.  I think if you start the BOT off with wide market maker functionality, that eventually other players will enter the market and provide tighter market maker functionality at which point in time the "feed" almost never factors into the equation.   

If this is what it takes to bootstrap the peg I am willing to do it.   Thoughts?

I'm all for this 100%. Please make it so that the bot can be easily extended/updated via a scripting language, repurposed, etc in the Bitshares toolkit. I can see a lot of areas where we'll want automation or bot like functionality but this is clearly the place we need it right now.

Title: Re: One way or another the PEG will be established...
Post by: chono on August 29, 2014, 12:33:22 am

Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   

+5%especially the second rule is excellent,has enough flexibility and gives everyone the rights to choose.this may build the perfect system.




从我的 iPad 发送,使用 Tapatalk
Title: Re: One way or another the PEG will be established...
Post by: tonyk on August 29, 2014, 01:51:50 am
I just want to make it clear that we will use price feeds if necessary to establish the peg.

I have always been aware of that, and believed strongly that we must go to plan B, only if necessary.

BitUSD will eventually get to USD parity because otherwise this network will be worthless.

On the other hand, the network will be worth as much as it is worth. Making unnecessary restrictions will make it worth as much as if those restriction were necessary.

The network will end up with USD on its balance sheet proportional to the "surplus short demand" and the XTS created to buy this USD is actually locked away in the collateral of the shorts.   Thus we can safely say that printing XTS to perform this market making algorithm will not create additional XTS in circulation. 

One of the main points is that actually the new BTSX are NOT locked as collateral.

The main difference between this proposed system and the market can be summarized as follows:
When short are offering cheap dollars they provide collateral for those new bitUSDs. The market will punish them if this is unwise decision. If you think those are unwise choices on their part go ahead and buy cheap bitUSD (vote with your money, not with your power to take whatever decision will solve your perceived problem).

In you system you fix the price of the bitUSD to no less than 0.95 USD. You prevent the shorts from making informed economic decisions. The only actors left with this choice are the USD sellers. They think/believe bitUSD is worth less than 0.95 USD -I am selling. And you hope the way to solve this is to buy from those sellers, print more money (BTSX) diluting the backing of the bitUSD in existence? … and hoping that this will make reasonably acting market participant  think that their dollars are worth more ... Good Luck...


In short one bitUSD will be worth one USD when its utility is one USD. We might eventually need to make the system less valuable to provide the bitUSD peg, with measures similar to the one proposed but let's not destroy something potentially great by jumping to too quick conclusions.
Title: Re: One way or another the PEG will be established...
Post by: tonyk on August 29, 2014, 02:08:26 am
... continueed
Let me quote you from where you were right:

Agent86, I know you are very passionate and bright guy who has convinced me of things in the past (like the approval voting) but I think you are entirely wrong in your assessment.

If we limit shorts then you are resorting to price fixing.  The peg is supposed to have some variance based upon supply and demand and I think you are judging the system entirely too soon.  Right now the demand for BitUSD is low and the demand for leverage is high and overall risk is high.  We will see what happens and monitor the correlation in price movement.

In your limit scenario I can see some benefits... you reduce selling pressure below the price feed.  This would give USD sellers a priority over shorts which in turn would help make USD more liquid.   But right now USD is liquid at a price that is correlated to USD.  But this introduces a requirement for a price feed and the purpose of this experiment is to attempt something without a price feed.

I think you are being alarmist.

If the network is the USD Buyer of Last Resort and buys it at a price of 10% below the price feed and sells it at 1% below the price feed... it would end up "printing XTS" to buy the USD and burning it when it sells the USD.   High demand to short USD would result in the network buying it up with inflation and then selling it back at a profit resulting in long-term deflation.    In this case 100% of the "inflation" would be locked in collateral of the short position.   
Title: Re: One way or another the PEG will be established...
Post by: alt on August 29, 2014, 02:11:27 am
Here is what I have implemented as an intermediate step:

1) If delegates publish a feed, then the feed will be used rather than the average.  In this way if there is a service interruption on the feed, then the network can still function like it does today.

2) This puts the "shareholders" in control over whether to use feed or average.

3) I have restricted the creation/execution of new shorts to the median / average price.

Result... those who have USD have priority in selling over those who would like to short.   This adds liquidity for those with USD by removing competition from those looking to short. 

Next we are going to open up a second bitasset so that "short demand" can spread between two BitAssets and the bitassets can trade against one another. 

I believe this should implement your proposal without the arb. bot.   
how about use the  minimum price with average and median from feed?
this can avoid delegate set a very higher feed price
and we don't need to wait 101 feed, maybe 51 is enough