BitShares Forum

Main => General Discussion => Topic started by: bytemaster on August 08, 2014, 06:58:24 pm

Title: BitShares X Market Rules - DRAFT
Post by: bytemaster on August 08, 2014, 06:58:24 pm
The purpose of this thread is to discuss the market rules that we have implemented and their implications.

General Principle:  Everyone should get what they ask for and nothing more. 

For BitUSD there are 3 basic market operations:

Buy XTS with USD    - requires you to have USD and place a bid to receive XTS
Ask USD for XTS      - requires you to have XTS that you are attempting to sell for USD
Short USD with XTS  - requires you to have XTS and place a bid for XTS.   

When your Short bid is matched, the XTS from the SHORT and XTS from the ASK are placed into collateral for the creation of a COVER order for USD issued.

Before any Short orders may be entered 25 delegates must be publishing a price feed that is less than 24 hours old
All short bids must be less than 1.33x the median delegate price feed.

Before any orders execute the market must meet the following conditions:
   2 million XTS must be present in ASK orders
   2 million XTS must be present in SHORT orders
   This condition must also hold true AFTER all orders have matched.

When 3/4 of the collateral or more is required to buy back the USD owed on a COVER order, the market accepts the highest bids until all USD is paid back.  Best case 1/4 * 95% is returned to the owner of the COVER order and 1/4*5% is paid as fees to the network.   Worst case the XTS held as collateral is insufficient to buy back all the USD.

When a COVER order lacks sufficient XTS all trades stop until someone sells their USD at the cover price. 

No Margin Calls are executed at a price below .66 * the median delegate price feed.  Trades will continue but the cover will wait until the price feed falls.

While the BitAsset is boot-strapped with price feeds, it is envisioned that the price feed can be replaced with a 24 hour moving average.   

To cover a short position, you must first BUY USD on the market and then send it to your short position to free the collateral.

In the event that order matching results in your order balance being so small that when you multiply it by your order price you get 0, then your remaining balance "dust" is counted as fees charged. 

 
Title: Re: BitShares X Market Rules - DRAFT
Post by: profitofthegods on August 08, 2014, 07:31:56 pm
When someone shorts USD then a BitUSD is lent to them, right? But the idea is they do this to sell the USD for XTS and buy it back later, right? If so my only question is this: is the BitUSD paid to that person for them to sell on the market themselves or does the process involve it being automatically sold for them?
Title: Re: BitShares X Market Rules - DRAFT
Post by: sfinder on August 08, 2014, 07:43:31 pm
while BM was busy on setting up  Market Rules, we got the first business completed  in btsx ..... :P :P :P +5% +5% +5%


The first  international order for "Tampax tampons" was completed by using btsx on 08/08/14 between "BTS熊 "(china) and Germany provider "William" . this order includes 4 packs of  "Tampax tampons"/10 bag MERZ Mask / weleda shower Gel / Cream and is ready for shipping. "BTS熊 " is so excited for his order which was first time been completed in human-being's history  by using btsx. The total amount of this order is 7,119btsx. I guess it must be the most expensive "Tampax tampons" if we go back to read this post 2 years later. "BTS熊 "'s girlfriend must be the most happy woman in the world. +5% +5% +5% +5% :P :P :P :P :P :P


