Author Topic: BitShares XT - Security against Market Manipulation FIND ATTACKS FOR TIPS  (Read 52284 times)

0 Members and 1 Guest are viewing this topic.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Good news!!!!!

I think I have a solution,  BM!
It is pretty ugly (both from market point of view and will definitely delay the implementation...)

If you can offer a bounty of 100 PTS (total for the attack + the solution)  I can go ahead and save you some time and effort …
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
#1 is already being considered but I don't see how it affects this attack since it is independent of price movement speed

Actually #1 is the most important and we MUST have it. (not only because of this attack. BTW)
 It puts artificial brake on the price movement speed! – i.e. at price change of >=5% the trading stops for 2 hours. at price change of >=10% the trading stops for the day.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
More important is how existing market deal with the issue..

They use:
1. Caps on price movement.
2. Daily margin requirements that must be met pretty quickly or liquidation follows.
3. The daily margins are re-calculated often (daily) and are based on recent past volatility.
4. and of course there are no mixed accounts (i.e. you can either be short/long or have no position in any particular asset – it also means that buying 1contract of any Asset always covers your short position if you have one, no matter if you placed a cover order (if one exists) or straight buy order)

#4 is curious, wouldn't that mean me and a buddy could make a deal and perform the same "attack"? This isn't even illegal or anything, you could just arrange it on another marketplace, right?

For #3, I think any function from volatility to margin requirement which has an upper bound can be replaced with some "X margin with Y call ratio" that is strictly safer. So for #2 we just have continuous instead of daily evaluation.

#1 is already being considered but I don't see how it affects this attack since it is independent of price movement speed
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
More important is how existing market deal with the issue..

They use:
1. Caps on price movement.
2. Daily margin requirements that must be met pretty quickly or liquidation follows.
3. The daily margins are re-calculated often (daily) and are based on recent past volatility.
4. and of course there are no mixed accounts (i.e. you can either be short/long or have no position in any particular asset – it also means that buying 1contract of any Asset always covers your short position if you have one, no matter if you placed a cover order (if one exists) or straight buy order)
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
First of all it does not always win! But it is like a zero price lottery ticket.

 The loser are the holders of  ‘Simple Neutral Position’ i.e. BTS holders that are neither long nor short bitUSD (as they did not get their hands on those $0.00 lottery tickets that just won).
 If you ask where the money come from I must give it a bit of thought…
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Here's a question, if this position always wins, then which position is the one that always loses? Just holding BTS?
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
fuck I messed up again. The edit:

Quote
In other words, you still end up with 1 BTS and 0 BitUSD, with a cover opportunity to get 2 BTS for 1 BitUSD. Your entry cost was 2 BTS.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Quote
'You have 2 BTS, you short 1 BitUSD at 1:1.
Now you have 0 BTS *and that's it*, you do not have 1 BitUSD also!'

-With 1 BTS you sell 1bitUSD; you end up with -1bitUSD; the collateral of 2 BTS is formed by said (your) 1 BTS and the 1 BTS received from the sale of said 1 bitUSD.

 -With 1 BTS you buy 1bitUSD so you do have 1 BitUSD.

Ok I see what you are saying... this is equivalent and I think I may have messed up an earlier explanation if you think I disagree. It just depends on whether the market takes collateral from you and gives you the BTS or if it takes the collateral from the trade and only requires 1x from you, but this all happens atomically anyway.

In other words, you still end up with 1 BTS and 0 BitUSD, with a cover opportunity to get 2 BTS for 1 BitUSD. Your entry cost was 2 BTS.

I think we're on the same page now.

« Last Edit: May 13, 2014, 04:56:27 pm by toast »
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
Have made allready so many clicks to see what bytemaster will say...  :)

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
'You have 2 BTS, you short 1 BitUSD at 1:1.
Now you have 0 BTS *and that's it*, you do not have 1 BitUSD also!'


-With 1 BTS you sell 1bitUSD; you end up with -1bitUSD; the collateral of 2 BTS is formed by said (your) 1 BTS and the 1 BTS received from the sale of said 1 bitUSD.

 -With 1 BTS you buy 1bitUSD so you do have 1 BitUSD.
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Actually I believe Dan was agreeing and clarifying what I mean. You put up 1x for a total of 2x entering the trade. The output of the trade is "-USD" aka a cover opportunity for 1 USD and it is backed by 2x in collateral and the +USD on the other side of the trade. End result: network has 2 BTS, you have 1 BTS (aka 1  bts + "2 BTS" in collateral + "-1 USD" opposite trade).

edit: added in 1 BTS you got from the trade for completion

I'm glad to let Dan do the arguing but maybe he will be kind enough to endorse my position here, or explain why it is wrong since you haven't
« Last Edit: May 13, 2014, 04:28:53 pm by toast »
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Nicolay,
I politely ask you to leave the responses in this thread to Dan...
As you are incorrect here, the same way you were incorrect in the other thread.

 
I don't think that's right... you put up 2x collateral at the time you place the order. The bts you trade the bitusd for and your margin are separate. You never have negative balance, just locked collateral

Sent from my SCH-I535 using Tapatalk

Each party puts up 1x for a total of 2x entering the trade, and the output of the trade is -USD backed by 2x and +USD
« Last Edit: May 13, 2014, 03:12:59 pm by tonyk »
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Quote
System Enhanced  Neutral Position’:
You buy 1 BitUSD and short 1 BitUSD and we assume parity at the time you took the position; therefore your account looks like:
2 BTS held as collateral for -1 BitUSD
1 BitUSD held on your balance sheet.   
Total Initial Cost:  2 BTS.
Initial Cost $2 to buy 2 BTS and enter the short/long position at the same time. 

You forgot the cost of buying the BitUSD.

You have 2 BTS, you short 1 BitUSD at 1:1.
Now you have 0 BTS *and that's it*, you do not have 1 BitUSD also! This is why I was emphasizing the order of things in the other thread.
You can BUY 1 BitUSD if you had more BTS. Then your total cost was 3 BTS for: 1 BitUSD, -1 BitUSD on the sheets, and 2 BTS in collateral.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
I gave a lot of thought about the “Have a cake and eat it too” attack and came to really really sad conclusion:

1. It won’t be a problem to explain to BM why this is actually an attack. (My definition of attack is – flow/ deficiency in the implementation that leaves the system vulnerable and gives a possibility to malicious participants to either benefit (financially) or destroy the market even with no personal gain)

2. The problem is that even if the flow is fixed (the flow in this case is the possibility for an account to be short and long the same bitAsset at the same time), the possibility for someone to be long and short the same asset, (coupled with the limited risk of the short position to 2x max loss) still exists! The malicious player will just need 2 accounts to achieve this same result… and I do not see how this can be prevented => this is deficiency of the model (of the prediction market called BTS X) existing on a blockchain with no access to all assets of the short position holder but just to up to his initial margin.

3. The unfortunate result of 2. is that the “Have a cake and eat it too”  is not simply an attack (something fixable) but argument #3 why BTS X will not work. And this is pretty bad news for me, as I will truly benefit much more if the BTS X experiment does work…
 …well let’s hope it does against all odds...
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.