Author Topic: Dry Run 16 - Armageddon ($5000 Bounty inside)  (Read 12612 times)

0 Members and 1 Guest are viewing this topic.


Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Attack can be defended against with extra collateral.  Initial short positions are always safe from attack until the min cover ask falls 10%. 

There would be high fees to attack in a single block. 




Sent from my iPhone using Tapatalk
I have lost , what do you mean about 10%?
When the initial price is 1, the min cover ask is 0.666
when I short at price 1, the cover price is 0.75
I think it's not safe for the initial short position

You are right, I got those two numbers backward.    Increasing the min cover ask to .90 may be better.
yes, that will be more safe.
but  I would like to limit when to trigger margin call,  rather than  limit  how to fill the ask order.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I think we should protect 2 things:
1. the system. 
short with a too higher price will attack the system.
cover with a too lower price with extra bts will attack the system.
In fact , we have protect the system  good now.
2. the cover order. because the cover order has extra bts, so it's a good attack object.
we should add some rules to protect the cover order.

Offline bytemaster

Attack can be defended against with extra collateral.  Initial short positions are always safe from attack until the min cover ask falls 10%. 

There would be high fees to attack in a single block. 




Sent from my iPhone using Tapatalk
I have lost , what do you mean about 10%?
When the initial price is 1, the min cover ask is 0.666
when I short at price 1, the cover price is 0.75
I think it's not safe for the initial short position

You are right, I got those two numbers backward.    Increasing the min cover ask to .90 may be better. 
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
Attack can be defended against with extra collateral.  Initial short positions are always safe from attack until the min cover ask falls 10%. 

There would be high fees to attack in a single block. 




Sent from my iPhone using Tapatalk
I have lost , what do you mean about 10%?
When the initial price is 1, the min cover ask is 0.666
when I short at price 1, the cover price is 0.75
I think it's not safe for the initial short position

Offline yidaidaxia

  • Full Member
  • ***
  • Posts: 179
    • View Profile
Attack can be defended against with extra collateral.  Initial short positions are always safe from attack until the min cover ask falls 10%. 

There would be high fees to attack in a single block. 




Sent from my iPhone using Tapatalk


BM, I also saw your feedback to Alt at another thread, and agree with you that one acount to control the whole order book is almost impossible and basically nothing could be done by system even on the current centerlized market. My only concern is that the difference between our system and the traditional system is that we have Delegates. When the attacker do that together with a centain Delegate, the possibility of his success will become higher a lot. The only thing the attacker should do is waiting for an opportunity when there is proper market orders structure and "his" Delegate is going to produce next block, then he could start the attack and the Delegate could make his orders mathced before any other transaction happen.

So do we need to consider about this risk? Alt is proposing a solution in preivous post, it looks abnormal at the first galance, but I think it deserves more consideration before we say current market engine is better then his proposal.

Thanks.
PTS: PmUT7H6e7Hvp9WtKtxphK8AMeRndnow2S8   /   BTC: 1KsJzs8zYppVHBp7CbyvQAYrEAWXEcNvmp   /   BTSX: yidaidaxia (暂用)
新浪微博: yidaidaxia_郝晓曦 QQ:36191175试手补天

Offline bytemaster

Attack can be defended against with extra collateral.  Initial short positions are always safe from attack until the min cover ask falls 10%. 

There would be high fees to attack in a single block. 




Sent from my iPhone using Tapatalk
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
The avg price is a lagging indicator


Sent from my iPhone using Tapatalk
maybe the lag is not a big problem, maybe give short position a  chance to add backup is better.
In fact I am not family with finance.  I just feel we can do it   better.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
The avg price is a lagging indicator


Sent from my iPhone using Tapatalk
but I think it's not a problem about market depth
It's a problem about the balance of cover order and bid order.
I just need to wait a chance,
If sum_xts_of( all bid order higher than min_cover_price)  <=  sum_usd_of(all cover order higher than min_cover_price)/min_cover_price.
I can do this attack very soon. even at one block.
« Last Edit: August 20, 2014, 01:27:19 pm by alt »

Offline bytemaster

The avg price is a lagging indicator


Sent from my iPhone using Tapatalk
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
and another problem, maybe is  harmless
I think the limit check for the short order should not do at market engine.
It  should do when include the short order to the block.
when the maximum  short price is 1.0 now, and I make a short order with price 1.0
next block, the limit is to 0.999, my short order will not match, this is strange

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I think to avoid this attack, we should use an average price to decide if the margin call should execute.
Code: [Select]
price_margin_call  = (price_margin_call * 359 + _current_bid->get_price().ratio)/360
for safe reason, if the price_margin_call down more than 0.1% at a block, we can limit to 0.1%.
and we can cancel the limit of min_cover_ask because the price_margin_call is fair enough.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
That isn't an "attack" that is a shallow market where you controlled the order book without competition.    That is the problem with the test networks is that you can contrive any arbitrary set of orders and "call" it an attack, when in reality everything executed exactly as it should.
even the market depth is enough,  this attack can work, only need the cover depth is more than the bid depth.