(http://ww3.sinaimg.cn/mw1024/d15bdcc8gw1ej5r42fstcj20ma038t90.jpg)
trade record screen shot


(http://i.imgur.com/WeGTG0O.jpg?1)
Title: Re: BitShares X Market Rules - DRAFT
Post by: HackFisher on August 08, 2014, 07:45:56 pm
When someone shorts USD then a BitUSD is lent to them, right? But the idea is they do this to sell the USD for XTS and buy it back later, right? If so my only question is this: is the BitUSD paid to that person for them to sell on the market themselves or does the process involve it being automatically sold for them?

I think if that person need to hold the BitUSD for a while and sell on the market themselves. He can achieve this by placing short orders and ask orders the same time, you need to double collaterals to create BitUSD at current market price anyway.
Title: Re: BitShares X Market Rules - DRAFT
Post by: bytemaster on August 08, 2014, 07:50:18 pm
When someone shorts USD then a BitUSD is lent to them, right? But the idea is they do this to sell the USD for XTS and buy it back later, right? If so my only question is this: is the BitUSD paid to that person for them to sell on the market themselves or does the process involve it being automatically sold for them?

USD is lent/sold in one operation.
Title: Re: BitShares X Market Rules - DRAFT
Post by: profitofthegods on August 08, 2014, 07:56:53 pm
When someone shorts USD then a BitUSD is lent to them, right? But the idea is they do this to sell the USD for XTS and buy it back later, right? If so my only question is this: is the BitUSD paid to that person for them to sell on the market themselves or does the process involve it being automatically sold for them?

USD is lent/sold in one operation.

Oh good, that avoids having to worry about losses due to price fluctuations betwen opening the short and completing it by selling the USD. Very excited to have a play with this!
Title: Re: BitShares X Market Rules - DRAFT
Post by: Ggozzo on August 08, 2014, 08:58:24 pm
Will there be specifics direction on how to publish a price feed? Is it just a matter of getting API from bter or btc38?
Title: Re: BitShares X Market Rules - DRAFT
Post by: tonyk on August 08, 2014, 08:59:30 pm

I think if that person need to hold the BitUSD for a while and sell on the market themselves. He can achieve this by placing short orders and ask orders the same time, you need to double collaterals to create BitUSD at current market price anyway.

There is a 'funny' consequence of this.
The best way to place your order is to do that first.
And then place market cover...
...front-running welcome back. ['get what you asked for' usefulness ~ 0, in this regard]


PS
It is a challenging enough to invent new markets. There is little need to reinvent market rules at the same time as well.
Title: Re: BitShares X Market Rules - DRAFT
Post by: alt on August 11, 2014, 03:46:24 am
I'm sorry, I have missed this thread.
Title: Re: BitShares X Market Rules - DRAFT
Post by: taoljj on August 11, 2014, 04:07:34 am
Such an important rule, no discussion.

Should find some person familiar financial derivatives transactions to discuss.
Futures and so on markets are very mature.
Title: Re: BitShares X Market Rules - DRAFT
Post by: taoljj on August 11, 2014, 08:50:41 am
About price feed, gordonhucn should be rewarded.
https://bitsharestalk.org/index.php?topic=2925.msg36549#msg36549

Gordonhucn other Suggestions.
https://bitsharestalk.org/index.php?topic=2891.msg36387#msg36387
Title: Re: BitShares X Market Rules - DRAFT
Post by: gordonhucn on August 11, 2014, 10:18:09 am
When a COVER order lacks sufficient XTS all trades stop until someone sells their USD at the cover price. 
what if no one will ever sell at this price? why would anyone agree to loose some of his/her profit for a market rule?
Title: Re: BitShares X Market Rules - DRAFT
Post by: alt on August 11, 2014, 11:07:22 am
I have no doubt that market consensus will make bitusd track the price of USD.
but the rules with leak will break the market consensus.
the rules with too many limit will stop the market consensus.

I think we should make a rule with  less limit, and without leak.
here is my solution.
the main different is the short bitusd is separate from bid XTS.
for example:
If I want to short 100 bitUSD with price 1bitUSD/xts, I need to  freeze 200 XTS, and I can get 100  bitUSD immediately.
then I can usd these bitUSD to buy XTS with a different price, for bit order. maybe 0.5 bitUSD/XTS or whatever, there is no limit for the price of bid order.
the same, there is no limit for the price of ask order. there is no limit for the market depth check.

the key is to limit the short price.
the maximum  short price is coming from the minimum matched bid price of latest blocks(maybe latest 24*60*6 blocks).
at the beginning there is no matched bid price, we can set a safety initial limit price, come from the central trade market, like 0.01USD/XTS.


Title: Re: BitShares X Market Rules - DRAFT
Post by: alt on August 11, 2014, 11:10:49 am
When a COVER order lacks sufficient XTS all trades stop until someone sells their USD at the cover price. 
what if no one will ever sell at this price? why would anyone agree to loose some of his/her profit for a market rule?
yes, when BTS price drop from 1300$ to 500$(it happened in BTC), the market will freeze, maybe from last year to today...
Title: Re: BitShares X Market Rules - DRAFT
Post by: bytemaster on August 11, 2014, 07:16:22 pm
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.
2) Any "dust" is charged as fees where dust is defined as  ORDER_BALANCE * ORDER_PRICE == 0 when ORDER_BALANCE > 0
3) If your short order has a balance of less than 1 XTS then the balance is added to your collateral (rather than create dust)

