Author Topic: Dry Run 14 - The Next Generation ($200 BitUSD bounty)  (Read 21426 times)

0 Members and 1 Guest are viewing this topic.

clout

  • Guest
I'm still missing 100,000 XTS... where should I be looking to see that my funds did not disappear? I have no pending orders for the transaction.

Code: [Select]
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|2014-08-14T01:10:02 1233      ASK-L4zbTz29        MARKET              100,000.00000 XTS       fill ask @ 0.000019 USD / XTS               0.00000 XTS         [8b4c8a]|
|                              ASK-L4zbTz29        malcolmjmr          1.9000 USD              ask proceeds @ 0.000019 USD / XTS                                       |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
+5% for alt trying to cripple the markets :)

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Looks like someone found a way to bump the median price feed and create millions of USD ( by voting their delegate in... )
It's me...
it's a mess....
I have not got 1 USD
because it's always get an exception ...
both USD and BTC market

 I need to do a market depth
Code: [Select]
wallet_market_submit_ask baozi 200000 XTS 1000001 BTC
and  got an exception at the market
Code: [Select]
BN_num_bits(n) <= 63:
    {}
    th_a  bigint.cpp:55 to_int64
type mismatch multiplying asset {"amount":20000000000,"asset_id":0} by price {"ratio":"1000001000.","quote_asset_id":4,"base_asset_id":0}
    {"a":{"amount":20000000000,"asset_id":0},"p":{"ratio":"1000001000.","quote_asset_id":4,"base_asset_id":0}}
    th_a  asset.cpp:248 operator*
test (unlocked) >>> wallet_market_cancel_order XTSP5vKB2THt4hXdSPwCoKn3Zkks1J5cw1N                                                                                 
30008 zero_amount: zero amount

    {"order":{"order":{"type":"ask_order","market_index":{"order_price":{"ratio":"1000001000.","quote_asset_id":4,"base_asset_id":0},"owner":"XTSP5vKB2THt4hXdSPwCoKn3Zkks1J5cw1N"},"state":{"balance":0},"collateral":null},"proceeds":0,"transactions":["d04973e606c293eecfd4fb1ff30f2919f3bf1c38","7b61c516570fc0291de7d1e44bc620fd3bc2c493"]}}
    th_a  wallet.cpp:3923 cancel_market_order

    {"owner_address":"XTSP5vKB2THt4hXdSPwCoKn3Zkks1J5cw1N"}
    th_a  wallet.cpp:3983 cancel_market_order

    {}
    th_a  common_api_client.cpp:1411 wallet_market_cancel_order


Offline bytemaster

Arent the delegates in power to manipulate the price feeds ?
Isn't that normal if the market is small?

Yes, they are.... in this case the delegate moved the price to something unrealistic and thus this is a potential attack vector if someone can gain enough delegate seats *AND* has enough stake to push through arbitrary orders.
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 emski

  • Hero Member
  • *****
  • Posts: 1282
    • View Profile
    • http://lnkd.in/nPbhxG
Arent the delegates in power to manipulate the price feeds ?
Isn't that normal if the market is small?

Offline bytemaster

Looks like someone found a way to bump the median price feed and create millions of USD ( by voting their delegate in... )
« Last Edit: August 14, 2014, 01:50:52 pm by bytemaster »
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 btsfans

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Code: [Select]
bitshare@ubuntu:~/bitshares_toolkit$ cmake .
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:56 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/bitshare/bitshares_toolkit/CMakeFiles/CMakeOutput.log".
bitshare@ubuntu:~/bitshares_toolkit$


how to resolve? ths
« Last Edit: August 14, 2014, 02:09:11 pm by btsfans »
拷问3i !

Offline Riverhead

7
the quantity is the amount of the original order while the balance is the unmatched/not executed yet  part of the order isn't it?
But the bid has USD and is trying to unload them for XTS...


Your correction would be correct if you changed it to


Bid: I'm willing to pay 0.001 USD/XTS for 1 USD worth of XTS
« Last Edit: August 14, 2014, 01:19:47 pm by Riverhead »

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
the quantity is the amount of the original order while the balance is the unmatched/not executed yet  part of the order isn't it?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Bid: I'm willing to pay 0.001 USD/XTS for 1000 XTS USD
Ask: I'm willing to sell 1000 XTS for 0.011111111 USD/XTS.
fixed it, didn't I

Offline bytemaster

I see, I got it backwards then.


