Author Topic: BitShares X Status Update  (Read 369381 times)

0 Members and 1 Guest are viewing this topic.

Offline bytemaster

Can't build on linux now:
filesystem.cpp|415 col 44| error: ‘home_dir’ was not declared in this scope

don't know if it's ok to use QApplication::applicationDirPath()  in  bts_wallet/main.cpp

No, bts_wallet is free of Qt. 

Update fc from github.
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 alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Can't build on linux now:
filesystem.cpp|415 col 44| error: ‘home_dir’ was not declared in this scope

don't know if it's ok to use QApplication::applicationDirPath()  in  bts_wallet/main.cpp

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
It's a serious problem if I am not wrong.
Can I get the 25 pts?  ;D

The individual who found the issue should receive the 23 pts and an interpreter should get 2 pts...  let me know who should get what.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
No, It's not the business about real USD.

bytemaster,now you would like to send me 25 PTS,or 23PTS and 2PTS to some Interpreter.

alt又把人绕进去了,变成先鸡生蛋还是先蛋生鸡的问题了。

很简单。其实,只要系统强制要求BTA必须按与当时实物A价格挂钩的方法,规定用法币在系统外或系统本身设置的接口兑换取得BTA,系统内BTA数量是有限的(从小到大)。这样,没人会拿用真金白银买到的BTA出过高的价格买你的天价BTS,更不会出现所说的上亿个无抵押BTA。BTS是系统内已有的(也是有成本的),BTA是外来的(不是凭空产生的,而是用法币买的),alt推论的前提不成立,推理无立足点,结论自然错了。


Offline bytemaster

bytemaster,now you would like to send me 25 PTS,or 23PTS and 2PTS to some Interpreter.

alt又把人绕进去了,变成先鸡生蛋还是先蛋生鸡的问题了。

很简单。其实,只要系统强制要求BTA必须按与当时实物A价格挂钩的方法,规定用法币在系统外或系统本身设置的接口兑换取得BTA,系统内BTA数量是有限的(从小到大)。这样,没人会拿用真金白银买到的BTA出过高的价格买你的天价BTS,更不会出现所说的上亿个无抵押BTA。BTS是系统内已有的(也是有成本的),BTA是外来的(不是凭空产生的,而是用法币买的),alt推论的前提不成立,推理无立足点,结论自然错了。

Quote
current price is 1000usd/bts

here is the buy order:
buy 1000 usd with 1bts
buy 1001 usd with  1bts
buy 1002 usd with 1bts
.....
buy 1100 usd with 1bts

anytime I can give a buy order with
buy 1000000000 usd with 1bts
And I can give a short with
short 10000000000 usd with 1bts

So there is a line of people each wanting to buy about 1000 usd for 1 bts ....
And along comes someone who wants to sell 1000,0000 usd for 1 bts....

Assuming he actually had this usd (ie it was a long/long sale) then the market should match him against all of the buys (4103 usd), give the seller his .0001 bts and earn 3.999 bts in fees for the network because the seller was an idiot and sold way below market.   

Now in the event of a short position the result of this move should be...

Buyers get 4103 usd and the short seller ends up short -4103 with collateral of 4 bts (from buyers) + .0001 bts (from himself) which would seem to justify a margin call immediately... thus  I need to adjust the short-sell code to always use the price of the bids to determine required collateral (bts) or this kind of abuse could carry on.

Let me look into it a tad more and if it pans out I will send 25 PTS your way for finding this.

The individual who found the issue should receive the 23 pts and an interpreter should get 2 pts...  let me know who should get what. 
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 天籁

  • Hero Member
  • *****
  • Posts: 744
    • View Profile
bytemaster,now you would like to send me 25 PTS,or 23PTS and 2PTS to some Interpreter.

alt又把人绕进去了,变成先鸡生蛋还是先蛋生鸡的问题了。

很简单。其实,只要系统强制要求bta必须按与当时实物a价格挂钩的方法,规定用法币在系统外或系统本身设置的接口兑换取得bta,这样bta数量是有限的(随时间推移从小到大)。因此,没人会拿用真金白银买到的bta出过高的价格买你的天价BTS,更不会出现所说的上亿个无抵押bta。BTS是系统内已有的(也是有成本的),bta是外来的(不是凭空产生的,而是用法币买的),alt推论的前提不成立,推理无立足点,结论自然错了。

Quote
current price is 1000usd/bts

here is the buy order:
buy 1000 usd with 1bts
buy 1001 usd with  1bts
buy 1002 usd with 1bts
.....
buy 1100 usd with 1bts

anytime I can give a buy order with
buy 1000000000 usd with 1bts
And I can give a short with
short 10000000000 usd with 1bts

So there is a line of people each wanting to buy about 1000 usd for 1 bts ....
And along comes someone who wants to sell 1000,0000 usd for 1 bts....

Assuming he actually had this usd (ie it was a long/long sale) then the market should match him against all of the buys (4103 usd), give the seller his .0001 bts and earn 3.999 bts in fees for the network because the seller was an idiot and sold way below market.   

Now in the event of a short position the result of this move should be...

Buyers get 4103 usd and the short seller ends up short -4103 with collateral of 4 bts (from buyers) + .0001 bts (from himself) which would seem to justify a margin call immediately... thus  I need to adjust the short-sell code to always use the price of the bids to determine required collateral (bts) or this kind of abuse could carry on.

Let me look into it a tad more and if it pans out I will send 25 PTS your way for finding this.
« Last Edit: February 16, 2014, 07:43:08 pm by 天籁 »

