BitShares Forum

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

Title: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 19, 2014, 08:58:48 pm
We have started a new Dry Run to test everything as we prepare to launch the markets and have things go live...

https://www.youtube.com/watch?v=Zje91xTd6Lc

We are calling everyone into service to prevent Armageddon when we turn on BitAssets.   Your mission is to find and exploit any holes in the market engine before the hard fork lands tomorrow.   If you are successful in your mission to break the market engine there is a $5000 BitUSD bounty for a bug that causes us to delay enabling the markets via price feeds. 

Delegates, you should be watching this test.  When you feel this test has been proven to your satisfaction, then publish a price feed for BitUSD on the main network.  Once 50 delegates publish a price feed we will have the dawn of a new era in crypto currencies.

Good luck! 

Checkout: https://github.com/BitShares/bitshares_toolkit       (develop branch)

Audit Code here:
https://github.com/BitShares/bitshares_toolkit/blob/master/libraries/blockchain/market_engine.cpp

http://bitshares.org/BitSharesXT-15.dmg

Known Issues:  Cover is broken in GUI... use the console to cover.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: xeroc on August 19, 2014, 09:02:42 pm
hoooo ... and I am off for a kickoff meeting tomorrow ... arg .. that sux
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: tonyk on August 19, 2014, 09:03:29 pm
Instruction on closing a short position (FROM YOUR OWN bitAsset), if you are also long the same asset, please!
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 19, 2014, 09:04:43 pm
Instruction on closing a short position (FROM YOUR OWN bitAsset), if you are also long the same asset, please!

wallet_market_cover <from_account_name> <quantity> <quantity_symbol> <order_id>

ie:

wallet_market_cover dan 100 USD XTS.....

You only get your collateral back when you cover 100% of the balance.

List your cover orders with

wallet_market_order_list USD XTS
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: tonyk on August 19, 2014, 09:41:43 pm
Thanks BM!

.......

Hi, please provide some funds:
XTS5JGviZahkP7oXFLBaGv4mGmWyQjzWgh2SFptUQqbtnGUD3PYwu


Objective:
-To have between 1 and 3 % of the total money supply (total XTS).
-Do some market activities, trying to win the bounty.

The success of those action are in no way guaranteed to work, so send funds you will not need for your own testing.
If however the 'attack' is successful and I do win the bounty it will be split the flowing way:
2/3 will be proportionally split between people that send funds according to the amount sent.
1/3 will be kept by me.

If you do send funds and later decide that you need them back, I will try to accommodate such requests.(but will exclude those senders and amount, in case we need to split the bounty)
In the event that more than 3% of total XTS supply is sent, I will return such amounts ASAP.

Thanks in advance, tonyk.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 19, 2014, 09:54:05 pm
Thanks BM!

.......

Hi, please provide some funds:
XTS5JGviZahkP7oXFLBaGv4mGmWyQjzWgh2SFptUQqbtnGUD3PYwu


Objective:
-To have between 1 and 3 % of the total money supply (total XTS).
-Do some market activities, trying to win the bounty.

The success of those action are in no way guaranteed to work, so send funds you will not need for your own testing.
If however the 'attack' is successful and I do win the bounty it will be split the flowing way:
2/3 will be proportionally split between people that send funds according to the amount sent.
1/3 will be kept by me.

If you do send funds and later decide that you need them back, I will try to accommodate such requests.(but will exclude those senders and amount, in case we need to split the bounty)
In the event that more than 3% of total XTS supply is sent, I will return such amounts ASAP.

Thanks in advance, tonyk.

Just sent you some funds.... 5 mill. XTS
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: Ggozzo on August 19, 2014, 10:00:13 pm
What happened to a GUI test?
https://bitsharestalk.org/index.php?topic=6867.msg91627#msg91627

Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 19, 2014, 10:10:04 pm
GUI Wallet will be posted in a second.

http://bitshares.org/BitSharesXT-15.dmg
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: tonyk on August 19, 2014, 10:21:17 pm
Come on... just finished building it...
If somebody who installed linux for the first time ever last Sunday,can do it, they can do it too...
  :)

Oho seems like the wrong one 4 days old chain..hm
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: ripplexiaoshan on August 19, 2014, 10:22:25 pm
What will happen exactly when over 50 delegates publish their price feeds?