Bid: I'm willing to pay 0.001 USD/XTS for 1000 XTS


Ask: I'm willing to sell 1000 XTS for 0.011111111 USD/XTS.


Is that the correct read?

Yes
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 Riverhead

I see, I got it backwards then.


Bid: I'm willing to pay 0.001 USD/XTS for 1000 XTS


Ask: I'm willing to sell 1000 XTS for 0.011111111 USD/XTS.


Is that the correct read?

Offline bytemaster

Is there a reason why this isn't filling? Neither are mine just curious. Seems the ASK is looking to buy USD for more than what the BID is selling it for.

Code: [Select]
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
bid_order   1,000.00000 XTS     0.001 USD / XTS               1.0000 USD          1.0000 USD          N/A                 XTSJtmW37wek6EVV2ccMqoGPD6S67Tdkb2c6

riverheadtest (unlocked) >>> blockchain_market_list_asks USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
ask_order   1,000.00000 XTS     0.01111111 USD / XTS          1,000.00000 XTS     11.1111 USD         N/A                 XTSPx3zfRgknKrxYATB6L6xCd3QY5YBWmiK

The asks wants more than the bid is willing to pay, no match.
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 maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
I'm trying to figure out what happened here.
This is the market:
Code: [Select]
default (unlocked) >>> blockchain_market_order_book USD XTS
                  BIDS (* Short Order)                                       |                                   ASKS                                 
TOTAL                     QUANTITY                                     PRICE | PRICE                                        QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
103.6513 USD                                                    MARKET PRICE | 0.011111110000 USD                    1,000.00000 XTS               11.1111 USD
99.9999 USD               9,000.00900 XTS                 0.011111100000 USD*| 0.011111111111 USD                      100.00000 XTS                1.1111 USD
219.4796 USD              24,142.76556 XTS                0.009090909091 USD*| 0.011111111200 USD                    1,000.00000 XTS               11.1111 USD
100.0000 USD              12,000.00000 XTS                0.008333333333 USD | 0.011200000000 USD                    1,000.00000 XTS               11.1999 USD
19.9999 USD               2,469.13580 XTS                 0.008100000000 USD*| 0.014000000000 USD               10,000,000.00000 XTS          140,000.0000 USD
99,889.0002 USD           14,269,857.17144 XTS            0.007000000000 USD*| 0.014000000000 USD                   10,000.00000 XTS              140.0000 USD
19.9999 USD               3,921.56862 XTS                 0.005100000000 USD*| 1.111111111111 USD                        0.90000 XTS                1.0000 USD
1.0000 USD                1,000.00000 XTS                 0.001000000000 USD |
19.9999 USD               39,215.68627 XTS                0.000510000000 USD*|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             |                                   MARGIN                                 
                                                                             | CALL PRICE                                   QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             | 0.008333333333 USD                      135.00000 XTS                0.9999 USD   180.00000 XTS
                                                                             | 0.008250000000 USD                       13.63635 XTS                0.0999 USD   18.18180 XTS
                                                                             | 0.008250000000 USD                  136,363.63635 XTS              999.9998 USD   181,818.18180 XTS
                                                                             | 0.008250000000 USD                       13.63635 XTS                0.0999 USD   18.18180 XTS
                                                                             | 0.008241758242 USD                    2,729.99998 XTS               19.9999 USD   3,639.99998 XTS
                                                                             | 0.008241758242 USD                    1,364.99998 XTS                9.9999 USD   1,819.99998 XTS
                                                                             | 0.007500000000 USD                   30,000.00000 XTS              200.0000 USD   40,000.00000 XTS
                                                                             | 0.006862500000 USD                       32.78688 XTS                0.1999 USD   43.71584 XTS
                                                                             | 0.006825000000 USD                    7,582.41757 XTS               45.9999 USD   10,109.89010 XTS
                                                                             | 0.006818181818 USD                  128,785.85166 XTS              780.5201 USD   171,714.46888 XTS
                                                                             | 0.006750000000 USD                   16,666.66665 XTS               99.9999 USD   22,222.22221 XTS
                                                                             | 0.005250000000 USD                   23,785.67140 XTS              110.9998 USD   31,714.22854 XTS

Median Feed Price: 0.008109332 USD / XTS     Maximum Short Price: 0.01081244266666666 USD / XTS     Minimum Cover Price: 0.00540622133333333 USD / XTS
Bid Depth: 14,348,606.33669 XTS     Ask Depth: 10,464,665.75455 XTS     Min Depth: 2,000,000.00000 XTS