Offline bytemaster

That isn't an "attack" that is a shallow market where you controlled the order book without competition.    That is the problem with the test networks is that you can contrive any arbitrary set of orders and "call" it an attack, when in reality everything executed exactly as it should.
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
I think there is a problem about  the market engine
I have try to attack just, but  I don't know why the block stop at 5829.
So I write the attack plane here.
this is the order book
Code: [Select]
test (unlocked) >>> blockchain_market_order_book USD XTS
                  BIDS (* Short Order)                                       |                                   ASKS
TOTAL                     QUANTITY                                     PRICE | PRICE                                        QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
480.5408 USD              41,968.63253 XTS                0.011450000000 USD*| 0.011627906977 USD                      391.03910 XTS                4.5469 USD
4.1599 USD                363.95450 XTS                   0.011430000000 USD*| 0.100000000000 USD                  100,000.00000 XTS           10,000.0000 USD
22.8284 USD               2,002.49362 XTS                 0.011400000000 USD*|
499.9999 USD              44,326.24113 XTS                0.011280000000 USD*|
9,798.9999 USD            881,910.00000 XTS               0.011111111111 USD*|
10.0000 USD               990.00000 XTS                   0.010101010101 USD |
10.0000 USD               1,000.00000 XTS                 0.010000000000 USD*|
9,999.9999 USD            1,200,000.00000 XTS             0.008333333333 USD*|
10,000.0000 USD           2,000,000.00000 XTS             0.005000000000 USD*|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             |                                   MARGIN
                                                                             | CALL PRICE                                   QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             | 0.008607000000 USD                  130,707.56361 XTS              999.9999 USD   174,276.75148 XTS
                                                                             | 0.008606250000 USD                  240,130.71894 XTS            1,836.9998 USD   320,174.29192 XTS
                                                                             | 0.008606250000 USD                1,307,189.54247 XTS            9,999.9999 USD   1,742,919.38996 XTS
                                                                             | 0.008587500000 USD                   69,361.46167 XTS              529.4589 USD   92,481.94890 XTS
                                                                             | 0.008571428476 USD                1,050,000.00000 XTS            8,999.9999 USD   1,400,000.00000 XTS
                                                                             | 0.008571428476 USD                1,050,000.00000 XTS            8,999.9999 USD   1,400,000.00000 XTS
                                                                             | 0.008426966292 USD                1,335,000.00000 XTS            9,999.9999 USD   1,780,000.00000 XTS
                                                                             | 0.008389261745 USD                  134,100.00000 XTS              999.9999 USD   178,800.00000 XTS
                                                                             | 0.008333333333 USD                      135.00000 XTS                0.9999 USD   180.00000 XTS
                                                                             | 0.008333333333 USD                   27,135.00000 XTS              200.9997 USD   36,180.00000 XTS
                                                                             | 0.008241758242 USD                   13,650.00000 XTS               99.9999 USD   18,200.00000 XTS
                                                                             | 0.003787863636 USD                   13,200.00000 XTS               49.9998 USD   17,600.00000 XTS
Average Price in Recent Trades: 0.01127583837707659 USD / XTS     Maximum Short Price: 0.01503445116943545 USD / XTS     Minimum Cover Price: 0.00751722558471772 USD / XTS
Bid Depth: 4,171,571.32178 XTS     Ask Depth: 7,261,203.42137 XTS     Min Depth: 2,000,000.00000 XTS
you see, when the trade price is 0.0083, many margin call will happen. and the minimum cover price is 0.0075.
so I will sell my XTS at price more than 0.0083, and I'll give a bid order at price 0.0075, buy all the XTS at price 0.0075.
Code: [Select]
ask baozi 89110 XTS 0.01128 USD   
# wait a block
ask baozi 881910 XTS 0.01111111 USD
# wait a block
ask baozi 1990 XTS 0.01 USD
# wait a block
ask baozi 1200000 XTS 0.00833333 USD
bid baozi  2767225 XTS 0.007518 USD
from the attack, I spent 2173010 XTS, and I can get 2173010.
In fact, I can make a short order at price 0.007518, to get all cover order at the low price.