1\ The testing network will be stopped and the formal version will be released very soon?

or

2\ It just means this run is successful and we might have more testings?


Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: codinat on August 19, 2014, 10:33:34 pm
wow
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: toast on August 19, 2014, 10:38:17 pm
someone connected with an old chain  -.-

we're adding a checkpoint on block 1 and then will push a new version
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bitcoinerS on August 19, 2014, 10:39:49 pm
GUI Wallet will be posted in a second.

http://bitshares.org/BitSharesXT-15.dmg

Bytemaster please ask DSL to host a PPA repository for linux binaries. User maqifrnswa has already set it up,
https://bitsharestalk.org/index.php?action=profile;u=3464
 Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares

DSL just needs to host it in own name and provide link to it along with other downloads.

Linux users should not be forced to compile.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: theoretical on August 19, 2014, 10:43:31 pm
Here is what I am seeing:

Code: [Select]
default (unlocked) >>> blockchain_market_order_book USD XTS
                  BIDS (* Short Order)                                       |                                   ASKS                                 
TOTAL                     QUANTITY                                     PRICE | PRICE                                        QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27.6359 USD                                                     MARKET PRICE | 0.011363636364 USD                   88,000.00000 XTS              999.9999 USD
9,798.9999 USD            881,910.00000 XTS               0.011111111111 USD*| 0.100000000000 USD                  100,000.00000 XTS           10,000.0000 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.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.008426966292 USD                   13,349.99998 XTS               99.9999 USD   17,799.99998 XTS
                                                                             | 0.008426966292 USD                   13,350.00000 XTS               99.9999 USD   17,800.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.01109056481093343 USD / XTS     Maximum Short Price: 0.01478741974791124 USD / XTS     Minimum Cover Price: 0.00739370987395562 USD / XTS
Bid Depth: 4,081,910.00000 XTS     Ask Depth: 5,054,559.99999 XTS     Min Depth: 2,000,000.00000 XTS

Here are my questions:

- What is the 27.6359 USD in the top left?
- What is "minimum cover price"?

I'm checking the accounting.  I see that:

Code: [Select]
881910 + 1200000 + 2000000 = 4,081,910
1400000 + 1400000 + 1780000 + 17799.99998 + 17800 + 178800 + 180 + 36180 + 18200 + 17600 + 88000 + 100000 = 5,054,559.99999

So the Bid Depth is the sum of XTS Bid Quantity, and Ask Depth is sum of the total XTS Quantity of Ask orders plus total Collateral for Margin Call orders.  This fact should probably be documented somewhere.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: vikram on August 19, 2014, 11:11:08 pm
Here is what I am seeing:

Code: [Select]
default (unlocked) >>> blockchain_market_order_book USD XTS
                  BIDS (* Short Order)                                       |                                   ASKS                                 
TOTAL                     QUANTITY                                     PRICE | PRICE                                        QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27.6359 USD                                                     MARKET PRICE | 0.011363636364 USD                   88,000.00000 XTS              999.9999 USD
9,798.9999 USD            881,910.00000 XTS               0.011111111111 USD*| 0.100000000000 USD                  100,000.00000 XTS           10,000.0000 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.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.008426966292 USD                   13,349.99998 XTS               99.9999 USD   17,799.99998 XTS
                                                                             | 0.008426966292 USD                   13,350.00000 XTS               99.9999 USD   17,800.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.01109056481093343 USD / XTS     Maximum Short Price: 0.01478741974791124 USD / XTS     Minimum Cover Price: 0.00739370987395562 USD / XTS
Bid Depth: 4,081,910.00000 XTS     Ask Depth: 5,054,559.99999 XTS     Min Depth: 2,000,000.00000 XTS

Here are my questions:

- What is the 27.6359 USD in the top left?

This is no longer relevant for market-issued assets and has been removed just now. For user-issued assets, this represents the accumulated fees of that asset which will be traded for XTS once at least 10,000 shares have been accumulated to avoid dust.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: chono on August 19, 2014, 11:11:35 pm
What will happen exactly when over 50 delegates publish their price feeds? <br /><br />1\ The testing network will be stopped and the formal version will be released very soon?<br /><br />or<br /><br />2\ It just means this run is successful and we might have more testings?<br/>
+5%