This is what is in the account:
Code: [Select]
default (unlocked) >>> wallet_account_balance
ACCOUNT                         BALANCE                     
============================================================
maqifrnswa                      480.0000 USD               
                                6,705.62173 XTS

I make this order:
Code: [Select]
default (unlocked) >>> wallet_market_submit_bid maqifrnswa 480 XTS 1 USD
{
  "expiration": "20140814T143920",
  "delegate_slate_id": null,
  "operations": [{
      "type": "withdraw_op_type",
      "data": {
        "balance_id": "XTSHzdmQMZfxAUqEBsSNKmaU8NwYFbTX5Qce",
        "amount": 4800000,
        "claim_input_data": ""
      }
    },{
      "type": "withdraw_op_type",
      "data": {
        "balance_id": "XTSAwtaSJ44fTUkm8kHjqFu3jbPzNzZKP9Ey",
        "amount": 10000,
        "claim_input_data": ""
      }
    },{
      "type": "bid_op_type",
      "data": {
        "amount": 4800000,
        "bid_index": {
          "order_price": {
            "ratio": "0.100000000000000005",
            "quote_asset_id": 22,
            "base_asset_id": 0
          },
          "owner": "XTSJUzKXsQrVqPeL21C3uMSaT6AGqSefNGnK"
        }
      }
    }
  ],
  "signatures": [
    "1f8226eda47c43167b07f5a521f5baa178b588212bcdb9021b6c8f3f159fe39ec5e4bbf6a5e090bf1ef82281c456a9da1d16de9063360149b5003deb7c7178a501",
    "20d4d88a7afe9ca1cffb191873a001884d39b30884545aebd07286d29e782f96da2815b77fc387f76b3ab0e638d53010d3e435d746750429df8ad2c2ed2224d409",
    "1f37854f51cf473781e090f907d4adf0b1db5e15a927050098bcd6cea89a05aa9314a2c21ac66a0f4c07e7311d80536a64b689e917de539b007e32a507ba2eb616"
  ]
}

I expect to buy:
11.1111 USD at 0.01111111 USD/XTS = 1000 XTS
1.1111 USD at 0.011111111111 USD/XTS = 100 XTS
11.1111 USD @ 0.011111111200 = 1000 XTS
11.1999 USD @0.011200000000 = 1000 XTS
445.4668 USD @0.014000000000 = 31819.05 XTS

total should have been bought: 34919.05 XTS

Here's the account and market after the purchase:
Code: [Select]
default (unlocked) >>> wallet_account_balance
ACCOUNT                         BALANCE                     
============================================================
maqifrnswa                      7,185.52172 XTS 

Code: [Select]
default (unlocked) >>> blockchain_market_order_book USD XTS
                  BIDS (* Short Order)                                       |                                   ASKS                                 
TOTAL                     QUANTITY                                     PRICE | PRICE                                        QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
99.9999 USD               9,000.00900 XTS                 0.011111100000 USD*| 0.014000000000 USD                9,960,777.27858 XTS          139,450.8819 USD
219.4796 USD              24,142.76556 XTS                0.009090909091 USD*| 0.014000000000 USD                   10,000.00000 XTS              140.0000 USD
100.0000 USD              12,000.00000 XTS                0.008333333333 USD | 1.111111111111 USD                        0.90000 XTS                1.0000 USD
19.9999 USD               2,469.13580 XTS                 0.008100000000 USD*|
99,889.0002 USD           14,269,857.17144 XTS            0.007000000000 USD*|
19.9999 USD               3,921.56862 XTS                 0.005100000000 USD*|
1.0000 USD                1,000.00000 XTS                 0.001000000000 USD |
19.9999 USD               39,215.68627 XTS                0.000510000000 USD*|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             |                                   MARGIN                                 
                                                                             | CALL PRICE                                   QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             | 0.008333333333 USD                      135.00000 XTS                0.9999 USD   180.00000 XTS
                                                                             | 0.008250000000 USD                       13.63635 XTS                0.0999 USD   18.18180 XTS
                                                                             | 0.008250000000 USD                  136,363.63635 XTS              999.9998 USD   181,818.18180 XTS
                                                                             | 0.008250000000 USD                       13.63635 XTS                0.0999 USD   18.18180 XTS
                                                                             | 0.008241758242 USD                    2,729.99998 XTS               19.9999 USD   3,639.99998 XTS
                                                                             | 0.008241758242 USD                    1,364.99998 XTS                9.9999 USD   1,819.99998 XTS
                                                                             | 0.007500000000 USD                   30,000.00000 XTS              200.0000 USD   40,000.00000 XTS
                                                                             | 0.006862500000 USD                       32.78688 XTS                0.1999 USD   43.71584 XTS
                                                                             | 0.006825000000 USD                    7,582.41757 XTS               45.9999 USD   10,109.89010 XTS
                                                                             | 0.006818181818 USD                  128,785.85166 XTS              780.5201 USD   171,714.46888 XTS
                                                                             | 0.006750000000 USD                   16,666.66665 XTS               99.9999 USD   22,222.22221 XTS
                                                                             | 0.005250000000 USD                   23,785.67140 XTS              110.9998 USD   31,714.22854 XTS

