Dry Run 14 - The Next Generation ($200 BitUSD bounty)

Started by bytemaster, August 13, 2014, 09:28:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tonyk

Quote from: xeroc on August 14, 2014, 03:05:38 PM
i say this is a bug .. tried to rescan?

w1 (unlocked) >>> wallet_rescan_blockchain
OK
--- there are now 7 active connections to the p2p network
w1 (unlocked) >>> wallet_market_cancel_order XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ
30008 zero_amount: zero amount

    {"order":{"order":{"type":"short_order","market_index":{"order_price":{"ratio":"0.00091","quote_asset_id":22,"base_asset_id":0},"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ"},"state":{"balance":0},"collateral":null},"proceeds":0,"transactions":["234e5669a13c8e2f0c8dcd401c7828f4706ab1d4"]}}
    th_a  wallet.cpp:3923 cancel_market_order

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

    {}
    th_a  common_api_client.cpp:1411 wallet_market_cancel_order

    {"command":"wallet_market_cancel_order"}
    th_a  cli.cpp:471 execute_command
w1 (unlocked) >>> wallet_market_order_list USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
cover_order 7,582.41757 XTS     0.006825 USD / XTS            45.9999 USD         51.7499 USD         10,109.89010 XTS    XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ
cover_order 32.78688 XTS        0.0068625 USD / XTS           0.1999 USD          0.2249 USD          43.71584 XTS        XTSK9GE2Tokxc8wet1pq7CYLry7AgPfGqWJi
cover_order 13.63635 XTS        0.00825 USD / XTS             0.0999 USD          0.1124 USD          18.18180 XTS        XTS2D6yPnsDsJgKQycN6gbLqkeUgz3QLTcac
cover_order 13.63635 XTS        0.00825 USD / XTS             0.0999 USD          0.1124 USD          18.18180 XTS        XTSGTKRipo2Rpz3ZydsYcVMAuAuvDFpWZnsm


Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

xeroc

Thats was a chinese nickname .. cant read ... cant remember :)

tonyk

Quote from: xeroc on August 14, 2014, 02:53:50 PM
At least one forum member claims to have about 8%
I know one claiming to have almost 1%, which is still a good amount. Who claims to have 8%?
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

xeroc


tonyk

Quote from: xeroc on August 14, 2014, 02:57:57 PM
You had that address in your open order list? Thats strange

w1 (unlocked) >>> wallet_market_order_list USD XTS 
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
cover_order 7,582.41757 XTS     0.006825 USD / XTS            45.9999 USD         51.7499 USD         10,109.89010 XTS    XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ
cover_order 32.78688 XTS        0.0068625 USD / XTS           0.1999 USD          0.2249 USD          43.71584 XTS        XTSK9GE2Tokxc8wet1pq7CYLry7AgPfGqWJi
cover_order 13.63635 XTS        0.00825 USD / XTS             0.0999 USD          0.1124 USD          18.18180 XTS        XTS2D6yPnsDsJgKQycN6gbLqkeUgz3QLTcac
cover_order 13.63635 XTS        0.00825 USD / XTS             0.0999 USD          0.1124 USD          18.18180 XTS        XTSGTKRipo2Rpz3ZydsYcVMAuAuvDFpWZnsm
w1 (unlocked) >>> wallet_account_balance a1
ACCOUNT                         BALANCE                     
============================================================


wallet_market_cancel_order   XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ
37002 unknown_market_order: unknown market order

    {"short_index":{"order_price":{"ratio":"0.00091","quote_asset_id":22,"base_asset_id":0},"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ"}}
    th_a  market_operations.cpp:175 evaluate

    {"op":{"type":"short_op_type","data":{"amount":-494505495,"short_index":{"order_price":{"ratio":"0.00091","quote_asset_id":22,"base_asset_id":0},"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ"}}}}
    th_a  operation_factory.hpp:52 evaluate

    {"trx":{"expiration":"20140814T165529","delegate_slate_id":null,"operations":[{"type":"short_op_type","data":{"amount":-494505495,"short_index":{"order_price":{"ratio":"0.00091","quote_asset_id":22,"base_asset_id":0},"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ"}}},{"type":"deposit_op_type","data":{"amount":494495495,"condition":{"asset_id":0,"delegate_slate_id":0,"type":"withdraw_signature_type","data":{"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ","memo":null}}}}],"signatures":["1f9568cb00b4d54468c2676c19e1f0679a3945d98b31744d6547e0f992195e5a3d91f80411ce69a9c05c67e918c9692cbe84353a46700c24a799d1a6f17bdc494c"]}}
    th_a  transaction_evaluation_state.cpp:201 evaluate

    {"trx":{"expiration":"20140814T165529","delegate_slate_id":null,"operations":[{"type":"short_op_type","data":{"amount":-494505495,"short_index":{"order_price":{"ratio":"0.00091","quote_asset_id":22,"base_asset_id":0},"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ"}}},{"type":"deposit_op_type","data":{"amount":494495495,"condition":{"asset_id":0,"delegate_slate_id":0,"type":"withdraw_signature_type","data":{"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ","memo":null}}}}],"signatures":["1f9568cb00b4d54468c2676c19e1f0679a3945d98b31744d6547e0f992195e5a3d91f80411ce69a9c05c67e918c9692cbe84353a46700c24a799d1a6f17bdc494c"]}}
    th_a  chain_database.cpp:1195 evaluate_transaction

    {"trx":{"expiration":"20140814T165529","delegate_slate_id":null,"operations":[{"type":"short_op_type","data":{"amount":-494505495,"short_index":{"order_price":{"ratio":"0.00091","quote_asset_id":22,"base_asset_id":0},"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ"}}},{"type":"deposit_op_type","data":{"amount":494495495,"condition":{"asset_id":0,"delegate_slate_id":0,"type":"withdraw_signature_type","data":{"owner":"XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ","memo":null}}}}],"signatures":["1f9568cb00b4d54468c2676c19e1f0679a3945d98b31744d6547e0f992195e5a3d91f80411ce69a9c05c67e918c9692cbe84353a46700c24a799d1a6f17bdc494c"]}}
    th_a  chain_database.cpp:1609 store_pending_transaction

    {}
    th_a  wallet.cpp:2370 sign_and_cache_transaction

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

    {}
    th_a  common_api_client.cpp:1411 wallet_market_cancel_order

    {"command":"wallet_market_cancel_order"}
    th_a  cli.cpp:471 execute_command
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