来自我的 HTC 802d 上的 Tapatalk

Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 19, 2014, 11:42:09 pm
I think here is wrong?
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() > min_cover_ask )
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;
                  else if( _current_bid->get_price() < max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
should be
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() < min_cover_ask )
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
                  else if( _current_bid->get_price() > max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: ebit on August 20, 2014, 12:10:46 am
 +5%
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 12:21:19 am
I think here is wrong?
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() > min_cover_ask )
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;
                  else if( _current_bid->get_price() < max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
should be
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() < min_cover_ask )
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
                  else if( _current_bid->get_price() > max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;

I think you are right.... damn.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 12:22:24 am
I think this doesn't worth  $5000
so the bounty is still there

I think here is wrong?
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() > min_cover_ask )
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;
                  else if( _current_bid->get_price() < max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
should be
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() < min_cover_ask )
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
                  else if( _current_bid->get_price() > max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;

I think you are right.... damn.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 01:01:25 am
I think here is wrong?
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() > min_cover_ask )
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;
                  else if( _current_bid->get_price() < max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
should be
Code: [Select]
                // limit the maximum movement rate of the price.
                  if( _current_bid->get_price() < min_cover_ask )
                     market_stat->avg_price_24h.ratio += min_cover_ask.ratio;
                  else if( _current_bid->get_price() > max_short_bid )
                     market_stat->avg_price_24h.ratio += max_short_bid.ratio;
                  else
                     market_stat->avg_price_24h.ratio += _current_bid->get_price().ratio;

I think you are right.... damn.

Both sections were wrong...  I have fixed it in the code.  I think it will avoid a hard fork because the price hasn't moved to the point that it would matter. 
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 01:18:24 am
If you really want to begin the market engine now
I suggest you should begin the asset one by one, and all delegate should follow you.
If all 25 assets begin together, I doubt some asset maybe can  issue 0 asset at the beginning, for the reason like market depth limit
If the price of XTS is double, these asset which still have not issues success or issue a little, can not running smooth.
because the average price is too low, and the short price is limited to the low price, but nobody will ask at that price.
without bid order, the price will never change to follow the real price.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 01:21:26 am
If you really want to begin the market engine now
I suggest you should begin the asset one by one, and all delegate should follow you.
If all 25 assets begin together, I doubt some asset maybe can  issue 0 asset at the beginning, for the reason like market depth limit
If the price of XTS is double, these asset which still have not issues success or issue a little, can not running smooth.
because the average price is too low, and the short price is limited to the low price, but nobody will ask at that price.

My recommendation to delegates is to only enable one market at a time.  BitUSD first.  This will minimize the risk to the network in the event that a market bug is found after launch.     As long as all delegates upgrade to the same version prior to enabling trading (by publishing 51 price feeds) then things should go smoothly.   All "hard-fork-changes" are in logic gated by the 51 price feed requirement.

Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 01:28:31 am
If you really want to begin the market engine now
I suggest you should begin the asset one by one, and all delegate should follow you.
If all 25 assets begin together, I doubt some asset maybe can  issue 0 asset at the beginning, for the reason like market depth limit
If the price of XTS is double, these asset which still have not issues success or issue a little, can not running smooth.
because the average price is too low, and the short price is limited to the low price, but nobody will ask at that price.

My recommendation to delegates is to only enable one market at a time.  BitUSD first.  This will minimize the risk to the network in the event that a market bug is found after launch.     As long as all delegates upgrade to the same version prior to enabling trading (by publishing 51 price feeds) then things should go smoothly.   All "hard-fork-changes" are in logic gated by the 51 price feed requirement.
OK, I'm ready, let's waiting for the great moment.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 01:47:30 am
Some test funds please: XTS5stX8AHkqMn9wHvZV6npvHByDHtEhDfm9RF8fKyvof2BqPk1TP
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: ebit on August 20, 2014, 02:00:40 am
If you really want to begin the market engine now
I suggest you should begin the asset one by one, and all delegate should follow you.
If all 25 assets begin together, I doubt some asset maybe can  issue 0 asset at the beginning, for the reason like market depth limit
If the price of XTS is double, these asset which still have not issues success or issue a little, can not running smooth.
because the average price is too low, and the short price is limited to the low price, but nobody will ask at that price.

My recommendation to delegates is to only enable one market at a time.  BitUSD first.  This will minimize the risk to the network in the event that a market bug is found after launch.     As long as all delegates upgrade to the same version prior to enabling trading (by publishing 51 price feeds) then things should go smoothly.   All "hard-fork-changes" are in logic gated by the 51 price feed requirement.

Can you begin personal assets,such as ROSE? ;D
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 02:11:08 am
Some test funds please: XTS5stX8AHkqMn9wHvZV6npvHByDHtEhDfm9RF8fKyvof2BqPk1TP
Code: [Select]
2014-08-20T02:10:34 2497      alt                 bm                  10,000.00000 XTS                                                    0.50000 XTS         66849a10
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: tonyk on August 20, 2014, 02:20:08 am

Is this thing still running?

If yes, why my GUI client tries to connect to some network about ~ 5 days old? Any ideas what I did wrong?
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 02:33:17 am

Is this thing still running?

If yes, why my GUI client tries to connect to some network about ~ 5 days old? Any ideas what I did wrong?

Remove the XTS directory... it may be loading up an old config file.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: cdryan on August 20, 2014, 02:57:02 am
感谢BM和团队的辛苦工作!!!
建议:市场引擎事关重大,避免BUG和漏洞攻击对BTSX造成大的冲击,建议执行更为严格的测试,一个case一个case的仔细过,找专业的金融类的专家执行相关测试。 :)
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: clout on August 20, 2014, 03:53:24 am
Just executed an order that left me with less the .5 XTS. Forgot about the rate hike and now enter trades. Can someone please send funds to XTS8i6mNSoSUwDNySzWBY1RFzoXbspdCykwt9cbCvuKTLZuLb9Rh5. Thanks!
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 04:02:33 am
感谢BM和团队的辛苦工作!!!
建议:市场引擎事关重大,避免BUG和漏洞攻击对BTSX造成大的冲击,建议执行更为严格的测试,一个case一个case的仔细过,找专业的金融类的专家执行相关测试。 :)