Offline yidaidaxia

  • Full Member
  • ***
  • Posts: 179
    • View Profile
What I really concern about is that there is always possibility(even it's very small, but not neglectable since we may just have a small market at beginning) that in one specific 5 min(time of producing a block), just a bit of (let's say) 10000000BitUSD/XTS vs. a same or similar ask, then we will have tremendous quantity of non-backing BitUSD. I think we need to find a way to resolve it, we may need to elimate the non-backing BitAssets at all since it may cause the collapse of the whole system. 
« Last Edit: February 16, 2014, 05:51:17 pm by yidaidaxia »
PTS: PmUT7H6e7Hvp9WtKtxphK8AMeRndnow2S8   /   BTC: 1KsJzs8zYppVHBp7CbyvQAYrEAWXEcNvmp   /   BTSX: yidaidaxia (暂用)
新浪微博: yidaidaxia_郝晓曦 QQ:36191175试手补天

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
this is not enough.
It can't work at the beginning, just 2 order:
buy 10000000 usd   with 1bts
short 10000000 usd with 1bts

so we should add two limit:
1. matching_order for claim_long only work when  buy order  is enough
2. can't short  with price  low than current price

match_order for claim_long
Code: [Select]
                     if( ask_amount_usd < bid_amount_usd )
                     { // then we have filled the ask
                         pay_asker         += ask_amount_usd;
                         loan_amount       += ask_amount_usd;
I think here should change to
Code: [Select]
 
              if( ask_amount_bts < bid_amount_bts )
« Last Edit: February 16, 2014, 05:50:29 pm by alt »

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
no, short seller ends up short -(4103 + 1000000000)  usd + 100000000usd + 4.001bts
after margin call, he left 1000000000usd


Buyers get 4103 usd and the short seller ends up short -4103 with collateral of 4 bts (from buyers) + .0001 bts (from himself) which would seem to justify a margin call immediately... thus  I need to adjust the short-sell code to always use the price of the bids to determine required collateral (bts) or this kind of abuse could carry on.

Let me look into it a tad more and if it pans out I will send 25 PTS your way for finding this.

Offline bytemaster

Quote
current price is 1000usd/bts

here is the buy order:
buy 1000 usd with 1bts
buy 1001 usd with  1bts
buy 1002 usd with 1bts
.....
buy 1100 usd with 1bts

anytime I can give a buy order with
buy 1000000000 usd with 1bts
And I can give a short with
short 10000000000 usd with 1bts

So there is a line of people each wanting to buy about 1000 usd for 1 bts ....
And along comes someone who wants to sell 1000,0000 usd for 1 bts....

Assuming he actually had this usd (ie it was a long/long sale) then the market should match him against all of the buys (4103 usd), give the seller his .0001 bts and earn 3.999 bts in fees for the network because the seller was an idiot and sold way below market.   

Now in the event of a short position the result of this move should be...

Buyers get 4103 usd and the short seller ends up short -4103 with collateral of 4 bts (from buyers) + .0001 bts (from himself) which would seem to justify a margin call immediately... thus  I need to adjust the short-sell code to always use the price of the bids to determine required collateral (bts) or this kind of abuse could carry on.

Let me look into it a tad more and if it pans out I will send 25 PTS your way for finding this.
 

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 alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
But I think I can match all buy orders in the market
Because I can short usd with any price.

So I can get any usd  if I want ....
because I can short usd with any price
do this:
buy 100,000,000 usd with 1bts
short 100,000,000 usd with 1bts

then I get 100,000,000 usd, 2bts will be margin call

That looks right to me... 2 bts is the collateral.   Margin call would be at .66667 bts price point.

When you are the only market participant then that is true.  However, if you are not the only participant then you are constrained by others.

Offline bytemaster

So I can get any usd  if I want ....
because I can short usd with any price
do this:
buy 100,000,000 usd with 1bts
short 100,000,000 usd with 1bts

then I get 100,000,000 usd, 2bts will be margin call

That looks right to me... 2 bts is the collateral.   Margin call would be at .66667 bts price point.

When you are the only market participant then that is true.  However, if you are not the only participant then you are constrained by others.
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 alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
current price is 1000usd/bts

here is the buy order:
buy 1000 usd with 1bts
buy 1001 usd with  1bts
buy 1002 usd with 1bts
.....
buy 1100 usd with 1bts

anytime I can give a buy order with
buy 1000000000 usd with 1bts
And I can give a short with
short 10000000000 usd with 1bts

this will match all buy order in the market



match_order for claim_long
Code: [Select]
                     if( ask_amount_usd < bid_amount_usd )
                     { // then we have filled the ask
                         pay_asker         += ask_amount_usd;
                         loan_amount       += ask_amount_usd;
I think here should change to
Code: [Select]
 
              if( ask_amount_bts < bid_amount_bts )

Reason?

Offline bytemaster

match_order for claim_long
Code: [Select]
                     if( ask_amount_usd < bid_amount_usd )
                     { // then we have filled the ask
                         pay_asker         += ask_amount_usd;
                         loan_amount       += ask_amount_usd;
I think here should change to
Code: [Select]
 
              if( ask_amount_bts < bid_amount_bts )

Reason? 
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 alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
So I can get any usd  if I want ....
because I can short usd with any price
do this:
buy 100,000,000 usd with 1bts
short 100,000,000 usd with 1bts

then I get 100,000,000 usd, 2bts will be margin call

That looks right to me... 2 bts is the collateral.   Margin call would be at .66667 bts price point.