xeroc


Riverhead

Quote from: xeroc on August 14, 2014, 02:53:50 PM
At least one forum member claims to have about 8%


That's $1.44MM at current price. That's a lot of faith!! Or maybe they're just so loaded it's pocket change to them  :o

xeroc

You had that address in your open order list? Thats strange

tonyk

Quote from: xeroc on August 14, 2014, 02:51:55 PM
Shoildnt there be an open order in your account of type cover?
And that order can be canceled which costs you the USD


At least thats my understanding

It would have been strange way to do things but tried it:

wallet_market_cancel_order   XTSNYE8ghUaryYH1muKrPvmFTsSPZ6UyRBMQ
37002 unknown_market_order: unknown market order

Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

xeroc

At least one forum member claims to have about 8%

Riverhead

The attack vector is easy on the test blockchain.  On the actual blockchain with all delegates having around 10% of shares voting one would need millions of dollars worth of BTSX do this attack. Perhaps more because the act of buying that many BTSX would drive the price through the roof.



xeroc

Shoildnt there be an open order in your account of type cover?
And that order can be canceled which costs you the USD


At least thats my understanding

tonyk

Quote from: bytemaster on August 08, 2014, 06:58:24 PM

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.


I already have the USD.(in the same account,btw). How do I send them to the short position?
Tried sending the them account A to account A - did not close the short.
Tried adding the short as contact account - got an error....

out_of_range_exception: Out of Range
read datastream of length 24 over by -23
    {"method":"read","len":24,"over":-23}
    th_a  datastream.cpp:6 throw_datastream_range_error
fc::array<type,length>
    {"type":"char","length":33}

Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

alt

sorry, I can't cancel the short order

test (unlocked) >>> wallet_market_order_list USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID                                 
================================================================================================================================
short_order 12,500.00000 XTS    0.008 USD / XTS               12,500.00000 XTS    N/A                 XTSPD9Uaf3E2SmSQKAWHzhZYCULewSWPWofk
short_order 1,000.00000 XTS     1000000000. USD / XTS         1,000.00000 XTS     1,000,000,000,000.0000 USDN/A                 XTSDQkWP3PNDEHZJh6ca1MAi8yzoQScUJE56
cover_order 1,499.99325 XTS     750000000. USD / XTS          999,991,000,000.0000 USD1,124,994,937,500.0000 USD1,999.99100 XTS     XTSP1mf1hWhvpzxtmkUivrGDfG9yfAVsErPv
test (unlocked) >>> wallet_market_cancel_order XTSDQkWP3PNDEHZJh6ca1MAi8yzoQScUJE56
10 assert_exception: Assert Exception
BN_num_bits(n) <= 63:
    {}
    th_a  bigint.cpp:55 to_int64
type mismatch multiplying asset {"amount":-100000000,"asset_id":0} by price {"ratio":"100000000.","quote_asset_id":22,"base_asset_id":0}
    {"a":{"amount":-100000000,"asset_id":0},"p":{"ratio":"100000000.","quote_asset_id":22,"base_asset_id":0}}
    th_a  asset.cpp:248 operator*

    {"op":{"type":"short_op_type","data":{"amount":-100000000,"short_index":{"order_price":{"ratio":"100000000.","quote_asset_id":22,"base_asset_id":0},"owner":"XTSDQkW
P3PNDEHZJh6ca1MAi8yzoQScUJE56"}}}}
    th_a  operation_factory.hpp:52 evaluate

    {"trx":{"expiration":"20140814T164447","delegate_slate_id":null,"operations":[{"type":"short_op_type","data":{"amount":-100000000,"short_index":{"order_price":{"rat
io":"100000000.","quote_asset_id":22,"base_asset_id":0},"owner":"XTSDQkWP3PNDEHZJh6ca1MAi8yzoQScUJE56"}}},{"type":"deposit_op_type","data":{"amount":99990000,"condition
":{"asset_id":0,"delegate_slate_id":0,"type":"withdraw_signature_type","data":{"owner":"XTSDQkWP3PNDEHZJh6ca1MAi8yzoQScUJE56","memo":null}}}}],"signatures":["1f253a878a
cf6ce2694aa4aa6784ef845d652e3ca30542a0d8aef0cbf16997e48712f3dce2fabd8d8904f79aa0ed128ecb72d67641cb284d681ebe8316bf9ab877"]}}

alt

it's a little  hard to guard the feed price of all 25 assets.
because the price will timeout after 24 hours, and only wait for 3 feed price.