We have guys working on tests full time and are recruiting people on the forums to help (such as in this thread).    We will probably stop to catch our breath once BitAssets are done.  The sheer amount of testing required is huge. 

Right now we have the code loaded with asserts testing all possible pre/post conditions in an attempt to catch anything that goes wrong.  If something is caught the market is automatically frozen until we can identify the fault and fix it.    The goal is to minimize the potential scale of bugs.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: ebit on August 20, 2014, 04:07:45 am
 +5%
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: merockstar on August 20, 2014, 04:19:44 am
I will compile and give it a shot tomorrow if circumstances at home tomorrow allow me to.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: Fox on August 20, 2014, 05:16:12 am
What are the major differences between /bitshares_toolkit Dry Run 16 and /bitsharesx 0.4.4?

I set my feed in Dry Run 16.  I'm ready on main net as well.  Just need a few more votes to move my delegate up from position #102. 

Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: tonyk on August 20, 2014, 05:22:24 am

Do NOT publish price feeds on 0.4.4 yet
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 08:01:01 am
fund please,
I want to attack again, need 5,000,000 XTS.
my account is:  baozi
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: Fox on August 20, 2014, 11:12:57 am
fund please
Sent 1% of your request for testing. 
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 11:49:11 am
I have try to attack just now
but the chain seems stop at block 5829
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 12:17:43 pm
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 12:33:50 pm
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 12:54:18 pm
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 12:56:47 pm
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 01:07:47 pm
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
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 01:20:08 pm
The avg price is a lagging indicator


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 01:25:14 pm
The avg price is a lagging indicator


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 01:32:31 pm
The avg price is a lagging indicator


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 01:36:15 pm
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 (http://tapatalk.com/m?id=1)
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: yidaidaxia on August 20, 2014, 02:09:53 pm
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 (http://tapatalk.com/m?id=1)


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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 03:41:58 pm
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 (http://tapatalk.com/m?id=1)
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
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: bytemaster on August 20, 2014, 03:46:15 pm
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 (http://tapatalk.com/m?id=1)
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. 
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 03:48:12 pm
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: alt on August 20, 2014, 04:04:52 pm
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 (http://tapatalk.com/m?id=1)
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.
Title: Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
Post by: vikram on August 21, 2014, 12:03:05 am
Dry Run 17: https://bitsharestalk.org/index.php?topic=7172.msg95656#msg95656