Median Feed Price: 0.008109332 USD / XTS     Maximum Short Price: 0.01081244266666666 USD / XTS     Minimum Cover Price: 0.00540622133333333 USD / XTS
Bid Depth: 14,348,606.33669 XTS     Ask Depth: 10,422,343.04211 XTS     Min Depth: 2,000,000.00000 XTS

So it looks like the market executed ok, but 27,733.52828 XTS seems to be missing from the account.

EDIT: here's the transaction history
Code: [Select]
[default (unlocked) >>> wallet_account_transaction_history
 RECEIVED            BLOCK     FROM                TO                  AMOUNT                  MEMO                                        FEE                 ID     
========================================================================================================================================================================
|2014-08-13T01:00:00 0         GENESIS             maqifrnswa          60,525.43383 XTS        claim Ppf3WEcqakR7CarJWYQ41D5H7UWZKTz5vd    0.00000 XTS         [5afce1]|
|                              GENESIS             maqifrnswa          247.73200 XTS           claim Pn5cHQPYxzJAso16hpvCCSjj7HEnuccJbs                                |
|                              GENESIS             maqifrnswa          5,958.39818 XTS         claim 1DXCqXn8M7VJ7c1K5H5qhMSkZKkpSesQ8o                                |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 2014-08-14T03:41:44 2307      maqifrnswa          maqifrnswa          0.00000 XTS             register maqifrnswa as a delegate           25.84228 XTS        34901ef8
 2014-08-14T03:45:10 2328      maqifrnswa          ASK-DdPHJoDQ        60,000.00000 XTS        sell XTS @ 0.008 USD / XTS                  0.10000 XTS         df867f39
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|2014-08-14T03:45:30 2329      ASK-DdPHJoDQ        MARKET              60,000.00000 XTS        fill ask @ 0.008 USD / XTS                  0.00000 XTS         [185799]|
|                              ASK-DdPHJoDQ        maqifrnswa          480.0000 USD            ask proceeds @ 0.008 USD / XTS                                          |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 2014-08-14T12:39:20 5533      maqifrnswa          BID-JUzKXsQr        480.0000 USD            buy XTS @ 1.00000000000000005 USD / XTS     0.10000 XTS         d48358a5
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|2014-08-14T12:39:40 5534      BID-JUzKXsQr        MARKET              480.0000 USD            pay bid @ 1.00000000000000005 USD / XTS     0.00000 XTS         [f3100d]|
|                              BID-JUzKXsQr        maqifrnswa          479.99999 XTS           bid proceeds @ 1.00000000000000005 USD /...                             |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/code]
« Last Edit: August 14, 2014, 01:06:18 pm by maqifrnswa »
maintains an Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true

Offline Riverhead

Is there a reason why this isn't filling? Neither are mine just curious. Seems the ASK is looking to buy USD for more than what the BID is selling it for.

Code: [Select]
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
bid_order   1,000.00000 XTS     0.001 USD / XTS               1.0000 USD          1.0000 USD          N/A                 XTSJtmW37wek6EVV2ccMqoGPD6S67Tdkb2c6

riverheadtest (unlocked) >>> blockchain_market_list_asks USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
ask_order   1,000.00000 XTS     0.01111111 USD / XTS          1,000.00000 XTS     11.1111 USD         N/A                 XTSPx3zfRgknKrxYATB6L6xCd3QY5YBWmiK
« Last Edit: August 14, 2014, 11:49:29 am by Riverhead »