Title: Re: BitShares X Market Rules - DRAFT
Post by: tonyk on August 11, 2014, 07:40:10 pm
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.

What do you mean with the bald text?
Title: Re: BitShares X Market Rules - DRAFT
Post by: bytemaster on August 11, 2014, 07:42:19 pm
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.

What do you mean with the bald text?

Effectively, the network will print XTS to buy BitUSD to cover any positions that run out of collateral.
Title: Re: BitShares X Market Rules - DRAFT
Post by: tonyk on August 11, 2014, 07:47:45 pm
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.

What do you mean with the bald text?


Effectively, the network will print XTS to buy BitUSD to cover any positions that run out of collateral.

The rules on that, is something the community (alt mainly  :) ) can chime in ,if you have thought about them already.
The above moved to the appropriate thread.

[edit] great! I do not know how to read this forum anymore. Stupid me.
Title: Re: BitShares X Market Rules - DRAFT
Post by: maqifrnswa on August 11, 2014, 07:49:47 pm
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.

What do you mean with the bald text?

FDIC is a government agency that insures US bank deposits in the case of under-capitalized bank failures:
http://en.wikipedia.org/wiki/Federal_Deposit_Insurance_Corporation

bytemaster is doing a similar thing with bitshares and drawing an analogy to the US Federal Deposit Insurance Corporation. Like FDIC, all depositors (or BTSX holders) are insuring the capitalization of the banking system through premiums (in the case of US banks) or dilution when running out of collateral (in the case of BTSX).
Title: Re: BitShares X Market Rules - DRAFT
Post by: bytemaster on August 11, 2014, 08:24:38 pm
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.

What do you mean with the bald text?

FDIC is a government agency that insures US bank deposits in the case of under-capitalized bank failures:
http://en.wikipedia.org/wiki/Federal_Deposit_Insurance_Corporation

bytemaster is doing a similar thing with bitshares and drawing an analogy to the US Federal Deposit Insurance Corporation. Like FDIC, all depositors (or BTSX holders) are insuring the capitalization of the banking system through premiums (in the case of US banks) or dilution when running out of collateral (in the case of BTSX).

The analogy is almost perfect... the US prints new dollars to keep depositors whole when banks run out of collateral backing their loans.   

US Bank creates USD backed by collateral of a house.  Housing market collapses and loan defaults so there is insufficient collateral to "buy back the USD" to take it out of circulation.    With FDIC they print new dollars to cover the loss... a bail out of the shareholders paid for by everyone.  This would be like allowing unbacked BitUSD to circulate.

What should happen is that the banks owners (shareholders) should make good on its loans (those that lent the bank USD, ie: depositors).  The only way for a real bank to do this is to sell shares in itself to raise the capital.  If it is unable to raise enough capital by selling shares then it should give the depositors the shares.   We are effectively building this bailout through share issuance into the system.

The shareholders are borrowing USD into circulation with a promise to pay 1 USD worth of shares in the future.   When we borrow them into existence, we lend them to the short which then sells them.  We lend to the short because the short has provided enough collateral that the shareholders consider it "low risk".   When viewed from this perspective it makes everything perfectly clear and natural.



Where the bank issues new shares in itself to cover the loss.   
Title: Re: BitShares X Market Rules - DRAFT
Post by: alt on August 12, 2014, 12:41:02 am
Recent updates to the rules:

1) FDIC BitUSD Insurance will create new XTS necessary to buy BitUSD to cover shorts that run out of collateral.

What do you mean with the bald text?


Effectively, the network will print XTS to buy BitUSD to cover any positions that run out of collateral.

The rules on that, is something the community (alt mainly  :) ) can chime in ,if you have thought about them already.
The above moved to the appropriate thread.

[edit] great! I do not know how to read this forum anymore. Stupid me.
I think it's not a problem now, because there is a minimum allowed cover price, 2/3 * feed price.
and the maximum allowed short price is 4/3 * feed price.
with double backup, the attack can get nothing.
Title: Re: BitShares X Market Rules - DRAFT
Post by: alt on August 12, 2014, 12:46:19 am
Just confirm, I am not sure I have really understand the source code.
If the cover price is lower than 2/3 * feed price, this cover can't finish, so this order will jump, next ask order will continue, right?