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

0 Members and 1 Guest are viewing this topic.

Offline biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
I thought of an argument against having too few different BitAssets in one BTSX chain. What do you think?

Having many markets (for example many different fiat currencies) helps establishing a price for BTSX if only one of these markets experiences short squeezes/attacks. Many traders will take advantage of for example BitUSD/BitAUD ratio deviating from USD/AUD ratio if BitUSD is under attack. This will help catch the rogue market as many of these traders will be (quick acting) robots. Also having the arbitrage opportunity within the chain is good for reaction speed.
In this scenario the sum of the size of all markets within a chain is the important parameter, not so much the size of an individual market.

If you have few (in the extreme just one) markets you don't know if what is happening is an attack on a BitAsset or a general downturn in BTSX value. Traders might sit back and watch at first. Arbitrage here is only possible using cross-chain-boundary markets (USD/BTSX, BitUSD/USD, …) slowing down reaction time.

I think this is an excellent argument for having exactly 3 BitAssets. I'm still of the opinion that having too many assets could lead to unforeseen stability problems, but having exactly 3 BitAssets means we can always know a reliable market-attack-resistant value for XTS. Under normal operation, all 3 markets will agree on the value of XTS (relative to the prices of the real-world assets the BitAssets are mirroring). But if one market is attacked, the 2 remaining markets will still agree on the value of XTS. So it will be obvious which market is undergoing malicious transients. All assuming that simultaneously attacking 2 markets is expensive and/or difficult, thus very unusual.

I'm not sure what practical value there is in this, because the protocol itself wouldn't be able to determine what "2 markets agree on the value of XTS" means; the protocol isn't looking at external price feeds. But it would at least be nice for us looking on from the outside to be able to say "hey! what's going on over there in BitBTC!" without wondering if XTS just collapsed.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline Markus

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
I thought of an argument against having too few different BitAssets in one BTSX chain. What do you think?

Having many markets (for example many different fiat currencies) helps establishing a price for BTSX if only one of these markets experiences short squeezes/attacks. Many traders will take advantage of for example BitUSD/BitAUD ratio deviating from USD/AUD ratio if BitUSD is under attack. This will help catch the rogue market as many of these traders will be (quick acting) robots. Also having the arbitrage opportunity within the chain is good for reaction speed.
In this scenario the sum of the size of all markets within a chain is the important parameter, not so much the size of an individual market.

If you have few (in the extreme just one) markets you don't know if what is happening is an attack on a BitAsset or a general downturn in BTSX value. Traders might sit back and watch at first. Arbitrage here is only possible using cross-chain-boundary markets (USD/BTSX, BitUSD/USD, …) slowing down reaction time.

Offline Markus

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Zeus, do I understand that correctly: Once your position at LCH runs out of margin, you have time until the next morning to fill up the margin and only if you don't by then, your position is liquidated?
This would be similar to the time lag I was lobbying for further up in this thread.

Offline ebit

  • Committee member
  • Hero Member
  • *
  • Posts: 1905
    • View Profile
  • BitShares: ebit
telegram:ebit521
https://weibo.com/ebiter

Offline Empirical1

  • Hero Member
  • *****
  • Posts: 884
    • View Profile
Cool. Well I respect the decentralised purity of the approach! Will be so impressive if it works without any of the stuff I mentioned! World changing :)

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
large BTS holders who want it to succeed can play central bank in a non-coordinated manner at a loss until it's stable
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 Empirical1

  • Hero Member
  • *****
  • Posts: 884
    • View Profile
Yeah that would be pretty sacrilegious.

I just thought it might be useful at the very beginning, some big players might want to ruin the experiment but if you can keep it within some realistic parameters it should help any crazy wild swings.

What about the idea of a market maker fund? Some of the AGS funds are used to help make the market in the beginning? 

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
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 Empirical1

  • Hero Member
  • *****
  • Posts: 884
    • View Profile
Would it help linking/referencing Bit assets to an external price feed for the first few weeks, with a limited allowed deviation, so that it can't get too out of whack with reality or manipulated until market depth gets to a certain level.

Offline bytemaster

Limiting trading to a fixed % of the market depth would probably achieve the goals for the SlingShot attack and requiring 5% of the shares to participate before the first trade would prevent SIDS.   

Obviously we do not want to 'price fix' the minimal market depth.

For the 5% SIDS solution, are you thinking that once there is 5% participation, the 5% requirement goes away? So, the 5% limit only affects the first trade, and if market participation dips below 5% again in the future, trading continues as usual?

I am thinking that we may want an 'initial' 5% to start and then at least 1% to continue and then apply a maximum % of order book consumed per block... say 5% of the order book can be consumed in any one block.  This would significantly slow down attacks.

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 biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
Limiting trading to a fixed % of the market depth would probably achieve the goals for the SlingShot attack and requiring 5% of the shares to participate before the first trade would prevent SIDS.   

Obviously we do not want to 'price fix' the minimal market depth.

For the 5% SIDS solution, are you thinking that once there is 5% participation, the 5% requirement goes away? So, the 5% limit only affects the first trade, and if market participation dips below 5% again in the future, trading continues as usual?
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline mf-tzo

  • Hero Member
  • *****
  • Posts: 1725
    • View Profile
Hi,

To be completely honest I haven't understand completely Bitshares X, BitUSD etc...I believe in all I3 projects and in everything you guys are trying to do so I thought I could give below an example from my experience that might be able to solve some market manupulation issues and properly cover margin calls...You can if you wish so apply the below in what you are trying to do.

I will describe  LCH (London Clearing House). LCH is a clearing house that traders use as counterpary (in our case Bitshares X) in order to trade various derivatives. What LCH does as clearing house is to get all the orders and match them. Settlement is done on a daily basis and LCH requires an initial margin (collateral) for all the short trades in order to cover potential volatility risks and counterparties defaults. I believe that the concept of initial margin should be applied in Bitshares X. Depending on the future expiry date,the type of contract, the type of market, market volatility etc. a multiplier factor is applied on amount of contract.

Below is their website for further reading. Have a look if you wish under risk management sections
http://www.lchclearnet.com/risk_management/
http://www.lchclearnet.com/freight/ffas/

As an example let's make the below assumptions.

1 contact = 1 BTC
DAY 1 BTC = $1,000
No expiry date
I am selling 1 contract

How settlement is done:
 
Day 1:

Opening balance: $0
Future value: $0
Initial Margin: -$200
Closed Balance: -$200 (margin call). I have to pay the initial margin

Day 2: (Lets assume 1 BTC = $1,100)

Opening Balance: $200 (I paid the initial margin)
Future value: -$100 (since I am short @ $1,000 and the price is $1,100)
Initial margin: -$200
Closed balance: -$100 (margin call)

Day 3 (Lets's assume 1 BTC = 600)

Opening balance: $300
Future value: $400
Initial margin: -$200
Closed balance: $500

If I decide to close my position I should get back $500 + $200 ( initial margin collateral) = $700. Since I have paid in total $300 in margin calls I made a profit of $400 ($1,000 original contract - $600 contract at expiry)

With this way Bitshares X will be secure from market manupulations (since they can apply high initial margin requirements per short contract. The amount to be charged should not change every day but rather you need to find a model that applies margin requirements for at least a month. When trading "options contracts"  this model gets much more complicated. LCH in order to calculate the initial margin requirements runs 16 different scenarios on the parameters associated with the open contracts of each trader. LCH calculates margin requirements using an application called London Span. You can download it from their website and play around the different markets. (If you do try it, when entering an option contract with strike $10,000 you should enter $100,000) for the collateral calculation to be correct.

Bitshares X must become LCH for cryptocurrencies. At least this is how I understand it, correct me if I am wrong. Before the financial crisis companies used to trade OTC between them. Now they all trade using clearing houses. Bitshares X must apply a fair initial margin requirement depending on the product and market. The calculation should be clear to understand how it is calculated from anyone and should be kept by Bitsares X as collateral if someone defaults. Bitshares X should be our counterpary exposure. At least this is how I have understood and imagined the future of Bitshares X.

I hope I helped. Most probably not as you already know these things but I thought to share just in case...

If you want to know more how LCH calculates collateral requirements and I can help more, please let me know.

If I helped and want to tip I would be greatfull. Unfortunately I have a very small stake in PTS - AGS and I am trying to increase my shareholding.

My PTS address:Pc1Xpa12JgbFPAZS9qLdHMkEsnqzXWpdbQ
Kehotee Key: 6gxDKJFw7MsCuHeQwArCQhfD6MnkHW9D7hfrUUeuFHos6oHSiL

P.S. I hope that my Kehotee is valid (I see it still as unregistered yellow although I have submitted the form on the site long time ago). It would be also nice if someone started a communication with Kehottee with me as I feel I have purchased a software that I am not using...  :(


















   

Offline bytemaster

Limiting trading to a fixed % of the market depth would probably achieve the goals for the SlingShot attack and requiring 5% of the shares to participate before the first trade would prevent SIDS.   

Obviously we do not want to 'price fix' the minimal market depth. 
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 biophil

  • Hero Member
  • *****
  • Posts: 880
  • Professor of Computer Science
    • View Profile
    • My Academic Website
  • BitShares: biophil
I strongly support limiting the number of assets in the first chain to BitUSD, BitGLD, and BitBTC. Since it's a "test" chain, and we're testing things like "does this idea even work," it makes sense to limit the things that can go wrong - and more assets should lead to a higher chance of chaotic instability.

For the SIDS attack, N=14 makes sense (the exact number probably doesn't matter), but I'm leery about a hard-coded value for D: the problem is that we don't really know how many XTS holders will be participating in the market. D needs to be high enough to prevent attacks, but if it's too high, the market will never function.

It seems like the main issue in market manipulation attacks is simply that someone can come to the market, hit it with a big hammer (i.e., by buying large volumes to incite a short squeeze), and profit from the ensuing chaos. We don't need to (and can't really) make hammers illegal; we just need to soften the hammer blow.

A simple way to implement this in the market could be to limit the total volume of orders that can execute per block by a percentage of the total market depth.

For example, if the percentage is 10%: if there are only 1,000 XTS of orders outstanding in the market, and at a given moment 200 XTS worth of orders are overlapping (I mean they could result in valid trades), only execute 100 XTS of those orders. Then next block, (assuming for simplicity that there are no new orders placed), there will be 900 XTS of orders, and 90 of the remaining 100 overlapping orders will execute, and then on the 3rd block finally they will all execute.

The effect of this is that when the market is new and shallow, it should have similar stability characteristics to a bigger and deeper market, and it will gradually and gently allow the market to grow into its full size. When the market is big (100,000 XTS of orders outstanding), normal order volumes can execute without ever hitting the limit.

My guess is that 10% is way too high; something more like 1% could work.
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Offline bytemaster

There can be many chains in the future and experiment with more assets this is a test network and by no means the last network


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.